Package 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 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.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.EDMContextDependent
getContext
-
Methods inherited from interface edm.edom3.EDMData
exists, getInstanceId, getName, getOwner, isLocal, isRemote
-
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
-
-
-
-
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 creating- Throws:
EdmiException
- If the method fails.- See Also:
EDMConstants.CreateModelOptions
-
create
@Deprecated 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 optionCreate 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 creating- Throws:
EdmiException
- If the method fails.- See Also:
EDMConstants.CreateModelOptions
-
createInstance
EDMInstance createInstance(java.lang.String entityName) throws EdmiException
Create an instance in this model- Parameters:
entityName
- entity name, caese insensitive- Returns:
- the created instance
- Throws:
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 length- Returns:
- the created instance
- Throws:
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 model- Returns:
- Repository object
- Throws:
EdmiException
- if the method fails
-
getOpenMode
int getOpenMode() throws EdmiException
Check open mode, normally only used in LOCAL contexts.- Returns:
- current open mode
- Throws:
EdmiException
- if the method fails- See 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 mode- Throws:
EdmiException
- if the method fails- See Also:
EDMConstants.OpenModes
-
getUnderlyingSchema
EDMExpressSchema getUnderlyingSchema() throws EdmiException
Retrieve underlying schema for this model- Returns:
- Schema for this model
- Throws:
EdmiException
- if the method fails
-
getHeaderModel
EDMModel getHeaderModel() throws EdmiException
Check open mode (normally only used in LOCAL contexts )- Returns:
- current open mode
- Throws:
EdmiException
- if the method fails- See Also:
EDMConstants.OpenModes
-
setHeaderModel
void setHeaderModel(EDMModel headerModel) throws EdmiException
Assigns a header to the model- Parameters:
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
@Deprecated 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 Entity- Returns:
- aggregate for the entity extent
- Throws:
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.openModes- Throws:
EdmiException
- if the method fails
-
closeModel
void closeModel() throws EdmiException
This method will close the model.- Throws:
EdmiException
- if the method fails
-
-