Interface EntityTranslationApplier
- All Superinterfaces:
org.springframework.core.Ordered
public interface EntityTranslationApplier
extends org.springframework.core.Ordered
This is a mechanism that can be used to customize how Translation values are applied to
entities in TranslationPostMapperMember.
TranslationPostMapperMember will delegate to the first EntityTranslationApplier
it finds that can handle the given request. Otherwise, it will fall back to its default
translation-applying logic.
- Since:
- TranslationCommon 2.0.5
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(Object projection, Translation translation) Whether the current component can handle applying the translation to the given entity.default intgetOrder()voidhandle(Object projection, Translation translation) Apply the translation on the given entity.
-
Method Details
-
canHandle
Whether the current component can handle applying the translation to the given entity.- Parameters:
projection- projection domain entity instance on which to apply the translationtranslation- a translation that needs to be applied to the given projection instance- Returns:
- true if this component can handle the request, false otherwise
-
handle
Apply the translation on the given entity.- Parameters:
projection- projection domain entity instance on which to apply the translationtranslation- a translation that needs to be applied to the given projection instance
-
getOrder
default int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-