public sealed interface DomainType
Identifies a domain model and serves as a factory for
EntityType
instances associated with this domain model type.-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(EntityType entityType) static DomainTypedomainType(Class<?> domainClass) Returns a newDomainTypeusingdomainClass.getSimpleName()as domain name.static DomainTypedomainType(String domainName) Returns aDomainTypeinstance with the given name.static DomainTypedomainTypeByName(String domainName) Returns the domain type with the given name.entityType(String name) Instantiates aEntityTypeassociated with this domain type.entityType(String name, Class<?> resourceBundleClass) Instantiates aEntityTypeassociated with this domain type.entityType(String name, String resourceBundleName) Instantiates aEntityTypeassociated with this domain type.name()
-
Method Details
-
name
String name()- Returns:
- the domain name
-
entityType
Instantiates aEntityTypeassociated with this domain type. If this entity type has been defined previously that instance is returned.- Parameters:
name- the entity type name- Returns:
- a
EntityTypewith the given name
-
entityType
Instantiates aEntityTypeassociated with this domain type. If this entity type has been defined previously that instance is returned.- Parameters:
name- the entity type nameresourceBundleClass- the class to use as base name of the resource bundle to use for captions- Returns:
- a
EntityTypewith the given name
-
entityType
Instantiates aEntityTypeassociated 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- Returns:
- a
EntityTypewith the given name
-
contains
- Parameters:
entityType- the entity type- Returns:
- true if this domain type contains the given entity type
-
domainType
Returns a newDomainTypeusingdomainClass.getSimpleName()as domain name.- Parameters:
domainClass- the domain class- Returns:
- a
DomainType
-
domainType
Returns aDomainTypeinstance with the given name.- Parameters:
domainName- domain name- Returns:
- a
DomainTypewith 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
-