EDMModel
edm.edom3
Interface EDMModel
All Superinterfaces:EDMContextDependent, EDMData, EDMInstance
public interface EDMModel extends EDMInstance
This interface represents a existing or non-existing model in local or remote context. Mostly used for local/remote interchange operations (now).
Method Summary
All Methods Instance Methods Abstract Methods Deprecated MethodsÂ
Modifier and Type Method and Description void
closeModel()
This method will close the model.void
create(EDMSchema schema, long options)
Create a model in the database with default string encoding.void
create(EDMSchema schema, java.lang.String encoding, int options)
Deprecated.Â
Use create(EDMSchema schema,int options), encoding must be given as an optionEDMInstance
createInstance(java.lang.String entityName)
Create an instance in this modelEDMInstance
createInstance(java.lang.String entityName, java.lang.String[] attrNames, EDMSelect[] values)
Create an instance in this model and optionally assign attributes.void
delete()
Delete this model.void
deleteContents()
Delete contents of this model.java.lang.String
getEDMEncoding()
Get encoding for this model.EDMAggregate
getEntityExtent(java.lang.String entityName)
Returns all of the instances of the given entity name (Entity Extent).EDMModel
getHeaderModel()
Check open mode (normally only used in LOCAL contexts )int
getOpenMode()
Check open mode, normally only used in LOCAL contexts.EDMRepository
getRepository()
Gets the repository containig this modelEDMExpressSchema
getUnderlyingSchema()
Retrieve underlying schema for this modelvoid
openModel(int openMode)
This method will open the model based on the given model.void
setEDMEncoding(java.lang.String s)
Deprecated.Â
encoding should be set when a model is created, and read from model meta data when retrieving data. Kept for backward compatibility.void
setHeaderModel(EDMModel headerModel)
Assigns a header to the modelvoid
setOpenMode(int openMode)
Open or close model with specified mode, normally only used in LOCAL contexts.Methods inherited from interface edm.edom3.EDMInstance
create, createAggrAttrBN, delete, getAccessManager, getAttrBN, getAttrsBN, getInstanceReferences, getInstanceType, isInstanceOf, isKindOf, putAttrBN, putAttrsBN, putProtectedAttrBN, setAttrBN, setAttrBN, setAttrBN, setAttrBN, setAttrBN, testAttrBN, testAttrsBN
Methods inherited from interface edm.edom3.EDMData
exists, getInstanceId, getName, getOwner, isLocal, isRemote
Methods inherited from interface edm.edom3.EDMContextDependent
getContext
Method Detail
create
void create(EDMSchema schema, long options) throws EdmiException
Create a model in the database with default string encoding. Remember to set correct options when creating a model.Parameters:schema - schema to use for the new modeloptions - options for creatingThrows:EdmiException - If the method fails.See Also:EDMConstants.CreateModelOptions
create
void create(EDMSchema schema, java.lang.String encoding, int options) throws EdmiException
Deprecated. Use create(EDMSchema schema,int options), encoding must be given as an option
Create a model in the database with given string encoding. Remember to set correct options when creating a model.Parameters:schema - schema to use for the new modelencoding - e string encoding to use for the new modeloptions - options for creatingThrows:EdmiException - If the method fails.See Also:EDMConstants.CreateModelOptions
createInstance
EDMInstance createInstance(java.lang.String entityName) throws EdmiException
Create an instance in this modelParameters:entityName - entity name, caese insensitiveReturns:the created instanceThrows:EdmiException - if the method fails
createInstance
EDMInstance createInstance(java.lang.String entityName, java.lang.String[] attrNames, EDMSelect[] values) throws EdmiException
Create an instance in this model and optionally assign attributes.Parameters:entityName - entity name, caese insensitiveattrNames - array of attrinbute names to retrieve, null if no attrsvalues - new attribute values, attrNames[] and values[] must have same lengthReturns:the created instanceThrows:EdmiException - if the method fails
delete
void delete() throws EdmiException
Delete this model.Throws:EdmiException - if the method fails
deleteContents
void deleteContents() throws EdmiException
Delete contents of this model.Throws:EdmiException - if the method fails
getRepository
EDMRepository getRepository() throws EdmiException
Gets the repository containig this modelReturns:Repository objectThrows:EdmiException - if the method fails
getOpenMode
int getOpenMode() throws EdmiException
Check open mode, normally only used in LOCAL contexts.Returns:current open modeThrows:EdmiException - if the method failsSee Also:EDMConstants.OpenModes
setOpenMode
void setOpenMode(int openMode) throws EdmiException
Open or close model with specified mode, normally only used in LOCAL contexts.Parameters:openMode - requested modeThrows:EdmiException - if the method failsSee Also:EDMConstants.OpenModes
getUnderlyingSchema
EDMExpressSchema getUnderlyingSchema() throws EdmiException
Retrieve underlying schema for this modelReturns:Schema for this modelThrows:EdmiException - if the method fails
getHeaderModel
EDMModel getHeaderModel() throws EdmiException
Check open mode (normally only used in LOCAL contexts )Returns:current open modeThrows:EdmiException - if the method failsSee Also:EDMConstants.OpenModes
setHeaderModel
void setHeaderModel(EDMModel headerModel) throws EdmiException
Assigns a header to the modelParameters:headerModel - header model to assign, null to unassign.Throws:EdmiException - if the method fails
getEDMEncoding
java.lang.String getEDMEncoding()
Get encoding for this model.Returns:encoding name, null if none
setEDMEncoding
void setEDMEncoding(java.lang.String s)
Deprecated. encoding should be set when a model is created, and read from model meta data when retrieving data. Kept for backward compatibility.
Override model encoding as read from EDM. Can be used when utilizing a model object that does not yet exist. It is not possible to set the model encoding in database with this function.Parameters:s - encoding name, null if none
getEntityExtent
EDMAggregate getEntityExtent(java.lang.String entityName) throws EdmiException
Returns all of the instances of the given entity name (Entity Extent).Parameters:entityName - The name of the EntityReturns:aggregate for the entity extentThrows:EdmiException - if entity not found
openModel
void openModel(int openMode) throws EdmiException
This method will open the model based on the given model.Parameters:openMode - AN integer based on EDMCOnstants.openModesThrows:EdmiException - if the method fails
closeModel
void closeModel() throws EdmiException
This method will close the model.Throws:EdmiException - if the method fails