Package org.exolab.castor.persist
Class ClassMolderHelper
java.lang.Object
org.exolab.castor.persist.ClassMolderHelper
Utility class that provides (mostly) static methods in relation to the functions
required by a
ClassMolder
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.commons.logging.Log
Logger used for logging. -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Object>
getAddedEntitiesList
(TransactionContext tx, List<Identity> orgIds, Object collection, ClassMolder molder) It is assumed the returned collection will not be modified.getIdsList
(TransactionContext tx, ClassMolder molder, Object col) Return all the object identity of a Collection of object of the same type.static Iterator
getIterator
(Object object) Return the iterator on values of the specified Collection or, return the iterator on values of the specified Map.getRemovedIdsList
(TransactionContext tx, List<Identity> orgIds, Object collection, ClassMolder molder) It is assumed the returned collection will not be modified.static boolean
A utility method which compare object.static boolean
isEquals
(Collection c1, Collection c2) Utility method to compare collections for equality.
-
Field Details
-
LOG
public static final org.apache.commons.logging.Log LOGLogger used for logging.
-
-
Method Details
-
isEquals
A utility method which compare object.- Parameters:
o1
- First object instanceo2
- Second object instance- Returns:
- True if the objects compared are equal
-
isEquals
Utility method to compare collections for equality.- Parameters:
c1
- collection one.c2
- collection two.- Returns:
- True if the collections are equal.
-
getIdsList
Return all the object identity of a Collection of object of the same type.- Parameters:
tx
- the transaction contextmolder
- class molder of the type of the objectscol
- a Collection or Vector containing- Returns:
- an ArrayLists which contains list of object identity
-
getIterator
Return the iterator on values of the specified Collection or, return the iterator on values of the specified Map.- Parameters:
object
- - a Collection instance.
-
getAddedEntitiesList
public static Collection<Object> getAddedEntitiesList(TransactionContext tx, List<Identity> orgIds, Object collection, ClassMolder molder) It is assumed the returned collection will not be modified. Any modification to the returned collection may or may not affect the original collection or map. -
getRemovedIdsList
public static List<Identity> getRemovedIdsList(TransactionContext tx, List<Identity> orgIds, Object collection, ClassMolder molder) It is assumed the returned collection will not be modified. Any modification to the returned collection may or may not affect the original collection or map.
-