EDMInstance
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 and 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, EDMInstance value)
Assign an attribute with an instance integervoid
setAttrBN(java.lang.String name, long value)
Assign an attribute with a long 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 instanceMethods inherited from interface edm.edom3.EDMData
exists, getInstanceId, getName, getOwner, isLocal, isRemote
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 lengthReturns:this instanceThrows:EdmiException - if the method fails
createAggrAttrBN
EDMAggregate createAggrAttrBN(java.lang.String attrName, EDMSelect aggrType) throws EdmiException
Create an aggregate in an attributeParameters:attrName - name of the attribute to useaggrType - optional aggregate type, the TYPE fields in the select are used.Returns:The created aggregateThrows:EdmiException - if the method fails
delete
void delete(long options) throws EdmiException
Delete this instanceParameters:options - control delete instance,nstance references or allThrows:EdmiException - if the method failsSee Also:EDMConstants.InstanceOptions
getAccessManager
EDMAccessManager getAccessManager() throws EdmiException
Retrieve an access manager for this instanceReturns:Access manager objectThrows:EdmiException - itf the method fails
getInstanceType
EDMInstance getInstanceType() throws EdmiException
Retrieve information on what instance type this instance isReturns:EntityinstanceThrows: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 maximumReturns:Arrey of EntityinstanceThrows:EdmiException - if the method fails
getAttrBN
EDMSelect getAttrBN(java.lang.String attrName) throws EdmiException
Retrieve attribute value for this instanceParameters:attrName - name of the attributeReturns:the attribute valueThrows:EdmiException - if the method fails
putAttrBN
void putAttrBN(java.lang.String attrName, EDMSelect value) throws EdmiException
set attribute value for this instanceParameters:attrName - name of the attributevalue - new attribute valueThrows:EdmiException - if the method fails
getAttrsBN
EDMSelect[]Â getAttrsBN(java.lang.String[]Â attrNames) throws EdmiException
Retrieve attribute values for this instanceParameters:attrNames - array of attrinbute names to retrieveReturns:the attribute valuesThrows:EdmiException - if the method fails
putAttrsBN
void putAttrsBN(java.lang.String[] attrNames, EDMSelect[] values) throws EdmiException
Set attribute values for this instanceParameters:attrNames - array of attrinbute names to retrievevalues - new attribute values, attrNames[] and values[] must have samne lengthThrows:EdmiException - if the method fails
putProtectedAttrBN
void putProtectedAttrBN(java.lang.String attrName, EDMSelect value) throws EdmiException
Assign a protected attribute value for this instanceParameters:attrName - name of the attributevalue - new value for the attributeThrows:EdmiException - if the method fails
isInstanceOf
boolean isInstanceOf(java.lang.String stype) throws EdmiException
Check instance typeParameters:stype - name to compare withReturns:true if match, false elseThrows:EdmiException - if the method fails
isKindOf
boolean isKindOf(java.lang.String stype) throws EdmiException
Check instance typeParameters:stype - name to compare withReturns:true if match, false elseThrows:EdmiException - if the method fails
setAttrBN
void setAttrBN(java.lang.String name, boolean value) throws EdmiException
Assign an attribute with a booleanParameters:name - attribute namevalue - new attribute valueThrows: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 integerParameters:name - attribute namevalue - new attribute valueThrows: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 integerParameters:name - attribute namevalue - new attribute valueThrows:EdmiException - if not found or illegal to set
setAttrBN
void setAttrBN(java.lang.String name, double value) throws EdmiException
Assign an attribute with a realParameters:name - attribute namevalue - new attribute valueThrows: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 stringParameters:name - attribute namevalue - new attribute valueThrows: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 instanceParameters:attrName - name of the attributeReturns:true isf attribute is setThrows:EdmiException - if the method fails
testAttrsBN
boolean[]Â testAttrsBN(java.lang.String[]Â attrNames) throws EdmiException
Check if nultiple attribute value are set for this instanceParameters:attrNames - array of attrinbute names to retrieveReturns:boolean array indicating if the corresponding attribute is setThrows:EdmiException - if the method fails