|
||||||||||
| 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()
|
|
|
create(Class<O> clazz)
Creates a transient instance of the specified object. |
|
|
create(Class<O> clazz,
String name)
Creates a transient instance of the specified object. |
|
QueryBuilder<?> |
createQueryBuilder()
|
|
|
findById(Class<O> clazz,
String id)
Finds an object from its identifier or return null if no such object can be found. |
|
|
findByNode(Class<O> clazz,
javax.jcr.Node node)
Finds an object mapped to the provided node. |
|
|
findByPath(Class<O> clazz,
String relPath)
Finds an object with a path relative to a chromattic root object. |
|
|
findByPath(Object origin,
Class<O> clazz,
String relPath)
Finds an object with a path relative to a specified origin object. |
|
String |
getId(Object o)
|
|
javax.jcr.Session |
getJCRSession()
|
|
String |
getName(Object o)
|
|
String |
getPath(Object o)
|
|
Status |
getStatus(Object o)
|
|
|
insert(Class<O> clazz,
String name)
Creates a persistent instance of the specified object. |
|
|
insert(Object parent,
Class<O> clazz,
String name)
Creates a persistent instance of the specified object. |
|
String |
persist(Object o)
Persists a transient object relative to the root node. |
|
String |
persist(Object parent,
Object child)
Persists a transient object. |
|
String |
persist(Object parent,
Object o,
String name)
Persists a transient object. |
|
String |
persist(Object o,
String name)
Persists a transient object. |
|
void |
remove(Object o)
|
|
void |
save()
|
|
| Method Detail |
|---|
<O> O create(Class<O> clazz)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
clazz - the object class
NullPointerException - if the specified clazz is null
IllegalArgumentException - if the specified class is not a chromattic class
ChromatticException - any chromattic exception
<O> O create(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
O - the object class parameterclazz - the object classname - the node name
NullPointerException - if the clazz argument is null
IllegalArgumentException - if the name format is not valid or the class is not a chromattic class
ChromatticException - any chromattic exception
<O> O insert(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
O - the object class parameterclazz - the object classname - the name under root node
NullPointerException - if any argument is null
IllegalArgumentException - if the name is not valid or the class is not a chromattic class
ChromatticException - any chromattic exception
<O> O insert(Object parent,
Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
O - the object class parameterparent - the parent objectclazz - the object classname - the object name
NullPointerException - if any argument is null
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
String persist(Object o,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
o - the object to persistname - the object relative path to the root
NullPointerException - if any argument is null
IllegalArgumentException - if the name is not valid or the object is not a chromattic transient object
ChromatticException - any chromattic exception
String persist(Object parent,
Object child)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
parent - the parent objectchild - the object to persist
NullPointerException - if any argument is not valid
IllegalArgumentException - if the parent is not a persistent object or the object is not a chromattic transient object
ChromatticException - any chromattic exception
String persist(Object o)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
o - the object to persist
NullPointerException - if any argument is not valid
IllegalArgumentException - if the object is not a chromattic transient object
ChromatticException - any chromattic exception
String persist(Object parent,
Object o,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
parent - the parent objecto - the object to persistname - the object relative name to the parent
NullPointerException - if the parent or object argument is null
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 findByPath(Object origin,
Class<O> clazz,
String relPath)
throws NullPointerException,
IllegalArgumentException,
ClassCastException,
ChromatticException
O - the object typeorigin - the origin objectclazz - the expected classrelPath - the path relative to the origin
NullPointerException - if any argument is null
IllegalArgumentException - if the origin object is not a chromattic object
ClassCastException - if the object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findByPath(Class<O> clazz,
String relPath)
throws NullPointerException,
ClassCastException,
ChromatticException
O - the object typeclazz - the expected classrelPath - the path relative to the chromattic root
NullPointerException - if any argument is null
ClassCastException - if the object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findByNode(Class<O> clazz,
javax.jcr.Node node)
throws NullPointerException,
ClassCastException,
ChromatticException
O - the object typeclazz - the expected classnode - the node
NullPointerException - if any argument is null
ClassCastException - if the mapped object cannot be cast to the specified class
ChromatticException - any chromattic exception
<O> O findById(Class<O> clazz,
String id)
throws NullPointerException,
ClassCastException,
ChromatticException
O - the object typeclazz - the expected classid - the id
NullPointerException - if any argument is null
ClassCastException - if the mapped object cannot be cast to the specified class
ChromatticException - any chromattic exception
QueryBuilder<?> createQueryBuilder()
throws ChromatticException
ChromatticException
void remove(Object o)
throws ChromatticException
ChromatticException
Status getStatus(Object o)
throws ChromatticException
ChromatticException
String getId(Object o)
throws ChromatticException
ChromatticException
String getName(Object o)
throws ChromatticException
ChromatticException
String getPath(Object o)
throws ChromatticException
ChromatticExceptionvoid 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 | |||||||||