org.chromattic.core
Class DomainSessionImpl

java.lang.Object
  extended by org.chromattic.core.DomainSession
      extended by org.chromattic.core.DomainSessionImpl

public class DomainSessionImpl
extends DomainSession

Version:
$Revision$
Author:
Julien Viet

Field Summary
 
Fields inherited from class org.chromattic.core.DomainSession
broadcaster, log, sessionWrapper
 
Constructor Summary
DomainSessionImpl(Domain domain, SessionWrapper sessionWrapper)
           
 
Method Summary
protected  void _addMixin(EntityContext entityCtx, EmbeddedContext mixinCtx)
           
 void _close()
           
protected  EntityContext _copy(EntityContext parentCtx, EntityContext srcCtx, java.lang.String prefix, java.lang.String localName)
           
protected  EntityContext _copy(EntityContext srcCtx, java.lang.String prefix, java.lang.String localName)
           
protected  ObjectContext _create(java.lang.Class<?> clazz, java.lang.String localName)
           
protected
<O> O
_findById(java.lang.Class<O> clazz, java.lang.String id)
           
protected
<O> O
_findByNode(java.lang.Class<O> clazz, javax.jcr.Node node)
           
protected
<E> E
_findByPath(java.lang.Class<E> clazz, java.lang.String path)
           
protected
<O> O
_findByPath(EntityContext ctx, java.lang.Class<O> clazz, java.lang.String relPath)
           
protected  EntityContext _getChild(ObjectContext ctx, java.lang.String prefix, java.lang.String localName)
           
protected
<T> java.util.Iterator<T>
_getChildren(ObjectContext ctx, java.lang.Class<T> filterClass)
           
protected  EmbeddedContext _getEmbedded(EntityContext entityCtx, java.lang.Class<?> embeddedType)
           
protected  EntityContext _getEntity(javax.jcr.Node node)
           
protected  java.lang.String _getLocalName(EntityContext ctx)
           
protected  EntityContext _getParent(EntityContext ctx)
           
protected  EntityContext _getReferenced(ObjectContext referentCtx, java.lang.String name, LinkType linkType)
           
protected
<T> java.util.Iterator<T>
_getReferents(EntityContext referencedCtx, java.lang.String name, java.lang.Class<T> filterClass, LinkType linkType)
           
protected  javax.jcr.Node _getRoot()
           
protected
<T1 extends java.lang.Throwable,T2 extends java.lang.Throwable>
void
_move(ThrowableFactory<T1> srcStateTF, ThrowableFactory<T2> dstStateTF, EntityContext srcCtx, ObjectContext dstCtx, java.lang.String dstPrefix, java.lang.String dstLocalName)
           
protected  void _orderBefore(ObjectContext parentCtx, EntityContext srcCtx, EntityContext dstCtx)
           
protected
<T1 extends java.lang.Throwable>
void
_persist(ThrowableFactory<T1> nullLocaleNameTF, EntityContext ctx, java.lang.String prefix, java.lang.String localName)
           
protected
<T1 extends java.lang.Throwable,T2 extends java.lang.Throwable,T3 extends java.lang.Throwable>
void
_persist(ThrowableFactory<T1> srcStateTF, ThrowableFactory<T2> dstStateTF, ThrowableFactory<T3> nullLocaleNameTF, ObjectContext srcCtx, java.lang.String prefix, java.lang.String localName, EntityContext dstCtx)
           
protected  void _remove(EntityContext context)
           
protected  void _removeChild(ObjectContext ctx, java.lang.String prefix, java.lang.String localName)
           
protected  void _removeMixin(EntityContext entityCtx, java.lang.Class<?> mixinType)
           
protected  void _save()
           
protected  void _setLocalName(EntityContext ctx, java.lang.String localName)
           
protected  boolean _setReferenced(ObjectContext referentCtx, java.lang.String name, EntityContext referencedCtx, LinkType linkType)
           
 
Methods inherited from class org.chromattic.core.DomainSession
addEventListener, addMixin, close, copy, copy, create, createQueryBuilder, findById, findByNode, findByPath, findByPath, getChild, getChildren, getDomain, getEmbedded, getEntity, getJCRSession, getLocalName, getParent, getReferenced, getReferents, getRoot, getSessionWrapper, isClosed, move, orderBefore, persist, persist, remove, removeChild, removeMixin, save, setLocalName, setReferenced, unwrapEntity, unwrapMixin, unwrapObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainSessionImpl

public DomainSessionImpl(Domain domain,
                         SessionWrapper sessionWrapper)
Method Detail

_setLocalName

protected void _setLocalName(EntityContext ctx,
                             java.lang.String localName)
                      throws javax.jcr.RepositoryException
Specified by:
_setLocalName in class DomainSession
Throws:
javax.jcr.RepositoryException

_getLocalName

protected java.lang.String _getLocalName(EntityContext ctx)
                                  throws javax.jcr.RepositoryException
Specified by:
_getLocalName in class DomainSession
Throws:
javax.jcr.RepositoryException

_findByPath

protected <E> E _findByPath(java.lang.Class<E> clazz,
                            java.lang.String path)
                 throws javax.jcr.RepositoryException
Specified by:
_findByPath in class DomainSession
Throws:
javax.jcr.RepositoryException

_findByPath

protected <O> O _findByPath(EntityContext ctx,
                            java.lang.Class<O> clazz,
                            java.lang.String relPath)
                 throws javax.jcr.RepositoryException
Specified by:
_findByPath in class DomainSession
Throws:
javax.jcr.RepositoryException

_persist

protected <T1 extends java.lang.Throwable> void _persist(ThrowableFactory<T1> nullLocaleNameTF,
                                                         EntityContext ctx,
                                                         java.lang.String prefix,
                                                         java.lang.String localName)
                 throws T1 extends java.lang.Throwable,
                        javax.jcr.RepositoryException
Specified by:
_persist in class DomainSession
Throws:
T1 extends java.lang.Throwable
javax.jcr.RepositoryException

_persist

protected <T1 extends java.lang.Throwable,T2 extends java.lang.Throwable,T3 extends java.lang.Throwable> void _persist(ThrowableFactory<T1> srcStateTF,
                                                                                                                       ThrowableFactory<T2> dstStateTF,
                                                                                                                       ThrowableFactory<T3> nullLocaleNameTF,
                                                                                                                       ObjectContext srcCtx,
                                                                                                                       java.lang.String prefix,
                                                                                                                       java.lang.String localName,
                                                                                                                       EntityContext dstCtx)
                 throws T1 extends java.lang.Throwable,
                        T2 extends java.lang.Throwable,
                        T3 extends java.lang.Throwable,
                        java.lang.NullPointerException,
                        javax.jcr.RepositoryException
Specified by:
_persist in class DomainSession
Throws:
T1 extends java.lang.Throwable
java.lang.NullPointerException
javax.jcr.RepositoryException

_copy

protected EntityContext _copy(EntityContext srcCtx,
                              java.lang.String prefix,
                              java.lang.String localName)
                       throws javax.jcr.RepositoryException
Specified by:
_copy in class DomainSession
Throws:
javax.jcr.RepositoryException

_copy

protected EntityContext _copy(EntityContext parentCtx,
                              EntityContext srcCtx,
                              java.lang.String prefix,
                              java.lang.String localName)
                       throws javax.jcr.RepositoryException
Specified by:
_copy in class DomainSession
Throws:
javax.jcr.RepositoryException

_addMixin

protected void _addMixin(EntityContext entityCtx,
                         EmbeddedContext mixinCtx)
                  throws javax.jcr.RepositoryException
Specified by:
_addMixin in class DomainSession
Throws:
javax.jcr.RepositoryException

_removeMixin

protected void _removeMixin(EntityContext entityCtx,
                            java.lang.Class<?> mixinType)
                     throws javax.jcr.RepositoryException
Specified by:
_removeMixin in class DomainSession
Throws:
javax.jcr.RepositoryException

_getEmbedded

protected EmbeddedContext _getEmbedded(EntityContext entityCtx,
                                       java.lang.Class<?> embeddedType)
                                throws javax.jcr.RepositoryException
Specified by:
_getEmbedded in class DomainSession
Throws:
javax.jcr.RepositoryException

_move

protected <T1 extends java.lang.Throwable,T2 extends java.lang.Throwable> void _move(ThrowableFactory<T1> srcStateTF,
                                                                                     ThrowableFactory<T2> dstStateTF,
                                                                                     EntityContext srcCtx,
                                                                                     ObjectContext dstCtx,
                                                                                     java.lang.String dstPrefix,
                                                                                     java.lang.String dstLocalName)
              throws T1 extends java.lang.Throwable,
                     T2 extends java.lang.Throwable,
                     java.lang.NullPointerException,
                     javax.jcr.RepositoryException
Specified by:
_move in class DomainSession
Throws:
T1 extends java.lang.Throwable
java.lang.NullPointerException
javax.jcr.RepositoryException

_orderBefore

protected void _orderBefore(ObjectContext parentCtx,
                            EntityContext srcCtx,
                            EntityContext dstCtx)
                     throws javax.jcr.RepositoryException
Specified by:
_orderBefore in class DomainSession
Throws:
javax.jcr.RepositoryException

_create

protected ObjectContext _create(java.lang.Class<?> clazz,
                                java.lang.String localName)
                         throws java.lang.NullPointerException,
                                java.lang.IllegalArgumentException,
                                javax.jcr.RepositoryException
Specified by:
_create in class DomainSession
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException
javax.jcr.RepositoryException

_findById

protected <O> O _findById(java.lang.Class<O> clazz,
                          java.lang.String id)
               throws javax.jcr.RepositoryException
Specified by:
_findById in class DomainSession
Throws:
javax.jcr.RepositoryException

_findByNode

protected <O> O _findByNode(java.lang.Class<O> clazz,
                            javax.jcr.Node node)
                 throws javax.jcr.RepositoryException
Specified by:
_findByNode in class DomainSession
Throws:
javax.jcr.RepositoryException

_getEntity

protected EntityContext _getEntity(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
Specified by:
_getEntity in class DomainSession
Throws:
javax.jcr.RepositoryException

_save

protected void _save()
              throws javax.jcr.RepositoryException
Specified by:
_save in class DomainSession
Throws:
javax.jcr.RepositoryException

_remove

protected void _remove(EntityContext context)
                throws javax.jcr.RepositoryException
Specified by:
_remove in class DomainSession
Throws:
javax.jcr.RepositoryException

_getReferenced

protected EntityContext _getReferenced(ObjectContext referentCtx,
                                       java.lang.String name,
                                       LinkType linkType)
                                throws javax.jcr.RepositoryException
Specified by:
_getReferenced in class DomainSession
Throws:
javax.jcr.RepositoryException

_setReferenced

protected boolean _setReferenced(ObjectContext referentCtx,
                                 java.lang.String name,
                                 EntityContext referencedCtx,
                                 LinkType linkType)
                          throws javax.jcr.RepositoryException
Specified by:
_setReferenced in class DomainSession
Throws:
javax.jcr.RepositoryException

_getReferents

protected <T> java.util.Iterator<T> _getReferents(EntityContext referencedCtx,
                                                  java.lang.String name,
                                                  java.lang.Class<T> filterClass,
                                                  LinkType linkType)
                                       throws javax.jcr.RepositoryException
Specified by:
_getReferents in class DomainSession
Throws:
javax.jcr.RepositoryException

_removeChild

protected void _removeChild(ObjectContext ctx,
                            java.lang.String prefix,
                            java.lang.String localName)
                     throws javax.jcr.RepositoryException
Specified by:
_removeChild in class DomainSession
Throws:
javax.jcr.RepositoryException

_getChild

protected EntityContext _getChild(ObjectContext ctx,
                                  java.lang.String prefix,
                                  java.lang.String localName)
                           throws javax.jcr.RepositoryException
Specified by:
_getChild in class DomainSession
Throws:
javax.jcr.RepositoryException

_getChildren

protected <T> java.util.Iterator<T> _getChildren(ObjectContext ctx,
                                                 java.lang.Class<T> filterClass)
                                      throws javax.jcr.RepositoryException
Specified by:
_getChildren in class DomainSession
Throws:
javax.jcr.RepositoryException

_getParent

protected EntityContext _getParent(EntityContext ctx)
                            throws javax.jcr.RepositoryException
Specified by:
_getParent in class DomainSession
Throws:
javax.jcr.RepositoryException

_getRoot

protected javax.jcr.Node _getRoot()
                           throws javax.jcr.RepositoryException
Specified by:
_getRoot in class DomainSession
Throws:
javax.jcr.RepositoryException

_close

public void _close()
Specified by:
_close in class DomainSession


Copyright © 2012 eXo Platform SAS. All Rights Reserved.