|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JcrDAO<T>
The base interface for JCR Data Access Objects.
Normally, the interface will be implemented for each root object being
mapped to a Java Content Repository (JCR).
It is intended that such implementations will manage the JCR root path
for the entity being mapped. JCR session strategy is also to be
declared by implementations.
Implementations should encapsulate exceptions in JcrMappingException, which
is a RuntimeException.
| Method Summary | |
|---|---|
T |
create(java.lang.String parentNodePath,
T entity)
Creates a new JCR Node from the object supplied, under the parent node with the path specified. |
T |
create(T entity)
Creates a new JCR Node from the object supplied. |
boolean |
exists(java.lang.String path)
Check whether an entity with the path supplied exists in JCR. |
java.util.List<T> |
findAll(java.lang.String rootPath)
Find all entities represented by this DAO. |
java.util.List<T> |
findAll(java.lang.String rootPath,
long startIndex,
long resultSize)
Find all entities represented by this DAO. |
java.util.List<T> |
findAll(java.lang.String rootPath,
java.lang.String childNameFilter,
int maxDepth)
Find all entities represented by this DAO. |
java.util.List<T> |
findAll(java.lang.String rootPath,
java.lang.String childNameFilter,
int maxDepth,
long startIndex,
long resultSize)
Find all entities represented by this DAO. |
T |
get(java.lang.String path)
Get an entity from JCR by path (from a @JcrPath field). |
T |
get(java.lang.String path,
java.lang.String childNodeFilter,
int maxDepth)
Get an entity from JCR by path (from a @JcrPath field). |
long |
getSize(java.lang.String rootPath)
Get the number of entities. |
T |
getVersion(java.lang.String path,
java.lang.String versionName)
|
T |
getVersion(java.lang.String path,
java.lang.String versionName,
java.lang.String childNodeFilter,
int maxDepth)
|
T |
getVersionByUUID(java.lang.String uuid,
java.lang.String versionName)
|
T |
getVersionByUUID(java.lang.String uuid,
java.lang.String versionName,
java.lang.String childNodeFilter,
int maxDepth)
|
java.util.List<T> |
getVersionList(java.lang.String path)
|
java.util.List<T> |
getVersionList(java.lang.String path,
java.lang.String childNameFilter,
int maxDepth)
|
java.util.List<T> |
getVersionList(java.lang.String path,
java.lang.String childNameFilter,
int maxDepth,
long startIndex,
long resultSize)
|
java.util.List<T> |
getVersionListByUUID(java.lang.String uuid)
|
java.util.List<T> |
getVersionListByUUID(java.lang.String uuid,
java.lang.String childNameFilter,
int maxDepth)
|
java.util.List<T> |
getVersionListByUUID(java.lang.String uuid,
java.lang.String childNameFilter,
int maxDepth,
long startIndex,
long resultSize)
|
long |
getVersionSize(java.lang.String path)
|
long |
getVersionSizeByUUID(java.lang.String uuid)
|
T |
loadByUUID(java.lang.String uuid)
Load an entity from JCR by UUID lookup. |
T |
loadByUUID(java.lang.String uuid,
java.lang.String childNodeFilter,
int maxDepth)
Load an entity from JCR by UUID lookup. |
void |
move(T entity,
java.lang.String newParentPath)
Move an entity to the parent with the path specified. |
void |
remove(java.lang.String path)
Permanently remove the entity with the path supplied (from a @JcrPath field). |
void |
removeByUUID(java.lang.String uuid)
Permanently remove the entity with the UUID supplied. |
void |
removeVersion(java.lang.String path,
java.lang.String versionName)
|
void |
removeVersionByUUID(java.lang.String uuid,
java.lang.String versionName)
|
void |
restoreVersion(java.lang.String path,
java.lang.String versionName)
|
void |
restoreVersion(java.lang.String path,
java.lang.String versionName,
boolean removeExisting)
|
void |
restoreVersionByUUID(java.lang.String uuid,
java.lang.String versionName)
|
void |
restoreVersionByUUID(java.lang.String uuid,
java.lang.String versionName,
boolean removeExisting)
|
java.lang.String |
update(T entity)
Updates an existing JCR Node with the values extracted from the object supplied. |
java.lang.String |
update(T entity,
java.lang.String childNameFilter,
int maxDepth)
Updates an existing JCR Node with the values extracted from the object supplied. |
java.lang.String |
updateByUUID(T entity,
java.lang.String uuid)
Updates an existing JCR Node with the values extracted from the object supplied. |
java.lang.String |
updateByUUID(T entity,
java.lang.String uuid,
java.lang.String childNameFilter,
int maxDepth)
Updates an existing JCR Node with the values extracted from the object supplied. |
| Method Detail |
|---|
T create(T entity)
entity - the object to be mapped to a JCR node
T create(java.lang.String parentNodePath,
T entity)
parentNodePath - path to the parent nodeentity - the object to be mapped to a JCR node
java.lang.String update(T entity)
entity - the object to be mapped to a JCR node
java.lang.String update(T entity,
java.lang.String childNameFilter,
int maxDepth)
entity - the object to be mapped to a JCR nodechildNameFilter - comma separated list of names of child nodes to
load ("*" loads all, "none" loads no children, and "-" at the beginning
makes it an exclusion filter)maxDepth - the maximum depth of loaded child nodes (0 means no
child nodes are loaded, while a negative value means that no
restrictions are set on the depth).
java.lang.String updateByUUID(T entity,
java.lang.String uuid)
entity - the object to be mapped to a JCR nodeuuid - the JCR UUID of the node to update
java.lang.String updateByUUID(T entity,
java.lang.String uuid,
java.lang.String childNameFilter,
int maxDepth)
entity - the object to be mapped to a JCR nodeuuid - the UUID of the node to updatechildNameFilter - comma separated list of names of child nodes to
load ("*" loads all, "none" loads no children, and "-" at the beginning
makes it an exclusion filter)maxDepth - the maximum depth of loaded child nodes (0 means no
child nodes are loaded, while a negative value means that no
restrictions are set on the depth).
void move(T entity,
java.lang.String newParentPath)
entity - newParentPath - void remove(java.lang.String path)
path - the full path of the entityvoid removeByUUID(java.lang.String uuid)
uuid - the JCR UUID of the entityboolean exists(java.lang.String path)
path - the path of the entity
T get(java.lang.String path)
path - the full path of the entity to be loaded
T get(java.lang.String path,
java.lang.String childNodeFilter,
int maxDepth)
path - the full path of the entity to be loadedchildNameFilter - comma separated list of names of child nodes to
load ("*" loads all, "none" loads no children, and "-" at the beginning
makes it an exclusion filter)maxDepth - the maximum depth of loaded child nodes (0 means no
child nodes are loaded, while a negative value means that no
restrictions are set on the depth).
T loadByUUID(java.lang.String uuid)
uuid - the UUID generated by JCR
T loadByUUID(java.lang.String uuid,
java.lang.String childNodeFilter,
int maxDepth)
uuid - the UUID generated by JCR
java.util.List<T> getVersionList(java.lang.String path)
java.util.List<T> getVersionList(java.lang.String path,
java.lang.String childNameFilter,
int maxDepth)
java.util.List<T> getVersionList(java.lang.String path,
java.lang.String childNameFilter,
int maxDepth,
long startIndex,
long resultSize)
java.util.List<T> getVersionListByUUID(java.lang.String uuid)
java.util.List<T> getVersionListByUUID(java.lang.String uuid,
java.lang.String childNameFilter,
int maxDepth)
java.util.List<T> getVersionListByUUID(java.lang.String uuid,
java.lang.String childNameFilter,
int maxDepth,
long startIndex,
long resultSize)
long getVersionSize(java.lang.String path)
long getVersionSizeByUUID(java.lang.String uuid)
T getVersion(java.lang.String path,
java.lang.String versionName)
T getVersion(java.lang.String path,
java.lang.String versionName,
java.lang.String childNodeFilter,
int maxDepth)
T getVersionByUUID(java.lang.String uuid,
java.lang.String versionName)
T getVersionByUUID(java.lang.String uuid,
java.lang.String versionName,
java.lang.String childNodeFilter,
int maxDepth)
void restoreVersion(java.lang.String path,
java.lang.String versionName)
void restoreVersionByUUID(java.lang.String uuid,
java.lang.String versionName)
void restoreVersion(java.lang.String path,
java.lang.String versionName,
boolean removeExisting)
void restoreVersionByUUID(java.lang.String uuid,
java.lang.String versionName,
boolean removeExisting)
void removeVersion(java.lang.String path,
java.lang.String versionName)
void removeVersionByUUID(java.lang.String uuid,
java.lang.String versionName)
long getSize(java.lang.String rootPath)
java.util.List<T> findAll(java.lang.String rootPath)
java.util.List<T> findAll(java.lang.String rootPath,
long startIndex,
long resultSize)
startIndex - the zero based index of the first item to returnresultSize - the number of items to return
java.util.List<T> findAll(java.lang.String rootPath,
java.lang.String childNameFilter,
int maxDepth)
childNameFilter - comma separated list of names of child nodes to
load ("*" loads all, "none" loads no children, and "-" at the beginning
makes it an exclusion filter)maxDepth - the maximum depth of loaded child nodes (0 means no
child nodes are loaded, while a negative value means that no
restrictions are set on the depth).
java.util.List<T> findAll(java.lang.String rootPath,
java.lang.String childNameFilter,
int maxDepth,
long startIndex,
long resultSize)
childNameFilter - comma separated list of names of child nodes to
load ("*" loads all, "none" loads no children, and "-" at the beginning
makes it an exclusion filter)maxDepth - the maximum depth of loaded child nodes (0 means no
child nodes are loaded, while a negative value means that no
restrictions are set on the depth).startIndex - the zero based index of the first item to returnresultSize - the number of items to return
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||