Package edm.edom3
Interface EDMInstance
-
- All Superinterfaces:
EDMContextDependent
,EDMData
- All Known Subinterfaces:
EDMInstanceTools
,EDMModel
,EDMRepository
,EDMRow
public interface EDMInstance extends EDMData
This interface represents a existing or non-existing instance in local or remote context. An instance can be a database instance or an in-memory instance.- Author:
- AET
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EDMInstance
create(EDMInstance owner, java.lang.String entityName, java.lang.String[] attrNames, EDMSelect[] values)
Create instance and optionally assign attributes.EDMAggregate
createAggrAttrBN(java.lang.String attrName, EDMSelect aggrType)
Create an aggregate in an attributevoid
delete(long options)
Delete this instanceEDMAccessManager
getAccessManager()
Retrieve an access manager for this instanceEDMSelect
getAttrBN(java.lang.String attrName)
Retrieve attribute value for this instanceEDMSelect[]
getAttrsBN(java.lang.String[] attrNames)
Retrieve attribute values for this instanceEDMInstance[]
getInstanceReferences(int firstIndex, int maxElements)
Retrieve information on what instances references this instance once or more.EDMInstance
getInstanceType()
Retrieve information on what instance type this instance isboolean
isInstanceOf(java.lang.String stype)
Check instance typeboolean
isKindOf(java.lang.String stype)
Check instance typevoid
putAttrBN(java.lang.String attrName, EDMSelect value)
set attribute value for this instancevoid
putAttrsBN(java.lang.String[] attrNames, EDMSelect[] values)
Set attribute values for this instancevoid
putProtectedAttrBN(java.lang.String attrName, EDMSelect value)
Assign a protected attribute value for this instancevoid
setAttrBN(java.lang.String name, boolean value)
Assign an attribute with a booleanvoid
setAttrBN(java.lang.String name, double value)
Assign an attribute with a realvoid
setAttrBN(java.lang.String name, long value)
Assign an attribute with a long integervoid
setAttrBN(java.lang.String name, EDMInstance value)
Assign an attribute with an instance integervoid
setAttrBN(java.lang.String name, java.lang.String value)
Assign an attribute with a stringboolean
testAttrBN(java.lang.String attrName)
Check if a single attribute value is set for this instanceboolean[]
testAttrsBN(java.lang.String[] attrNames)
Check if nultiple attribute value are set for this instance-
Methods inherited from interface edm.edom3.EDMContextDependent
getContext
-
-
-
-
Method Detail
-
create
EDMInstance create(EDMInstance owner, java.lang.String entityName, java.lang.String[] attrNames, EDMSelect[] values) throws EdmiException
Create instance and optionally assign attributes. For "normal" instances it is usually easier to use theEDMModel.createInstance method in stead.- Parameters:
owner
- where to create the entity, model in most casesentityName
- entity name, caese insensitiveattrNames
- array of attrinbute names to retrieve, null if no attrsvalues
- new attribute values, attrNames[] and values[] must have same length- Returns:
- this instance
- Throws:
EdmiException
- if the method fails
-
createAggrAttrBN
EDMAggregate createAggrAttrBN(java.lang.String attrName, EDMSelect aggrType) throws EdmiException
Create an aggregate in an attribute- Parameters:
attrName
- name of the attribute to useaggrType
- optional aggregate type, the TYPE fields in the select are used.- Returns:
- The created aggregate
- Throws:
EdmiException
- if the method fails
-
delete
void delete(long options) throws EdmiException
Delete this instance- Parameters:
options
- control delete instance,nstance references or all- Throws:
EdmiException
- if the method fails- See Also:
EDMConstants.InstanceOptions
-
getAccessManager
EDMAccessManager getAccessManager() throws EdmiException
Retrieve an access manager for this instance- Returns:
- Access manager object
- Throws:
EdmiException
- itf the method fails
-
getInstanceType
EDMInstance getInstanceType() throws EdmiException
Retrieve information on what instance type this instance is- Returns:
- Entityinstance
- Throws:
EdmiException
- if the method fails
-
getInstanceReferences
EDMInstance[] getInstanceReferences(int firstIndex, int maxElements) throws EdmiException
Retrieve information on what instances references this instance once or more.- Parameters:
firstIndex
- Where in the index of all references possible to startmaxElements
- How many references to return as maximum- Returns:
- Arrey of Entityinstance
- Throws:
EdmiException
- if the method fails
-
getAttrBN
EDMSelect getAttrBN(java.lang.String attrName) throws EdmiException
Retrieve attribute value for this instance- Parameters:
attrName
- name of the attribute- Returns:
- the attribute value
- Throws:
EdmiException
- if the method fails
-
putAttrBN
void putAttrBN(java.lang.String attrName, EDMSelect value) throws EdmiException
set attribute value for this instance- Parameters:
attrName
- name of the attributevalue
- new attribute value- Throws:
EdmiException
- if the method fails
-
getAttrsBN
EDMSelect[] getAttrsBN(java.lang.String[] attrNames) throws EdmiException
Retrieve attribute values for this instance- Parameters:
attrNames
- array of attrinbute names to retrieve- Returns:
- the attribute values
- Throws:
EdmiException
- if the method fails
-
putAttrsBN
void putAttrsBN(java.lang.String[] attrNames, EDMSelect[] values) throws EdmiException
Set attribute values for this instance- Parameters:
attrNames
- array of attrinbute names to retrievevalues
- new attribute values, attrNames[] and values[] must have samne length- Throws:
EdmiException
- if the method fails
-
putProtectedAttrBN
void putProtectedAttrBN(java.lang.String attrName, EDMSelect value) throws EdmiException
Assign a protected attribute value for this instance- Parameters:
attrName
- name of the attributevalue
- new value for the attribute- Throws:
EdmiException
- if the method fails
-
isInstanceOf
boolean isInstanceOf(java.lang.String stype) throws EdmiException
Check instance type- Parameters:
stype
- name to compare with- Returns:
- true if match, false else
- Throws:
EdmiException
- if the method fails
-
isKindOf
boolean isKindOf(java.lang.String stype) throws EdmiException
Check instance type- Parameters:
stype
- name to compare with- Returns:
- true if match, false else
- Throws:
EdmiException
- if the method fails
-
setAttrBN
void setAttrBN(java.lang.String name, boolean value) throws EdmiException
Assign an attribute with a boolean- Parameters:
name
- attribute namevalue
- new attribute value- Throws:
EdmiException
- if not found or illegal to set
-
setAttrBN
void setAttrBN(java.lang.String name, EDMInstance value) throws EdmiException
Assign an attribute with an instance integer- Parameters:
name
- attribute namevalue
- new attribute value- Throws:
EdmiException
- if not found or illegal to set
-
setAttrBN
void setAttrBN(java.lang.String name, long value) throws EdmiException
Assign an attribute with a long integer- Parameters:
name
- attribute namevalue
- new attribute value- Throws:
EdmiException
- if not found or illegal to set
-
setAttrBN
void setAttrBN(java.lang.String name, double value) throws EdmiException
Assign an attribute with a real- Parameters:
name
- attribute namevalue
- new attribute value- Throws:
EdmiException
- if not found or illegal to set
-
setAttrBN
void setAttrBN(java.lang.String name, java.lang.String value) throws EdmiException
Assign an attribute with a string- Parameters:
name
- attribute namevalue
- new attribute value- Throws:
EdmiException
- if not found or illegal to set
-
testAttrBN
boolean testAttrBN(java.lang.String attrName) throws EdmiException
Check if a single attribute value is set for this instance- Parameters:
attrName
- name of the attribute- Returns:
- true isf attribute is set
- Throws:
EdmiException
- if the method fails
-
testAttrsBN
boolean[] testAttrsBN(java.lang.String[] attrNames) throws EdmiException
Check if nultiple attribute value are set for this instance- Parameters:
attrNames
- array of attrinbute names to retrieve- Returns:
- boolean array indicating if the corresponding attribute is set
- Throws:
EdmiException
- if the method fails
-
-