Interface EntityObjectMapper.Factory

All Known Implementing Classes:
EntityObjectMapper.AbstractFactory
Enclosing class:
EntityObjectMapper
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface EntityObjectMapper.Factory
Provides EntityObjectMapper instances for a given domain. EntityObjectMapper.AbstractFactory 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.
    • supports

      boolean supports(DomainType domainType)
      Returns true if this mapper factory supports the given domain type.
      Parameters:
      domainType - the domain type
      Returns:
      true if this mapper factory supports the given domain type
    • instance

      static EntityObjectMapper.Factory instance(DomainType domainType)
      Returns the first available EntityObjectMapper.Factory instance supporting the given domain type, if no such mapper factory is available a default one, supporting all domain models, is returned.
      Parameters:
      domainType - the domain type for which to find a mapper factory
      Returns:
      a EntityObjectMapper.Factory instance supporting the given domain type.