org.nuiton.topia.persistence
Interface EntityVisitor

All Known Implementing Classes:
Collector.CollectorVisitor, DepthEntityVisitor

public interface EntityVisitor

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

Version:
$Revision$ Last update: $Date$ by : $Author$
Author:
poussin

Method Summary
 void clear()
          reset all states of the visitor.
 void end(TopiaEntity e)
          Ends the visit of the given entity.
 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.
 

Method Detail

start

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

Parameters:
e - the visited entity

end

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

Parameters:
e - the visited entity

visit

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. The property visited is defined by the other parameters.

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

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. The property visited is defined by the other parameters.

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

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. The property visited is defined by the other parameters.

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

void clear()
reset all states of the visitor.



Copyright © 2004-2009 CodeLutin. All Rights Reserved.