Class Collector.CollectorVisitor
java.lang.Object
org.nuiton.topia.persistence.DepthEntityVisitor
org.nuiton.topia.persistence.util.Collector.CollectorVisitor
- All Implemented Interfaces:
EntityVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Deque<TopiaEntity>la pile des entites en cours de parcoursFields inherited from class org.nuiton.topia.persistence.DepthEntityVisitor
alreadyExplored, delegateVisitor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Reset all states of the visitor.voidend(TopiaEntity e) Ends the visit of the given entity.protected Collection<TopiaEntity>protected Deque<TopiaEntity>getStack()protected voidsetCollector(Collector<?> collector) voidstart(TopiaEntity e) Start the visit of the given entity.voidVisit a indexed value from a collection property for the given entity.voidVisit a collection property for the given entity.voidvisit(TopiaEntity e, String name, Class<?> type, Object value) Visit a none indexed property for the given entity.
-
Field Details
-
stack
la pile des entites en cours de parcours
-
-
Constructor Details
-
CollectorVisitor
public CollectorVisitor()
-
-
Method Details
-
setCollector
-
getStack
-
getAlreadyExplored
-
start
Description copied from interface:EntityVisitorStart the visit of the given entity.- Specified by:
startin interfaceEntityVisitor- Overrides:
startin classDepthEntityVisitor- Parameters:
e- the visited entity
-
end
Description copied from interface:EntityVisitorEnds the visit of the given entity.- Specified by:
endin interfaceEntityVisitor- Overrides:
endin classDepthEntityVisitor- Parameters:
e- the visited entity
-
visit
Description copied from interface:EntityVisitorVisit a none indexed property for the given entity. The property visited is defined by the other parameters.- Specified by:
visitin interfaceEntityVisitor- Overrides:
visitin classDepthEntityVisitor- Parameters:
e- the visited entityname- the name of the visited propertytype- the type of the visited propertyvalue- the value of the visited property
-
visit
Description copied from interface:EntityVisitorVisit a collection property for the given entity. The property visited is defined by the other parameters.- Specified by:
visitin interfaceEntityVisitor- Overrides:
visitin classDepthEntityVisitor- Parameters:
e- the visited entityname- the name of the visited propertycollectionType- the type of the visited collectiontype- the type of the visited propertyvalue- the value of the visited property
-
visit
public void visit(TopiaEntity e, String name, Class<?> collectionType, Class<?> type, int index, Object value) Description copied from interface:EntityVisitorVisit a indexed value from a collection property for the given entity. The property visited is defined by the other parameters.- Specified by:
visitin interfaceEntityVisitor- Overrides:
visitin classDepthEntityVisitor- Parameters:
e- the visited entityname- the name of the visited propertycollectionType- the type of the container of the visited propertytype- the type of the visited propertyindex- the index of the visited property in his containervalue- the value of the visited property
-
clear
public void clear()Description copied from interface:EntityVisitorReset all states of the visitor. If you use internal states inside the visitor, this method should clean all of them. This method should be invoked after usage of the visitor.- Specified by:
clearin interfaceEntityVisitor- Overrides:
clearin classDepthEntityVisitor
-