public interface DomainType
Identifies a domain model and serves as a factory for
EntityType
instances associated with this domain model type.-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(EntityType entityType) static DomainType
domainType
(Class<?> domainClass) Returns a newDomainType
using the given classes simple name as domain name.static DomainType
domainType
(String domainName) Returns aDomainType
instance with the given name.static DomainType
domainTypeByName
(String domainName) Returns the domain type with the given name.entityType
(String name) Instantiates aEntityType
associated with this domain type.<T extends Entity>
EntityTypeentityType
(String name, Class<T> entityClass) Instantiates aEntityType
associated with this domain type.<T extends Entity>
EntityTypeentityType
(String name, Class<T> entityClass, String resourceBundleName) Instantiates aEntityType
associated with this domain type.entityType
(String name, String resourceBundleName) Instantiates aEntityType
associated with this domain type.name()
-
Method Details
-
name
String name()- Returns:
- the domain name
-
entityType
Instantiates aEntityType
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
Instantiates aEntityType
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 nameentityClass
- the entity representation class- Returns:
- a
EntityType
with the given name
-
entityType
Instantiates aEntityType
associated with this domain type. If this entity type has been defined previously that instance is returned.- Parameters:
name
- the entity type nameresourceBundleName
- the name of a resource bundle to use for captions, if any- Returns:
- a
EntityType
with the given name
-
entityType
<T extends Entity> EntityType entityType(String name, Class<T> entityClass, String resourceBundleName) Instantiates aEntityType
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 nameentityClass
- the entity representation classresourceBundleName
- the name of a resource bundle to use for captions, if any- Returns:
- a
EntityType
with the given name
-
contains
- Parameters:
entityType
- the entity type- Returns:
- true if this domain type contains the given entity type
-
domainType
Returns a newDomainType
using the given classes simple name as domain name.- Parameters:
domainClass
- the domain class- Returns:
- a
DomainType
-
domainType
Returns aDomainType
instance with the given name.- Parameters:
domainName
- domain name- Returns:
- a
DomainType
with the given name
-
domainTypeByName
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
-