-
public interface DomainType
Identifies a domain model and serves as a factory forEntityType
instances associated with this domain model type.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
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.EntityType
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
entityType(String name, String resourceBundleName)
Instantiates aEntityType
associated with this domain type.static DomainType
getDomainType(String domainName)
Returns the domain type with the given name.String
name()
-
-
-
Method Detail
-
name
String name()
- Returns:
- the domain name
-
entityType
EntityType entityType(String name)
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
<T extends Entity> EntityType entityType(String name, Class<T> entityClass)
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
EntityType entityType(String name, String resourceBundleName)
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
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 newDomainType
using the given classes simple name as domain name.- Parameters:
domainClass
- the domain class- Returns:
- a
DomainType
-
domainType
static DomainType domainType(String domainName)
Returns aDomainType
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
-
-