Interface IMetaModel
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
MetaModel
This object contains all information on all entities, attributes and domains.
Information on static instances can be found in the IEntityInstance interface. This class is not serializable.
- Since:
- 5.0
- Author:
- O. Kerpershoek, F. v.d. Meer
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsAggregate
(String aggregateName) This method returns a boolean indicating whether a definition is present for an aggregate with the supplied name.boolean
containsDomain
(String domainName) This method returns a boolean indicating whether a definition is present for a domain with the supplied name.boolean
containsEntity
(String entityName) This method returns a boolean indicating whether a definition is present for an entity with the supplied name.boolean
containsInstanceDefinition
(String entityName, String instanceName) This method will return if an instance definition is present with the given name for the entity type specified.getAggregateDefinition
(String aggregateName) This method returns the aggregate definition for the supplied aggregate name.This method returns an array containing all the aggregate definitions that are present in the meta model.This method will return an array containing all the instance definitions that are present.getDomainDefinition
(String domainName) This method returns the domain definition for the supplied domain name.This method returns an array containing all the domain definitions that are present in the metamodel.getEntityDefinition
(String entityName) This method returns the entity definition for the supplied entity name.getEntityDefinitions
(boolean includeSubTypes) This method returns an array containing all the entity definitions that are present in the metamodel.getInstanceDefinition
(String entityName, String instanceName) This method will return the instance definition for the specified name and type.This method returns the name of the module this model belongs to.This method returns the version of the module this model belongs to.
-
Method Details
-
getModuleName
String getModuleName()This method returns the name of the module this model belongs to.- Returns:
- the name of the module this model belongs to.
-
getModuleVersion
Version getModuleVersion()This method returns the version of the module this model belongs to.- Returns:
- The version of the module this model belongs to.
-
containsDomain
This method returns a boolean indicating whether a definition is present for a domain with the supplied name. The name is not case sensitive.- Parameters:
domainName
- The name of the domain for which the presence is queried- Returns:
- (boolean) true when the domain is present, false otherwise.
-
getDomainDefinitions
IDomainDefinition[] getDomainDefinitions()This method returns an array containing all the domain definitions that are present in the metamodel.- Returns:
- Array of all the domain definitions (never null).
-
getDomainDefinition
This method returns the domain definition for the supplied domain name. The domain name is not case sensitive.- Parameters:
domainName
- The name of the domain for which the definition is requested.- Returns:
- Definition of the domain with requested name
- Throws:
UnknownDomainException
- An unknown domain exception is thrown when the supplied name does not match any domain known to the metamodel.
-
containsEntity
This method returns a boolean indicating whether a definition is present for an entity with the supplied name. The name is not case sensitive.- Parameters:
entityName
- The name of the entity for which the presence is queried- Returns:
- (boolean) true when the entity is present, false otherwise.
-
getEntityDefinitions
This method returns an array containing all the entity definitions that are present in the metamodel. Please note that entities may be related to each other, and that this array will contain both the parent and the child definition if such a relation exists.- Parameters:
includeSubTypes
- States wether all entity definitions will be returned, or in case of false only the root entities which have no children.- Returns:
- Array of all the entity definitions (never null).
-
getEntityDefinition
This method returns the entity definition for the supplied entity name. The entity name is not case sensitive.- Parameters:
entityName
- The name of the entity for which the definition is requested.- Returns:
- Definition of the entity with requested name
- Throws:
UnknownEntityException
- An unknown entity exception is thrown when the supplied name does not match any entity known to the metamodel.
-
containsInstanceDefinition
This method will return if an instance definition is present with the given name for the entity type specified. This method will not check any super-type, and only return true when the definition is present for the exact entity type as specified.- Parameters:
entityName
- The entity name for which the existence of an instance definition should be checked.instanceName
- The name of the instance definition.- Returns:
- true when the entity type contains an instance definition for the specified name, false otherwise.
- Throws:
UnknownEntityException
- This exception is raised when the entity name is not recognized as a valid type.
-
getInstanceDefinition
This method will return the instance definition for the specified name and type.- Parameters:
entityName
- The entity name of which the instance definition is requested.instanceName
- The name of definition that is requested.- Returns:
- Instance definition for the specified name and type.
- Throws:
UnknownEntityException
- This exception is raised when the entity name is not recognized as a valid type.UnknownInstanceDefinitionException
- This exception is raised when no definition could be found for the specified name.
-
getAllInstanceDefinitions
IInstanceDefinition[] getAllInstanceDefinitions()This method will return an array containing all the instance definitions that are present. When no instance definitions are found, an empty array will be returned.- Returns:
- Array containing all instance definitions.
-
containsAggregate
This method returns a boolean indicating whether a definition is present for an aggregate with the supplied name.- Parameters:
aggregateName
- The name of the aggregate for which the presence is queried.- Returns:
- (boolean) true when the aggregate is present, false otherwise.
-
getAggregateDefinitions
IAggregateDefinition[] getAggregateDefinitions()This method returns an array containing all the aggregate definitions that are present in the meta model.- Returns:
- Array of all the aggregate definitions (never null).
-
getAggregateDefinition
This method returns the aggregate definition for the supplied aggregate name.- Parameters:
aggregateName
- The name of the aggregate for which the definition is requested.- Returns:
- Definition of the aggregate with requested name
- Throws:
UnknownAggregateException
- An unknown aggregate exception is thrown when the supplied name does not match any aggregate known to the meta model.
-