org.chromattic.core.api
Class ChromatticSessionImpl
java.lang.Object
org.chromattic.core.api.ChromatticSessionImpl
- All Implemented Interfaces:
- ChromatticSession
public final class ChromatticSessionImpl
- extends Object
- implements ChromatticSession
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
void |
addEventListener(EventListener listener)
|
void |
close()
|
|
create(Class<O> clazz)
|
|
create(Class<O> clazz,
String name)
|
|
createQueryBuilder(Class<O> fromClass)
|
|
findById(Class<O> clazz,
String id)
|
|
findByNode(Class<O> clazz,
javax.jcr.Node node)
|
|
findByPath(Class<O> clazz,
String relPath)
|
|
findByPath(Object origin,
Class<O> clazz,
String relPath)
|
Domain |
getDomain()
|
|
getEmbedded(Object o,
Class<E> embeddedType)
|
String |
getId(Object o)
|
javax.jcr.Session |
getJCRSession()
|
String |
getName(Object o)
|
javax.jcr.Node |
getNode(Object o)
|
String |
getPath(Object o)
|
javax.jcr.Node |
getRoot()
|
Status |
getStatus(Object o)
|
|
insert(Class<O> clazz,
String name)
|
|
insert(Object parent,
Class<O> clazz,
String name)
|
String |
persist(Object o)
|
String |
persist(Object parent,
Object child)
|
String |
persist(Object parent,
Object child,
String name)
|
String |
persist(Object o,
String relPath)
|
void |
remove(Object o)
|
void |
save()
|
|
setEmbedded(Object o,
Class<E> embeddedType,
E embedded)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChromatticSessionImpl
public ChromatticSessionImpl(DomainSession domainSession)
getDomain
public final Domain getDomain()
getJCRSession
public javax.jcr.Session getJCRSession()
- Specified by:
getJCRSession in interface ChromatticSession
getId
public String getId(Object o)
throws UndeclaredRepositoryException
- Specified by:
getId in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getName
public String getName(Object o)
throws UndeclaredRepositoryException
- Specified by:
getName in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getPath
public String getPath(Object o)
throws UndeclaredRepositoryException
- Specified by:
getPath in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
create
public <O> O create(Class<O> clazz)
throws NullPointerException,
IllegalArgumentException
- Specified by:
create in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
create
public <O> O create(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException
- Specified by:
create in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
insert
public <O> O insert(Object parent,
Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
insert in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
insert
public <O> O insert(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
UndeclaredRepositoryException
- Specified by:
insert in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
UndeclaredRepositoryException
persist
public String persist(Object parent,
Object child,
String name)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
persist
public String persist(Object parent,
Object child)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
persist
public String persist(Object o)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
persist
public String persist(Object o,
String relPath)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
findByNode
public <O> O findByNode(Class<O> clazz,
javax.jcr.Node node)
throws UndeclaredRepositoryException
- Specified by:
findByNode in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
findById
public <O> O findById(Class<O> clazz,
String id)
throws UndeclaredRepositoryException
- Specified by:
findById in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
findByPath
public <O> O findByPath(Object origin,
Class<O> clazz,
String relPath)
throws ChromatticException
- Specified by:
findByPath in interface ChromatticSession
- Throws:
ChromatticException
findByPath
public <O> O findByPath(Class<O> clazz,
String relPath)
throws ChromatticException
- Specified by:
findByPath in interface ChromatticSession
- Throws:
ChromatticException
save
public void save()
throws UndeclaredRepositoryException
- Specified by:
save in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getStatus
public Status getStatus(Object o)
throws UndeclaredRepositoryException
- Specified by:
getStatus in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
remove
public void remove(Object o)
throws UndeclaredRepositoryException
- Specified by:
remove in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getEmbedded
public <E> E getEmbedded(Object o,
Class<E> embeddedType)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
getEmbedded in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
setEmbedded
public <E> void setEmbedded(Object o,
Class<E> embeddedType,
E embedded)
- Specified by:
setEmbedded in interface ChromatticSession
close
public void close()
- Specified by:
close in interface ChromatticSession
createQueryBuilder
public <O> QueryBuilder<O> createQueryBuilder(Class<O> fromClass)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
createQueryBuilder in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
addEventListener
public void addEventListener(EventListener listener)
- Specified by:
addEventListener in interface ChromatticSession
getRoot
public javax.jcr.Node getRoot()
getNode
public javax.jcr.Node getNode(Object o)
Copyright © 2010 eXo Platform SAS. All Rights Reserved.