org.nuiton.topia.persistence.util
Class Collector.CollectorVisitor

java.lang.Object
  extended by org.nuiton.topia.persistence.DepthEntityVisitor
      extended by org.nuiton.topia.persistence.util.Collector.CollectorVisitor
All Implemented Interfaces:
EntityVisitor
Enclosing class:
Collector<R>

public static class Collector.CollectorVisitor
extends DepthEntityVisitor


Field Summary
protected  java.util.Deque<TopiaEntity> stack
          la pile des entites en cours de parcours
 
Fields inherited from class org.nuiton.topia.persistence.DepthEntityVisitor
alreadyExplored, delegateVisitor
 
Constructor Summary
Collector.CollectorVisitor()
           
 
Method Summary
 void clear()
          reset all states of the visitor.
 void end(TopiaEntity e)
          Ends the visit of the given entity.
protected  java.util.Collection<TopiaEntity> getAlreadyExplored()
           
protected  java.util.Deque<TopiaEntity> getStack()
           
protected  void setCollector(Collector<?> collector)
           
 void start(TopiaEntity e)
          Start the visit of the given entity.
 void visit(TopiaEntity e, java.lang.String name, java.lang.Class<?> collectionType, java.lang.Class<?> type, int index, java.lang.Object value)
          Visit a indexed value from a collection property for the given entity.
 void visit(TopiaEntity e, java.lang.String name, java.lang.Class<?> collectionType, java.lang.Class<?> type, java.lang.Object value)
          Visit a collection property for the given entity.
 void visit(TopiaEntity e, java.lang.String name, java.lang.Class<?> type, java.lang.Object value)
          Visit a none indexed property for the given entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

protected java.util.Deque<TopiaEntity> stack
la pile des entites en cours de parcours

Constructor Detail

Collector.CollectorVisitor

public Collector.CollectorVisitor()
Method Detail

setCollector

protected void setCollector(Collector<?> collector)

getStack

protected java.util.Deque<TopiaEntity> getStack()

getAlreadyExplored

protected java.util.Collection<TopiaEntity> getAlreadyExplored()

start

public void start(TopiaEntity e)
Description copied from interface: EntityVisitor
Start the visit of the given entity.

Specified by:
start in interface EntityVisitor
Overrides:
start in class DepthEntityVisitor
Parameters:
e - the visited entity

end

public void end(TopiaEntity e)
Description copied from interface: EntityVisitor
Ends the visit of the given entity.

Specified by:
end in interface EntityVisitor
Overrides:
end in class DepthEntityVisitor
Parameters:
e - the visited entity

visit

public void visit(TopiaEntity e,
                  java.lang.String name,
                  java.lang.Class<?> type,
                  java.lang.Object value)
Description copied from interface: EntityVisitor
Visit a none indexed property for the given entity. The property visited is defined by the other parameters.

Specified by:
visit in interface EntityVisitor
Overrides:
visit in class DepthEntityVisitor
Parameters:
e - the visited entity
name - the name of the visited property
type - the type of the visited property
value - the value of the visitied property

visit

public void visit(TopiaEntity e,
                  java.lang.String name,
                  java.lang.Class<?> collectionType,
                  java.lang.Class<?> type,
                  java.lang.Object value)
Description copied from interface: EntityVisitor
Visit a collection property for the given entity. The property visited is defined by the other parameters.

Specified by:
visit in interface EntityVisitor
Overrides:
visit in class DepthEntityVisitor
Parameters:
e - the visited entity
name - the name of the visited property
collectionType - the type of the visited collection
type - the type of the visited property
value - the value of the visitied property

visit

public void visit(TopiaEntity e,
                  java.lang.String name,
                  java.lang.Class<?> collectionType,
                  java.lang.Class<?> type,
                  int index,
                  java.lang.Object value)
Description copied from interface: EntityVisitor
Visit a indexed value from a collection property for the given entity. The property visited is defined by the other parameters.

Specified by:
visit in interface EntityVisitor
Overrides:
visit in class DepthEntityVisitor
Parameters:
e - the visited entity
name - the name of the visited property
collectionType - the type of the container of the visited property
type - the type of the visited property
index - the index of the visited property in his container
value - the value of the visitied property

clear

public void clear()
Description copied from interface: EntityVisitor
reset all states of the visitor.

Specified by:
clear in interface EntityVisitor
Overrides:
clear in class DepthEntityVisitor


Copyright © 2004-2009 CodeLutin. All Rights Reserved.