org.exolab.castor.persist
Class ClassMolderHelper
java.lang.Object
org.exolab.castor.persist.ClassMolderHelper
public final class ClassMolderHelper
extends java.lang.Object
static ArrayList | extractIdentityList(TransactionContext tx, ClassMolder molder, Object col) - Return all the object identity of a Collection of object of the same
type.
|
static Collection | getAddedValuesList(TransactionContext tx, ArrayList orgIds, Object collection, ClassMolder ch) - It is assumed the returned collection will not be modified.
|
static FieldMapping[] | getFullFields(ClassMapping clsMap) - Get all the field mapping, including all the field in extended class, but
id fields
|
static FieldMapping[] | getIdFields(ClassMapping clsMap) - Get the all the id fields of a class
If the class, C, is a dependent class, then
the depended class', D, id fields will be
appended at the back and returned.
|
static Iterator | getIterator(Object object) - Return the iterator on values of the specified Collection
Or, return the iterator on values of the specified Map
|
static Collection | getRemovedIdsList(TransactionContext tx, ArrayList orgIds, Object collection, ClassMolder ch) - It is assumed the returned collection will not be modified.
|
static boolean | isEquals(Collection c1, Collection c2) - Utility method to compare collections for equality
|
static boolean | isEquals(Object o1, Object o2) - A utility method which compare object.
|
static Vector | resolve(ClassDescriptorResolver cdResolver, LockEngine lock, PersistenceFactory factory) - Resolve and construct all the ClassMolders given a MappingLoader.
|
LOG
public static final Log LOG
extractIdentityList
public static ArrayList extractIdentityList(TransactionContext tx,
ClassMolder molder,
Object col)
Return all the object identity of a Collection of object of the same
type.
tx
- the transaction contextmolder
- class molder of the type of the objectscol
- a Collection or Vector containing
- an ArrayLists which contains list of object identity
getAddedValuesList
public static Collection getAddedValuesList(TransactionContext tx,
ArrayList orgIds,
Object collection,
ClassMolder ch)
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.
getFullFields
public static FieldMapping[] getFullFields(ClassMapping clsMap)
throws MappingException
Get all the field mapping, including all the field in extended class, but
id fields
clsMap
- ClassMapping instance
getIdFields
public static FieldMapping[] getIdFields(ClassMapping clsMap)
throws MappingException
Get the all the id fields of a class
If the class, C, is a dependent class, then
the depended class', D, id fields will be
appended at the back and returned.
If the class is an extended class, the id
fields of the extended class will be returned.
getIterator
public static Iterator getIterator(Object object)
Return the iterator on values of the specified Collection
Or, return the iterator on values of the specified Map
object
- - a Collection instance
getRemovedIdsList
public static Collection getRemovedIdsList(TransactionContext tx,
ArrayList orgIds,
Object collection,
ClassMolder ch)
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.
isEquals
public static boolean isEquals(Collection c1,
Collection c2)
Utility method to compare collections for equality
c1
- collection one.c2
- collection two.
- True if the collections are equal.
isEquals
public static boolean isEquals(Object o1,
Object o2)
A utility method which compare object.
o1
- First object instanceo2
- Second object instance
- True if the objects compared are equal
resolve
public static Vector resolve(ClassDescriptorResolver cdResolver,
LockEngine lock,
PersistenceFactory factory)
throws MappingException,
ClassNotFoundException
Resolve and construct all the ClassMolders given a MappingLoader.
lock
- LockEngine for all the ClassMolderfactory
- factory class for getting Persistent of the ClassMolder
- Vector of all of the ClassMolders from a MappingLoader
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com