org.chromattic.core
Class EntityContext

java.lang.Object
  extended by org.chromattic.core.EntityContext
All Implemented Interfaces:
MethodHandler

public class EntityContext
extends Object
implements MethodHandler

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
EntityContext(TypeMapper mapper)
           
EntityContext(TypeMapper mapper, org.chromattic.core.TransientEntityContextState state)
           
 
Method Summary
 void addChild(EntityContext childCtx)
           
 void addChild(Object child)
           
 void addChild(String name, EntityContext childCtx)
           
 void addChild(String name, Object child)
           
 boolean addReference(String name, Object referent, LinkType linkType)
           
 String getAttribute(NodeAttributeType type)
           
 Object getChild(String name)
           
<T> Iterator<T>
getChildren(Class<T> filterClass)
           
 String getId()
           
 String getName()
           
 Object getObject()
           
 Object getParent()
           
 String getPath()
           
 Map<String,Object> getPropertyMap()
           
<V> V
getPropertyValue(String propertyName, SimpleValueInfo<V> type)
           
<V> List<V>
getPropertyValues(String propertyName, SimpleValueInfo<V> simpleType, ListType listType)
           
 Object getReferenced(String name, LinkType linkType)
           
<T> Iterator<T>
getReferents(String name, Class<T> filterClass, LinkType linkType)
           
 DomainSession getSession()
           
 Status getStatus()
           
 Object invoke(Object o, Method method, Object[] args)
           
 void orderBefore(EntityContext srcCtx, EntityContext dstCtx)
           
 void remove()
           
 void removeChild(String name)
           
 void setName(String name)
           
<V> void
setPropertyValue(String propertyName, SimpleValueInfo<V> type, V o)
           
<V> void
setPropertyValues(String propertyName, SimpleValueInfo<V> type, ListType listType, List<V> objects)
           
 void setReferenced(String name, Object referenced, LinkType linkType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityContext

public EntityContext(TypeMapper mapper)

EntityContext

public EntityContext(TypeMapper mapper,
                     org.chromattic.core.TransientEntityContextState state)
Method Detail

getSession

public DomainSession getSession()

getStatus

public Status getStatus()

getObject

public Object getObject()

getAttribute

public String getAttribute(NodeAttributeType type)

remove

public void remove()

getReferents

public <T> Iterator<T> getReferents(String name,
                                    Class<T> filterClass,
                                    LinkType linkType)

getName

public String getName()

getId

public String getId()

getPath

public String getPath()

setName

public void setName(String name)

getReferenced

public Object getReferenced(String name,
                            LinkType linkType)

setReferenced

public void setReferenced(String name,
                          Object referenced,
                          LinkType linkType)

addReference

public boolean addReference(String name,
                            Object referent,
                            LinkType linkType)

getPropertyMap

public Map<String,Object> getPropertyMap()

getPropertyValue

public <V> V getPropertyValue(String propertyName,
                              SimpleValueInfo<V> type)

getPropertyValues

public <V> List<V> getPropertyValues(String propertyName,
                                     SimpleValueInfo<V> simpleType,
                                     ListType listType)

setPropertyValue

public <V> void setPropertyValue(String propertyName,
                                 SimpleValueInfo<V> type,
                                 V o)

setPropertyValues

public <V> void setPropertyValues(String propertyName,
                                  SimpleValueInfo<V> type,
                                  ListType listType,
                                  List<V> objects)

removeChild

public void removeChild(String name)

orderBefore

public void orderBefore(EntityContext srcCtx,
                        EntityContext dstCtx)

addChild

public void addChild(EntityContext childCtx)

addChild

public void addChild(Object child)

addChild

public void addChild(String name,
                     EntityContext childCtx)

addChild

public void addChild(String name,
                     Object child)

getChild

public Object getChild(String name)

getChildren

public <T> Iterator<T> getChildren(Class<T> filterClass)

getParent

public Object getParent()

toString

public String toString()
Overrides:
toString in class Object

invoke

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


Copyright © 2009 eXo Platform SAS. All Rights Reserved.