|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.surf.ModelObjectManager
public final class ModelObjectManager
Provides core services for loading, retrieving and persisting model objects to one or more back-end Stores.
A model object type has an associated search path id. The search path defines the set of stores from which objects of a given model type can be loaded.
Loaded model objects are bound to a particular store and will be persisted back to that store unless copied or moved.
New model objects are created within a given store or they are created within the default store for the particular model object type (this is defined in configuration).
Method Summary | |
---|---|
Map<String,ModelObject> |
getAllObjects(String objectTypeId)
Retrieves all objects of a given type id. |
Map<String,ModelObject> |
getAllObjects(String objectTypeId,
String filter)
Retrieves all objects of a given type id with the given object ID filter |
ModelPersistenceContext |
getContext()
Returns the model persistence context |
ModelObject |
getObject(String objectTypeId,
String objectId)
Retrieves an object from the persister that manages the given object type. |
void |
invalidateCache()
Invalidates the cache for all persisters in this persistence context |
ModelObject |
newObject(String objectTypeId)
Create a new object. |
ModelObject |
newObject(String objectTypeId,
String objectId)
Create a new object. |
boolean |
removeObject(ModelObject object)
Removes the object. |
boolean |
removeObject(String objectTypeId,
String objectId)
Removes the object. |
boolean |
saveObject(ModelObject object)
Saves the object to its persister. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ModelPersistenceContext getContext()
public ModelObject getObject(String objectTypeId, String objectId)
If the object is not available in cache, it is loaded from storage.
objectTypeId
- the object type idobjectId
- the object id
public ModelObject newObject(String objectTypeId, String objectId)
objectTypeId
- the object type idobjectId
- the object id
public ModelObject newObject(String objectTypeId)
objectTypeId
- the object type id
public boolean saveObject(ModelObject object)
object
- the ModelObject to savepublic boolean removeObject(ModelObject object)
object
- the ModelObject to remove
public boolean removeObject(String objectTypeId, String objectId)
objectTypeId
- the object type idobjectId
- the object id
public Map<String,ModelObject> getAllObjects(String objectTypeId)
objectTypeId
- Type ID
public Map<String,ModelObject> getAllObjects(String objectTypeId, String filter)
objectTypeId
- the object type id
public void invalidateCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |