|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PersistenceManager
The persistence manager encapsulates a JCR session. This is the main component used to manage objects into the JCR repository.
| Method Summary | |
|---|---|
void |
addVersionLabel(java.lang.String path,
java.lang.String versionName,
java.lang.String versionLabel)
Add a new label to a particular version |
void |
checkin(java.lang.String path)
Checkin an object |
void |
checkin(java.lang.String path,
java.lang.String[] versionLabels)
Checkin an object and apply some labels to this new version Within a particular object path, a given label may appear a maximum of once |
void |
checkout(java.lang.String path)
Checkout - Create a new version This is only possible if the object is based on mix:versionable node type |
java.lang.String[] |
getAllVersionLabels(java.lang.String path)
Get all version labels assigned to all versions |
VersionIterator |
getAllVersions(java.lang.String path)
Get all object versions |
Version |
getBaseVersion(java.lang.String path)
Get the lastest object version |
java.lang.Object |
getObject(java.lang.Class objectClass,
java.lang.String path)
Get an object from the JCR repository |
java.lang.Object |
getObject(java.lang.Class objectClass,
java.lang.String path,
java.lang.String versionNumber)
Get an object from the JCR repository |
java.lang.Object |
getObject(Query query)
Retrieve an object matching to a query |
java.lang.Object |
getObject(java.lang.String path)
Get an object from the JCR repository |
java.lang.Object |
getObject(java.lang.String path,
java.lang.String versionNumber)
Get an object from the JCR repository |
java.util.Iterator |
getObjectIterator(Query query)
Retrieve some objects matching to a query. |
java.util.Collection |
getObjects(Query query)
Retrieve some objects matching to a query |
QueryManager |
getQueryManager()
|
Version |
getRootVersion(java.lang.String path)
Get the first object version |
Version |
getVersion(java.lang.String path,
java.lang.String versionName)
Get a particular version |
java.lang.String[] |
getVersionLabels(java.lang.String path,
java.lang.String versionName)
Get all version labels assigned to a particular object version |
void |
insert(java.lang.Object object)
Insert an object into the JCR repository |
boolean |
isLocked(java.lang.String absPath)
Is that path locked? |
boolean |
isPersistent(java.lang.Class clazz)
Can this persistence manager insert, update, delete, ... |
java.lang.String |
lock(java.lang.String path,
boolean isDeep,
boolean isSessionScoped)
Lock object saved on . |
void |
logout()
Close the session |
boolean |
objectExists(java.lang.String path)
Check if an object exists |
void |
remove(java.lang.Object object)
Remove an object from a JCR repository |
void |
remove(Query query)
Remove all objects matching to a query |
void |
remove(java.lang.String path)
Remove an object from a JCR repository |
void |
retrieveAllMappedAttributes(java.lang.Object object)
Retrieve all mapped attributes for the given persistent object. |
void |
retrieveMappedAttribute(java.lang.Object object,
java.lang.String attributeName)
Retrieve the specified attribute for the given persistent object. |
void |
save()
Save all modifications made by the persistence manager |
void |
unlock(java.lang.String path,
java.lang.String lockToken)
Unlock object stored on . |
void |
update(java.lang.Object object)
Update an object |
| Method Detail |
|---|
boolean objectExists(java.lang.String path)
throws PersistenceException
path - the object path
PersistenceException - when it is not possible to check if the item existboolean isPersistent(java.lang.Class clazz)
clazz - class for question
true if the class is persistence
void insert(java.lang.Object object)
throws PersistenceException
object - the object to add
PersistenceException - when it is not possible to insert the object
void update(java.lang.Object object)
throws PersistenceException
object - the object to update
PersistenceException - when it is not possible to update the object
java.lang.Object getObject(java.lang.String path)
throws PersistenceException
path - the object path
PersistenceException - when it is not possible to retrieve the object
java.lang.Object getObject(java.lang.String path,
java.lang.String versionNumber)
throws PersistenceException
path - the object pathversionNumber - The desired object version number
PersistenceException - when it is not possible to retrieve the object
java.lang.Object getObject(java.lang.Class objectClass,
java.lang.String path)
throws PersistenceException
objectClass - the object classpath - the object path
PersistenceException - when it is not possible to retrieve the object
java.lang.Object getObject(java.lang.Class objectClass,
java.lang.String path,
java.lang.String versionNumber)
throws PersistenceException
objectClass - the object classpath - the object pathversionNumber - The desired object version number
PersistenceException - when it is not possible to retrieve the object
void retrieveMappedAttribute(java.lang.Object object,
java.lang.String attributeName)
object - The persistent objectattributeName - The name of the attribute to retrievevoid retrieveAllMappedAttributes(java.lang.Object object)
object - The persistent object
void remove(java.lang.String path)
throws PersistenceException
path - the object path
PersistenceException - when it is not possible to remove the object
void remove(java.lang.Object object)
throws PersistenceException
object - the object to remove
PersistenceException - when it is not possible to remove the object
void remove(Query query)
throws PersistenceException
query - The query used to find the objects to remove
PersistenceException - when it is not possible to remove all objects
java.lang.Object getObject(Query query)
throws PersistenceException
query - The Graffito Query object used to seach the object
PersistenceException - when it is not possible to retrieve the object
java.util.Collection getObjects(Query query)
throws PersistenceException
query - The query used to seach the objects
PersistenceException - when it is not possible to retrieve the objects
java.util.Iterator getObjectIterator(Query query)
throws PersistenceException
query - The query used to seach the objects
PersistenceException - when it is not possible to retrieve the objects
void checkout(java.lang.String path)
throws javax.jcr.version.VersionException
path - The object path
javax.jcr.version.VersionException - when it is not possible to create a new version
void checkin(java.lang.String path)
throws javax.jcr.version.VersionException
path - the object path
javax.jcr.version.VersionException - when it is not possible to checkin
void checkin(java.lang.String path,
java.lang.String[] versionLabels)
throws javax.jcr.version.VersionException
path - The object pathversionLabels - the version labels to apply to the new version
javax.jcr.version.VersionException - when it is possible to checkin
java.lang.String[] getVersionLabels(java.lang.String path,
java.lang.String versionName)
throws javax.jcr.version.VersionException
path - the object pathversionName - the object version name (1.0, ...)
javax.jcr.version.VersionException - when it is not to get all version labels
java.lang.String[] getAllVersionLabels(java.lang.String path)
throws javax.jcr.version.VersionException
path - the object path
javax.jcr.version.VersionException - when it is not to get all version labels
void addVersionLabel(java.lang.String path,
java.lang.String versionName,
java.lang.String versionLabel)
throws javax.jcr.version.VersionException
path - the object pathversionName - the object versio name (1.0, 1.1, ...)versionLabel - The new label to apply
javax.jcr.version.VersionException - when it is not possible to add a new version label to this version
VersionIterator getAllVersions(java.lang.String path)
throws javax.jcr.version.VersionException
path - the object path
javax.jcr.version.VersionException - when it is not possible to retrieve all versions
Version getRootVersion(java.lang.String path)
throws javax.jcr.version.VersionException
path - the object path
javax.jcr.version.VersionException - when it is not possible to get the root version
Version getBaseVersion(java.lang.String path)
throws javax.jcr.version.VersionException
path - the object path
javax.jcr.version.VersionException - when it is not possible to get the last version
Version getVersion(java.lang.String path,
java.lang.String versionName)
throws javax.jcr.version.VersionException
path - the object pathversionName - the version name
javax.jcr.version.VersionException - when it is not possible to retrieve this particular version
void save()
throws PersistenceException
PersistenceException - when it is not possible to save all pending operation into the JCR repo
void logout()
throws PersistenceException
PersistenceException - when it is not possible to logout
java.lang.String lock(java.lang.String path,
boolean isDeep,
boolean isSessionScoped)
throws LockedException
path - path to saved object.isDeep - is lock deep? See JCR spec: 8.4.3 Shallow and Deep LocksisSessionScoped - is lock session scoped? See JCR spec: Session-scoped and Open-scoped Locks
LockedException - if path is locked (cannot lock same path again)
void unlock(java.lang.String path,
java.lang.String lockToken)
throws IllegalUnlockException
path - path to stored objectlockToken - see JCR spec: 8.4.6 Lock Token; can be null
IllegalUnlockException - throws if the current operation does not own the current lockboolean isLocked(java.lang.String absPath)
absPath -
true if path lockedQueryManager getQueryManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||