|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModelObjectPersister
Method Summary | |
---|---|
Map<String,ModelObject> |
getAllObjects(ModelPersistenceContext context,
String objectTypeId)
Returns a map of all of the objects referenced by this persister. |
Map<String,ModelObject> |
getAllObjectsByFilter(ModelPersistenceContext context,
String objectTypeId,
String objectIdPattern)
Returns a map of all of the objects referenced by this persister filtered by the given ID filter. |
String |
getId()
Returns a unique id for this persister If this persister is wrapped around a ClassPath store, a LocalFileSystem store or a Repository store, this will return the value provided getBasePath() If this is wrapped around a RemoteStore, this will return the AVM Store ID to which this persister is bound |
ModelObject |
getObject(ModelPersistenceContext context,
String objectTypeId,
String objectId)
Gets an object from persisted storage by id |
long |
getTimestamp(ModelPersistenceContext context,
String objectTypeId,
String objectId)
Returns the timestamp of the given object in the underlying store |
boolean |
hasObject(ModelPersistenceContext context,
ModelObject object)
Checks whether the given object is persisted |
boolean |
hasObject(ModelPersistenceContext context,
String objectTypeId,
String objectId)
Checks whether an object with the given path is persisted |
void |
init(ModelPersistenceContext context)
Initializes the persister by preloading the object cache |
boolean |
isEnabled()
Indicates whether this persisted is currently enabled. |
ModelObject |
newObject(ModelPersistenceContext context,
String objectTypeId,
String objectId)
Creates a new object |
boolean |
removeObject(ModelPersistenceContext context,
ModelObject object)
Removes an object from persisted storage |
boolean |
removeObject(ModelPersistenceContext context,
String objectTypeId,
String objectId)
Removes an object from persisted storage |
void |
reset()
Resets the persister, clearing cache and starting anew. |
boolean |
saveObject(ModelPersistenceContext context,
ModelObject object)
Saves an object to persisted storage |
Method Detail |
---|
void init(ModelPersistenceContext context)
context
- the persistence contextvoid reset()
String getId()
ModelObject getObject(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException
context
- objectTypeId
- objectId
-
ModelObjectPersisterException
boolean saveObject(ModelPersistenceContext context, ModelObject object) throws ModelObjectPersisterException
context
- object
-
ModelObjectPersisterException
boolean removeObject(ModelPersistenceContext context, ModelObject object) throws ModelObjectPersisterException
context
- object
-
ModelObjectPersisterException
boolean removeObject(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException
context
- objectTypeId
- objectId
-
ModelObjectPersisterException
boolean hasObject(ModelPersistenceContext context, ModelObject object) throws ModelObjectPersisterException
context
- object
-
ModelObjectPersisterException
boolean hasObject(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException
context
- objectTypeId
- objectId
-
ModelObjectPersisterException
ModelObject newObject(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException
context
- objectTypeId
- objectId
-
ModelObjectPersisterException
Map<String,ModelObject> getAllObjects(ModelPersistenceContext context, String objectTypeId) throws ModelObjectPersisterException
In general, this is a very expensive call and should be avoided. Each object descriptor referenced by the persister is loaded into the model object cache.
context
- objectTypeId
-
ModelObjectException
ModelObjectPersisterException
Map<String,ModelObject> getAllObjectsByFilter(ModelPersistenceContext context, String objectTypeId, String objectIdPattern) throws ModelObjectPersisterException
In general, this is an expensive call but less expensive than getAllObjects(). Each object descriptor referenced by the persister found using the filter is loaded into the model object cache.
context
- objectTypeId
- objectIdPattern
-
ModelObjectException
ModelObjectPersisterException
long getTimestamp(ModelPersistenceContext context, String objectTypeId, String objectId) throws ModelObjectPersisterException
context
- objectTypeId
- objectId
-
ModelObjectPersisterException
boolean isEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |