Class InstanceDefinition
java.lang.Object
com.aquima.interactions.metamodel.impl.InstanceDefinition
- All Implemented Interfaces:
IInstanceDefinition
,Serializable
This class holds the definition of a static instance in the meta model.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InstanceDefinition
(MetaModel model, IInstanceDS datasource) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addReference
(String attributeName, InstanceReference reference) This method will return the definition of the type of the instance.This method returns the unique ID of the instance definition.This method will return the name of instance.getInstances
(String attribute) This method can be used to retrieve the reference definitions to determine which instances are referred by the specified attribute.This method can be used to retrieve a value of an attribute.protected void
-
Constructor Details
-
InstanceDefinition
protected InstanceDefinition(MetaModel model, IInstanceDS datasource) throws InitializationException - Throws:
InitializationException
-
-
Method Details
-
addReference
protected void addReference(String attributeName, InstanceReference reference) throws InitializationException - Throws:
InitializationException
-
setValue
- Throws:
InitializationException
-
getInstanceId
Description copied from interface:IInstanceDefinition
This method returns the unique ID of the instance definition.- Specified by:
getInstanceId
in interfaceIInstanceDefinition
- Returns:
- the unique ID of the instance definition.
-
getInstanceName
Description copied from interface:IInstanceDefinition
This method will return the name of instance. The name of an instance uniquely identifies an instance within all instances of the same type.- Specified by:
getInstanceName
in interfaceIInstanceDefinition
- Returns:
- The name of the instance.
-
getEntityDefinition
Description copied from interface:IInstanceDefinition
This method will return the definition of the type of the instance.- Specified by:
getEntityDefinition
in interfaceIInstanceDefinition
- Returns:
- Entity definition of the instance.
-
getInstances
Description copied from interface:IInstanceDefinition
This method can be used to retrieve the reference definitions to determine which instances are referred by the specified attribute. When the attribute does not refer to any instance, an empty array will be returned.- Specified by:
getInstances
in interfaceIInstanceDefinition
- Parameters:
attribute
- The name of the attribute for which the references are requested.- Returns:
- Array containing information about the instances that are referred by the specified attribute.
-
getValue
Description copied from interface:IInstanceDefinition
This method can be used to retrieve a value of an attribute. This method is only applicable for non-relation attributes. For relation attributes use the getInstances method to determine which instances are referred by the relation attribute.- Specified by:
getValue
in interfaceIInstanceDefinition
- Parameters:
attributeName
- The name of the attribute for which the value is requested.- Returns:
- The value for the specified attribute.
- Throws:
UnknownAttributeException
- This exception is raised when the attribute name passed to this method is invalid.
-