Package is.codion.framework.json.domain
Interface EntityObjectMapperFactory
- All Known Implementing Classes:
DefaultEntityObjectMapperFactory
public interface EntityObjectMapperFactory
Provides
EntityObjectMapper instances for a given domain.
DefaultEntityObjectMapperFactory is provided for extension.-
Method Summary
Modifier and TypeMethodDescriptionbooleancompatibleWith(DomainType domainType) Returns true if this mapper factory is compatible with the given domain type.default EntityObjectMapperentityObjectMapper(Entities entities) Creates a newEntityObjectMapperinstance.static EntityObjectMapperFactoryinstance(DomainType domainType) Returns the first availableEntityObjectMapperFactoryinstance compatible with the given domain type, if no such mapper factory is available a default one, compatible with all domain models, is returned.
-
Method Details
-
entityObjectMapper
Creates a newEntityObjectMapperinstance.- Parameters:
entities- the domain entities- Returns:
- a new
EntityObjectMapperinstance.
-
compatibleWith
Returns true if this mapper factory is compatible with the given domain type.- Parameters:
domainType- the domain type- Returns:
- true if this mapper factory is compatible with the given domain type
-
instance
Returns the first availableEntityObjectMapperFactoryinstance compatible with the given domain type, if no such mapper factory is available a default one, compatible with all domain models, is returned.- Parameters:
domainType- the domain type for which to find a mapper factory- Returns:
- a
EntityObjectMapperFactoryinstance compatible with the given domain type.
-