|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ChromatticSession
| Method Summary | ||
|---|---|---|
void |
addEventListener(EventListener listener)
|
|
void |
close()
|
|
|
copy(java.lang.Object parent,
O o,
java.lang.String name)
Clones a persistent object into a new persistent object. |
|
|
copy(O o,
java.lang.String name)
Clones a persistent object into a new persistent object. |
|
|
create(java.lang.Class<O> clazz)
Creates a transient instance of the specified object. |
|
|
create(java.lang.Class<O> clazz,
java.lang.String name)
Creates a transient instance of the specified object. |
|
|
createQueryBuilder(java.lang.Class<O> fromClass)
Create a query builder. |
|
|
findById(java.lang.Class<O> clazz,
java.lang.String id)
Finds an object from its identifier or return null if no such object can be found. |
|
|
findByNode(java.lang.Class<O> clazz,
javax.jcr.Node node)
Finds an object mapped to the provided node. |
|
|
findByPath(java.lang.Class<O> clazz,
java.lang.String relPath)
Finds an object with a path relative to a chromattic root object. |
|
|
findByPath(java.lang.Class<O> clazz,
java.lang.String path,
boolean absolute)
Finds an object given its specified path. |
|
|
findByPath(java.lang.Object origin,
java.lang.Class<O> clazz,
java.lang.String relPath)
Finds an object with a path relative to a specified origin object. |
|
|
getEmbedded(java.lang.Object o,
java.lang.Class<E> embeddedType)
Returns a specified embedded object. |
|
java.lang.String |
getId(java.lang.Object o)
Returns the id of a specified entity. |
|
javax.jcr.Session |
getJCRSession()
|
|
java.lang.String |
getName(java.lang.Object o)
Returns the name of a specified entity. |
|
java.lang.String |
getPath(java.lang.Object o)
Returns the path of a specified entity. |
|
Status |
getStatus(java.lang.Object o)
Returns the status of a specified entity. |
|
|
insert(java.lang.Class<O> clazz,
java.lang.String name)
Creates a persistent instance of the specified object. |
|
|
insert(java.lang.Object parent,
java.lang.Class<O> clazz,
java.lang.String name)
Creates a persistent instance of the specified object. |
|
java.lang.String |
persist(java.lang.Object o)
Persists a transient object relative to the root node. |
|
java.lang.String |
persist(java.lang.Object parent,
java.lang.Object child)
Persists a transient object. |
|
java.lang.String |
persist(java.lang.Object parent,
java.lang.Object o,
java.lang.String name)
Persists a transient object. |
|
java.lang.String |
persist(java.lang.Object o,
java.lang.String name)
Persists a transient object. |
|
void |
remove(java.lang.Object o)
Removes a specified entity. |
|
void |
save()
|
|
|
setEmbedded(java.lang.Object o,
java.lang.Class<E> embeddedType,
E embedded)
Attach the specified embedded object on the specified object when the embedded argument. |
|
| Method Detail |
|---|
<O> O create(java.lang.Class<O> clazz)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
clazz - the object class
java.lang.NullPointerException - if the specified clazz is null
java.lang.IllegalArgumentException - if the specified class is not a chromattic class
ChromatticException - any chromattic exception
<O> O create(java.lang.Class<O> clazz,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
O - the object class parameterclazz - the object classname - the node name
java.lang.NullPointerException - if the clazz argument is null
java.lang.IllegalArgumentException - if the name format is not valid or the class is not a chromattic class
ChromatticException - any chromattic exception
<O> O insert(java.lang.Class<O> clazz,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
O - the object class parameterclazz - the object classname - the name under root node
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if the name is not valid or the class is not a chromattic class
ChromatticException - any chromattic exception
<O> O insert(java.lang.Object parent,
java.lang.Class<O> clazz,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
O - the object class parameterparent - the parent objectclazz - the object classname - the object name
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if the name is not valid or the class is not a chromattic class or the parent is
not a persistent object
ChromatticException - any chromattic exception
java.lang.String persist(java.lang.Object o,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the object to persistname - the object relative path to the root
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if the name is not valid or the object is not a chromattic transient object
ChromatticException - any chromattic exception
java.lang.String persist(java.lang.Object parent,
java.lang.Object child)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
parent - the parent objectchild - the object to persist
java.lang.NullPointerException - if any argument is not valid
java.lang.IllegalArgumentException - if the parent is not a persistent object or the object is not a chromattic transient object
ChromatticException - any chromattic exception
java.lang.String persist(java.lang.Object o)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the object to persist
java.lang.NullPointerException - if any argument is not valid
java.lang.IllegalArgumentException - if the object is not a chromattic transient object
ChromatticException - any chromattic exception
java.lang.String persist(java.lang.Object parent,
java.lang.Object o,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
parent - the parent objecto - the object to persistname - the object relative name to the parent
java.lang.NullPointerException - if the parent or object argument is null
java.lang.IllegalArgumentException - if the parent is not a persistent object or the name is not valid or the object
is not a chromattic transient object
ChromatticException - any chromattic exception
<O> O copy(java.lang.Object parent,
O o,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
O - the object typeparent - the parent objecto - the object to clonename - the object name
java.lang.NullPointerException - if the parent or object argument is null
java.lang.IllegalArgumentException - if the parent is not a persistent object or the name is not valid or the object
is not a chromattic persistent object
ChromatticException - any chromattic exception
<O> O copy(O o,
java.lang.String name)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
O - the object typeo - the object to clonename - the object name
java.lang.NullPointerException - if the parent or object argument is null
java.lang.IllegalArgumentException - if the parent is not a persistent object or the name is not valid or the object
is not a chromattic persistent object
ChromatticException - any chromattic exception
<O> O findByPath(java.lang.Object origin,
java.lang.Class<O> clazz,
java.lang.String relPath)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
java.lang.ClassCastException,
ChromatticException
O - the object typeorigin - the origin objectclazz - the expected classrelPath - the path relative to the origin
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if the origin object is not a chromattic object
java.lang.ClassCastException - if the object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findByPath(java.lang.Class<O> clazz,
java.lang.String relPath)
throws java.lang.NullPointerException,
java.lang.ClassCastException,
ChromatticException
O - the object typeclazz - the expected classrelPath - the path relative to the chromattic root
java.lang.NullPointerException - if any argument is null
java.lang.ClassCastException - if the object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findByPath(java.lang.Class<O> clazz,
java.lang.String path,
boolean absolute)
throws java.lang.NullPointerException,
java.lang.ClassCastException,
ChromatticException
absolute method parameter. When the object
is not found the method returns null.
O - the object typeclazz - the expected classpath - the path relative to the chromattic rootabsolute - true when an absolute path must be provided
java.lang.NullPointerException - if any argument is null
java.lang.ClassCastException - if the object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findByNode(java.lang.Class<O> clazz,
javax.jcr.Node node)
throws java.lang.NullPointerException,
java.lang.ClassCastException,
ChromatticException
O - the object typeclazz - the expected classnode - the node
java.lang.NullPointerException - if any argument is null
java.lang.ClassCastException - if the mapped object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findById(java.lang.Class<O> clazz,
java.lang.String id)
throws java.lang.NullPointerException,
java.lang.ClassCastException,
ChromatticException
O - the object typeclazz - the expected classid - the id
java.lang.NullPointerException - if any argument is null
java.lang.ClassCastException - if the mapped object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> QueryBuilder<O> createQueryBuilder(java.lang.Class<O> fromClass)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
O - the object type parameterfromClass - the node type of the from clause
java.lang.NullPointerException - if the argument is null
java.lang.IllegalArgumentException - if the from class cannot be mapped to a node type
ChromatticException - any chromattic exception
void remove(java.lang.Object o)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the entity to remove
ChromatticException - any chromattic exception
java.lang.NullPointerException - if the specified object is null
java.lang.IllegalArgumentException - if the specified object is not a chromattic object
Status getStatus(java.lang.Object o)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the entity to get the status
ChromatticException - any chromattic exception
java.lang.NullPointerException - if the specified object is null
java.lang.IllegalArgumentException - if the specified object is not a chromattic object
java.lang.String getId(java.lang.Object o)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the entity to get the id
ChromatticException - any chromattic exception
java.lang.NullPointerException - if the specified object is null
java.lang.IllegalArgumentException - if the specified object is not a chromattic object
java.lang.String getName(java.lang.Object o)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the entity to get the name
ChromatticException - any chromattic exception
java.lang.NullPointerException - if the specified object is null
java.lang.IllegalArgumentException - if the specified object is not a chromattic object
java.lang.String getPath(java.lang.Object o)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
o - the entity to get the path
ChromatticException - any chromattic exception
java.lang.NullPointerException - if the specified object is null
java.lang.IllegalArgumentException - if the specified object is not a chromattic object
<E> E getEmbedded(java.lang.Object o,
java.lang.Class<E> embeddedType)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
E - the embedded typeo - the object to get the embedded fromembeddedType - the embedded type class
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if the specified object is not a chromattic object
ChromatticException - any chromattic exception
<E> void setEmbedded(java.lang.Object o,
java.lang.Class<E> embeddedType,
E embedded)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
ChromatticException
E - the embedded typeo - the objectembeddedType - the embedded type classembedded - the embedded
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if the object or the embedded are not chromattic objects
ChromatticException - any chromattic exceptionvoid addEventListener(EventListener listener)
void save()
throws ChromatticException
ChromatticExceptionvoid close()
javax.jcr.Session getJCRSession()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||