Package org.nuiton.topia.persistence
Interface EntityVisitor
- All Known Implementing Classes:
Collector.CollectorVisitor,DepthEntityVisitor,ExportEntityVisitor,HorizontalEntityVisitor
public interface EntityVisitor
The contract of a visitor of any
TopiaEntity.
Created: 28 janv. 2009 18:10:34- Version:
- $Id$
- Author:
- bpoussin <poussin@codelutin.com>, tchemit <chemit@codelutin.com>
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Reset all states of the visitor.voidend(TopiaEntity entity) Ends the visit of the given entity.voidstart(TopiaEntity entity) Start the visit of the given entity.voidvisit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, int index, Object value) Visit a indexed value from a collection property for the given entity.voidvisit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Object value) Visit a collection property for the given entity.voidvisit(TopiaEntity entity, String propertyName, Class<?> type, Object value) Visit a none indexed property for the given entity.
-
Method Details
-
start
Start the visit of the given entity.- Parameters:
entity- the visited entity
-
end
Ends the visit of the given entity.- Parameters:
entity- the visited entity
-
visit
Visit a none indexed property for the given entity. The property visited is defined by the other parameters.- Parameters:
entity- the visited entitypropertyName- the name of the visited propertytype- the type of the visited propertyvalue- the value of the visited property
-
visit
void visit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Object value) Visit a collection property for the given entity. The property visited is defined by the other parameters.- Parameters:
entity- the visited entitypropertyName- 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
void visit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, int index, Object value) Visit a indexed value from a collection property for the given entity. The property visited is defined by the other parameters.- Parameters:
entity- the visited entitypropertyName- 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
void clear()Reset 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.
-