Interface DomainMapper
- All Known Subinterfaces:
DomainMapperManager,DomainMapperMember
- All Known Implementing Classes:
BasicAuditDomainMapperMember,BusinessTypeAwareDomainMapperMember,ChangeContainerOverridableDomainMapperMember,CreateSetupDomainMapperMember,DefaultDomainMapperManager,ModelMapperDomainMapperMember,MonetaryMapperMember,SingleIndexRequestNotificationStateMapperMember,UpdateValidationDomainMapperMember
public interface DomainMapper
Common interface for
DomainMapperMember and DomainMapperManager.- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptiondefault <D> DdeleteMap(D repositoryDomain, ContextInfo contextInfo) In cases where deletion actually results in a modified state to persist (e.g.default <P> Class<P>getBusinessDomainType(Object repositoryDomain) Ascertain the correct business domain type based on an instance of the repository domaindefault <D,P> D modifyMap(D repositoryDomain, P businessDomain, ContextInfo contextInfo, boolean allowNull) Perform a mapping operation from business domain instance to persistence specific instance, presumably modifying the state of the persistence specific instance.
-
Method Details
-
modifyMap
@Nullable default <D,P> D modifyMap(D repositoryDomain, P businessDomain, @Nullable ContextInfo contextInfo, boolean allowNull) Perform a mapping operation from business domain instance to persistence specific instance, presumably modifying the state of the persistence specific instance.- Type Parameters:
D- The repository domain typeP- The business domain type- Parameters:
repositoryDomain- The persistence domain instance to modifybusinessDomain- The business instance containing changes to map to the repository domaincontextInfo- The context information used to make tracking determinations relevant to sandboxing and multitenant concerns. SeeTrackableRepositoryfor more info on persistence behavior based on context.allowNull- Whether or not null values in properties in the payload instance should be ignored during the mapping operation.- Returns:
- The modified repository domain instance. Return null if no action taken.
-
deleteMap
In cases where deletion actually results in a modified state to persist (e.g. archived soft delete), this method will modify the state appropriately toward that end.- Type Parameters:
D- The repository domain type- Parameters:
repositoryDomain- The persistence domain instance to inactivatecontextInfo- The context information used to make tracking determinations relevant to sandboxing and multitenant concerns.- Returns:
- The repository domain state resulting from the delete operation. Return null if no action taken.
-
getBusinessDomainType
Ascertain the correct business domain type based on an instance of the repository domain- Parameters:
repositoryDomain- The persistence domain instance to inspect- Returns:
- The type of the associated business domain. Return null is not supported.
-