org.nuiton.topia.persistence
Interface EntityVisitor

All Known Implementing Classes:
Collector.CollectorVisitor, DepthEntityVisitor, HorizontalEntityVisitor

public interface EntityVisitor

The contract of a visitor of any TopiaEntity. Created: 28 janv. 2009 18:10:34

Version:
$Revision: 1894 $ Last update: $Date: 2010-04-15 17:44:51 +0200 (jeu., 15 avril 2010) $ by : $Author: tchemit $
Author:
poussin

Method Summary
 void clear()
          Reset all states of the visitor.
 void end(TopiaEntity entity)
          Ends the visit of the given entity.
 void start(TopiaEntity entity)
          Start the visit of the given entity.
 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.
 void visit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Object value)
          Visit a collection property for the given entity.
 void visit(TopiaEntity entity, String propertyName, Class<?> type, Object value)
          Visit a none indexed property for the given entity.
 

Method Detail

start

void start(TopiaEntity entity)
Start the visit of the given entity.

Parameters:
entity - the visited entity

end

void end(TopiaEntity entity)
Ends the visit of the given entity.

Parameters:
entity - the visited entity

visit

void visit(TopiaEntity entity,
           String propertyName,
           Class<?> type,
           Object value)
Visit a none indexed property for the given entity. The property visited is defined by the other parameters.

Parameters:
entity - the visited entity
propertyName - the name of the visited property
type - the type of the visited property
value - 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 entity
propertyName - 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 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 entity
propertyName - 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 visited property

clear

void clear()
Reset all states of the visitor. TODO called by who ? what is it for ?



Copyright © 2004-2010 CodeLutin. All Rights Reserved.