org.chromattic.core
Class DomainSession
java.lang.Object
org.chromattic.core.DomainSession
- Direct Known Subclasses:
- DomainSessionImpl
public abstract class DomainSession
- extends Object
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
protected abstract void |
_addMixin(EntityContext ctx,
EmbeddedContext mixinCtx)
|
protected abstract void |
_close()
|
protected abstract
|
_create(Class<O> clazz,
String name)
|
protected abstract
|
_findById(Class<E> clazz,
String id)
|
protected abstract
|
_findByNode(Class<E> clazz,
javax.jcr.Node node)
|
protected abstract
|
_findByPath(EntityContext ctx,
Class<E> clazz,
String relPath)
|
protected abstract EntityContext |
_getChild(EntityContext ctx,
String name)
|
protected abstract
|
_getChildren(EntityContext ctx,
Class<T> filterClass)
|
protected abstract EmbeddedContext |
_getEmbedded(EntityContext ctx,
Class<?> embeddedClass)
|
protected abstract String |
_getName(EntityContext ctx)
|
protected abstract EntityContext |
_getParent(EntityContext ctx)
|
protected abstract EntityContext |
_getReferenced(EntityContext referentCtx,
String name,
LinkType linkType)
|
protected abstract
|
_getReferents(EntityContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
|
protected abstract javax.jcr.Node |
_getRoot()
|
protected abstract void |
_move(EntityContext srcCtx,
EntityContext dstCtx)
|
protected abstract void |
_orderBefore(EntityContext parentCtx,
EntityContext srcCtx,
EntityContext dstCtx)
|
protected abstract EntityContext |
_persist(EntityContext ctx,
String name)
|
protected abstract EntityContext |
_persist(EntityContext parentCtx,
String name,
EntityContext childCtx)
|
protected abstract void |
_remove(EntityContext context)
|
protected abstract void |
_removeChild(EntityContext ctx,
String name)
|
protected abstract void |
_save()
|
protected abstract void |
_setName(EntityContext ctx,
String name)
|
protected abstract boolean |
_setReferenced(EntityContext referentCtx,
String name,
EntityContext referencedCtx,
LinkType linkType)
|
void |
addEventListener(EventListener listener)
|
void |
addMixin(EntityContext ctx,
EmbeddedContext mixinCtx)
|
void |
close()
|
|
create(Class<O> clazz,
String name)
|
|
createQueryBuilder(Class<O> fromClass)
|
|
findById(Class<E> clazz,
String id)
|
|
findByNode(Class<E> clazz,
javax.jcr.Node node)
|
|
findByPath(EntityContext ctx,
Class<E> clazz,
String relPath)
|
EntityContext |
getChild(EntityContext ctx,
String name)
|
|
getChildren(EntityContext ctx,
Class<T> filterClass)
|
Domain |
getDomain()
|
EmbeddedContext |
getEmbedded(EntityContext ctx,
Class<?> embeddedClass)
|
javax.jcr.Session |
getJCRSession()
|
String |
getName(EntityContext ctx)
|
EntityContext |
getParent(EntityContext ctx)
|
EntityContext |
getReferenced(EntityContext referentCtx,
String name,
LinkType linkType)
|
|
getReferents(EntityContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
|
javax.jcr.Node |
getRoot()
|
SessionWrapper |
getSessionWrapper()
|
void |
move(EntityContext srcCtx,
EntityContext dstCtx)
|
void |
orderBefore(EntityContext parentCtx,
EntityContext srcCtx,
EntityContext dstCtx)
|
EntityContext |
persist(EntityContext parentCtx,
EntityContext childCtx,
String name)
|
EntityContext |
persist(EntityContext ctx,
String name)
|
void |
remove(EntityContext context)
|
void |
removeChild(EntityContext ctx,
String name)
|
void |
save()
|
void |
setName(EntityContext ctx,
String name)
|
boolean |
setReferenced(EntityContext referentCtx,
String name,
EntityContext referencedCtx,
LinkType linkType)
|
EntityContext |
unwrapEntity(Object o)
Unwraps the object to an entity context |
EmbeddedContext |
unwrapMixin(Object o)
Unwraps the object to an embedded context |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
broadcaster
protected final EventBroadcaster broadcaster
- .
sessionWrapper
protected final SessionWrapper sessionWrapper
- .
DomainSession
public DomainSession(Domain domain,
SessionWrapper sessionWrapper)
_setName
protected abstract void _setName(EntityContext ctx,
String name)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_persist
protected abstract EntityContext _persist(EntityContext ctx,
String name)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_persist
protected abstract EntityContext _persist(EntityContext parentCtx,
String name,
EntityContext childCtx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_create
protected abstract <O> O _create(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
javax.jcr.RepositoryException
- Throws:
NullPointerException
IllegalArgumentException
javax.jcr.RepositoryException
_findById
protected abstract <E> E _findById(Class<E> clazz,
String id)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_findByNode
protected abstract <E> E _findByNode(Class<E> clazz,
javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_save
protected abstract void _save()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_remove
protected abstract void _remove(EntityContext context)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getReferenced
protected abstract EntityContext _getReferenced(EntityContext referentCtx,
String name,
LinkType linkType)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_setReferenced
protected abstract boolean _setReferenced(EntityContext referentCtx,
String name,
EntityContext referencedCtx,
LinkType linkType)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getReferents
protected abstract <T> Iterator<T> _getReferents(EntityContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_removeChild
protected abstract void _removeChild(EntityContext ctx,
String name)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getChild
protected abstract EntityContext _getChild(EntityContext ctx,
String name)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getChildren
protected abstract <T> Iterator<T> _getChildren(EntityContext ctx,
Class<T> filterClass)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getParent
protected abstract EntityContext _getParent(EntityContext ctx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_findByPath
protected abstract <E> E _findByPath(EntityContext ctx,
Class<E> clazz,
String relPath)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_orderBefore
protected abstract void _orderBefore(EntityContext parentCtx,
EntityContext srcCtx,
EntityContext dstCtx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getRoot
protected abstract javax.jcr.Node _getRoot()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_move
protected abstract void _move(EntityContext srcCtx,
EntityContext dstCtx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_addMixin
protected abstract void _addMixin(EntityContext ctx,
EmbeddedContext mixinCtx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getEmbedded
protected abstract EmbeddedContext _getEmbedded(EntityContext ctx,
Class<?> embeddedClass)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getName
protected abstract String _getName(EntityContext ctx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_close
protected abstract void _close()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getDomain
public Domain getDomain()
getJCRSession
public javax.jcr.Session getJCRSession()
createQueryBuilder
public <O> QueryBuilder<O> createQueryBuilder(Class<O> fromClass)
throws ChromatticException
- Throws:
ChromatticException
addEventListener
public void addEventListener(EventListener listener)
close
public void close()
getEmbedded
public EmbeddedContext getEmbedded(EntityContext ctx,
Class<?> embeddedClass)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
save
public void save()
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
findById
public <E> E findById(Class<E> clazz,
String id)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
findByPath
public <E> E findByPath(EntityContext ctx,
Class<E> clazz,
String relPath)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
findByNode
public <E> E findByNode(Class<E> clazz,
javax.jcr.Node node)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
persist
public EntityContext persist(EntityContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
create
public <O> O create(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
UndeclaredRepositoryException
- Throws:
NullPointerException
IllegalArgumentException
UndeclaredRepositoryException
getName
public String getName(EntityContext ctx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
addMixin
public void addMixin(EntityContext ctx,
EmbeddedContext mixinCtx)
throws ChromatticException
- Throws:
ChromatticException
setName
public final void setName(EntityContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
orderBefore
public final void orderBefore(EntityContext parentCtx,
EntityContext srcCtx,
EntityContext dstCtx)
move
public void move(EntityContext srcCtx,
EntityContext dstCtx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
remove
public final void remove(EntityContext context)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getReferenced
public final EntityContext getReferenced(EntityContext referentCtx,
String name,
LinkType linkType)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
setReferenced
public final boolean setReferenced(EntityContext referentCtx,
String name,
EntityContext referencedCtx,
LinkType linkType)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
removeChild
public final void removeChild(EntityContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getChild
public final EntityContext getChild(EntityContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getChildren
public final <T> Iterator<T> getChildren(EntityContext ctx,
Class<T> filterClass)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getParent
public final EntityContext getParent(EntityContext ctx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getReferents
public final <T> Iterator<T> getReferents(EntityContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
unwrapEntity
public final EntityContext unwrapEntity(Object o)
throws NullPointerException,
IllegalArgumentException
- Unwraps the object to an entity context
- Parameters:
o - the object to unwrap
- Returns:
- the related entity context
- Throws:
NullPointerException - if the object is null
IllegalArgumentException - if the object is not a proxy
unwrapMixin
public final EmbeddedContext unwrapMixin(Object o)
- Unwraps the object to an embedded context
- Parameters:
o - the object to unwrap
- Returns:
- the related embedded context
- Throws:
NullPointerException - if the object is null
IllegalArgumentException - if the object is not a proxy
persist
public final EntityContext persist(EntityContext parentCtx,
EntityContext childCtx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getRoot
public final javax.jcr.Node getRoot()
getSessionWrapper
public SessionWrapper getSessionWrapper()
Copyright © 2010 eXo Platform SAS. All Rights Reserved.