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 TypeMethodDescriptionboolean
compatibleWith
(DomainType domainType) Returns true if this mapper factory is compatible with the given domain type.default EntityObjectMapper
entityObjectMapper
(Entities entities) Creates a newEntityObjectMapper
instance.static EntityObjectMapperFactory
instance
(DomainType domainType) Returns the first availableEntityObjectMapperFactory
instance 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 newEntityObjectMapper
instance.- Parameters:
entities
- the domain entities- Returns:
- a new
EntityObjectMapper
instance.
-
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 availableEntityObjectMapperFactory
instance 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
EntityObjectMapperFactory
instance compatible with the given domain type.
-