Interface DomainType


  • public interface DomainType
    Identifies a domain model and serves as a factory for EntityType instances associated with this domain model type.
    • Method Detail

      • name

        String name()
        Returns:
        the domain name
      • entityType

        EntityType entityType​(String name)
        Instantiates a EntityType associated with this domain type. If this entity type has been defined previously that instance is returned.
        Parameters:
        name - the entity type name
        Returns:
        a EntityType with the given name
      • entityType

        <T extends EntityEntityType entityType​(String name,
                                                 Class<T> entityClass)
        Instantiates a EntityType associated with this domain type. If this entity type has been defined previously that instance is returned.
        Type Parameters:
        T - the Entity type
        Parameters:
        name - the entity type name
        entityClass - the entity representation class
        Returns:
        a EntityType with the given name
      • entityType

        EntityType entityType​(String name,
                              String resourceBundleName)
        Instantiates a EntityType associated with this domain type. If this entity type has been defined previously that instance is returned.
        Parameters:
        name - the entity type name
        resourceBundleName - the name of a resource bundle to use for captions, if any
        Returns:
        a EntityType with the given name
      • entityType

        <T extends EntityEntityType entityType​(String name,
                                                 Class<T> entityClass,
                                                 String resourceBundleName)
        Instantiates a EntityType associated with this domain type. If this entity type has been defined previously that instance is returned.
        Type Parameters:
        T - the Entity type
        Parameters:
        name - the entity type name
        entityClass - the entity representation class
        resourceBundleName - the name of a resource bundle to use for captions, if any
        Returns:
        a EntityType with the given name
      • contains

        boolean contains​(EntityType entityType)
        Parameters:
        entityType - the entity type
        Returns:
        true if this domain type contains the given entity type
      • domainType

        static DomainType domainType​(Class<?> domainClass)
        Returns a new DomainType using the given classes simple name as domain name.
        Parameters:
        domainClass - the domain class
        Returns:
        a DomainType
      • domainType

        static DomainType domainType​(String domainName)
        Returns a DomainType instance with the given name.
        Parameters:
        domainName - domain name
        Returns:
        a DomainType with the given name
      • getDomainType

        static DomainType getDomainType​(String domainName)
        Returns the domain type with the given name.
        Parameters:
        domainName - the domain name
        Returns:
        the domain type with the given name
        Throws:
        IllegalArgumentException - in case the domain has not been defined