org.chromattic.core
Class ObjectContext<O extends ObjectContext<O>>

java.lang.Object
  extended by org.chromattic.core.ObjectContext<O>
All Implemented Interfaces:
MethodHandler
Direct Known Subclasses:
EmbeddedContext, EntityContext

public abstract class ObjectContext<O extends ObjectContext<O>>
extends java.lang.Object
implements MethodHandler

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
ObjectContext()
           
 
Method Summary
<T1 extends java.lang.Throwable,T2 extends java.lang.Throwable>
void
addChild(ThrowableFactory<T1> thisStateTF, ThrowableFactory<T2> childStateTF, java.lang.String prefix, EntityContext childCtx)
           
<T1 extends java.lang.Throwable,T2 extends java.lang.Throwable>
void
addChild(ThrowableFactory<T1> thisStateTF, ThrowableFactory<T2> childStateTF, java.lang.String prefix, java.lang.String localName, EntityContext childCtx)
           
 EntityContext getChild(java.lang.String prefix, java.lang.String localName)
           
<T> java.util.Iterator<T>
getChildren(java.lang.Class<T> filterClass)
           
abstract  EntityContext getEntity()
           
abstract  ObjectMapper<O> getMapper()
           
abstract  java.lang.Object getObject()
           
<V> V
getPropertyValue(java.lang.String propertyName, ValueDefinition<?,V> type)
           
<L,V> L
getPropertyValues(java.lang.String propertyName, ValueDefinition<?,V> simpleType, ArrayType<L,V> arrayType)
           
abstract  DomainSession getSession()
           
abstract  Status getStatus()
           
abstract  NodeTypeInfo getTypeInfo()
          Returns the type info associated with the context.
 boolean hasChild(java.lang.String prefix, java.lang.String localName)
           
<V> boolean
hasProperty(java.lang.String propertyName, ValueDefinition<?,V> type)
           
 java.lang.Object invoke(java.lang.Object o, java.lang.reflect.Method method)
           
 java.lang.Object invoke(java.lang.Object o, java.lang.reflect.Method method, java.lang.Object arg)
           
 java.lang.Object invoke(java.lang.Object o, java.lang.reflect.Method method, java.lang.Object[] args)
           
 void orderBefore(EntityContext srcCtx, EntityContext dstCtx)
           
 void removeChild(java.lang.String prefix, java.lang.String localName)
           
<V> void
setPropertyValue(java.lang.String propertyName, ValueDefinition<?,V> type, V o)
           
<L,V> void
setPropertyValues(java.lang.String propertyName, ValueDefinition<?,V> type, ArrayType<L,V> arrayType, L propertyValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectContext

public ObjectContext()
Method Detail

getMapper

public abstract ObjectMapper<O> getMapper()

getObject

public abstract java.lang.Object getObject()

getEntity

public abstract EntityContext getEntity()

getTypeInfo

public abstract NodeTypeInfo getTypeInfo()
Returns the type info associated with the context. Null is returned when the context is in transient state, otherwise the type info of the corresponding node is returned.

Returns:
the type info

getStatus

public abstract Status getStatus()

getSession

public abstract DomainSession getSession()

invoke

public final java.lang.Object invoke(java.lang.Object o,
                                     java.lang.reflect.Method method)
                              throws java.lang.Throwable
Specified by:
invoke in interface MethodHandler
Throws:
java.lang.Throwable

invoke

public final java.lang.Object invoke(java.lang.Object o,
                                     java.lang.reflect.Method method,
                                     java.lang.Object arg)
                              throws java.lang.Throwable
Specified by:
invoke in interface MethodHandler
Throws:
java.lang.Throwable

invoke

public final java.lang.Object invoke(java.lang.Object o,
                                     java.lang.reflect.Method method,
                                     java.lang.Object[] args)
                              throws java.lang.Throwable
Specified by:
invoke in interface MethodHandler
Throws:
java.lang.Throwable

hasProperty

public final <V> boolean hasProperty(java.lang.String propertyName,
                                     ValueDefinition<?,V> type)
                          throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getPropertyValue

public final <V> V getPropertyValue(java.lang.String propertyName,
                                    ValueDefinition<?,V> type)
                         throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getPropertyValues

public final <L,V> L getPropertyValues(java.lang.String propertyName,
                                       ValueDefinition<?,V> simpleType,
                                       ArrayType<L,V> arrayType)
                          throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

setPropertyValue

public final <V> void setPropertyValue(java.lang.String propertyName,
                                       ValueDefinition<?,V> type,
                                       V o)
                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

setPropertyValues

public final <L,V> void setPropertyValues(java.lang.String propertyName,
                                          ValueDefinition<?,V> type,
                                          ArrayType<L,V> arrayType,
                                          L propertyValues)
                             throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

removeChild

public final void removeChild(java.lang.String prefix,
                              java.lang.String localName)

orderBefore

public final void orderBefore(EntityContext srcCtx,
                              EntityContext dstCtx)

addChild

public final <T1 extends java.lang.Throwable,T2 extends java.lang.Throwable> void addChild(ThrowableFactory<T1> thisStateTF,
                                                                                           ThrowableFactory<T2> childStateTF,
                                                                                           java.lang.String prefix,
                                                                                           EntityContext childCtx)
                    throws T1 extends java.lang.Throwable,
                           T2 extends java.lang.Throwable
Throws:
T1 extends java.lang.Throwable

addChild

public final <T1 extends java.lang.Throwable,T2 extends java.lang.Throwable> void addChild(ThrowableFactory<T1> thisStateTF,
                                                                                           ThrowableFactory<T2> childStateTF,
                                                                                           java.lang.String prefix,
                                                                                           java.lang.String localName,
                                                                                           EntityContext childCtx)
                    throws T1 extends java.lang.Throwable,
                           T2 extends java.lang.Throwable
Throws:
T1 extends java.lang.Throwable

getChild

public final EntityContext getChild(java.lang.String prefix,
                                    java.lang.String localName)

hasChild

public final boolean hasChild(java.lang.String prefix,
                              java.lang.String localName)

getChildren

public final <T> java.util.Iterator<T> getChildren(java.lang.Class<T> filterClass)


Copyright © 2014 eXo Platform SAS. All Rights Reserved.