Interface EntityObjectMapperFactory

All Known Implementing Classes:
DefaultEntityObjectMapperFactory

public interface EntityObjectMapperFactory
Provides EntityObjectMapper instances for a given domain. DefaultEntityObjectMapperFactory is provided for extension.
  • Method Details

    • entityObjectMapper

      default EntityObjectMapper entityObjectMapper(Entities entities)
      Creates a new EntityObjectMapper instance.
      Parameters:
      entities - the domain entities
      Returns:
      a new EntityObjectMapper instance.
    • compatibleWith

      boolean compatibleWith(DomainType domainType)
      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

      static EntityObjectMapperFactory instance(DomainType domainType)
      Returns the first available EntityObjectMapperFactory 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.