wt.dataops.objectcol
Class CollectionHelper

java.lang.Object
  extended bywt.dataops.objectcol.CollectionHelper
All Implemented Interfaces:
Externalizable, Serializable

public class CollectionHelper
extends Object
implements Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
protected static class CollectionHelper.TmpCriteriaHolder
           
 
Field Summary
private static String CLASSNAME
           
protected static int CRITERIA_CACHE_SIZE
           
protected static Cache criteriaHolderCache
           
static boolean DEF_ALLOW_SUBTYPES
           
static Class[] DEF_OBJ_TYPES
           
static long EXTERNALIZATION_VERSION_UID
           
static String LOCALIZATION_MARKER_LEFT_END
           
static int LOCALIZATION_MARKER_LEFT_END_LENGTH
           
static String LOCALIZATION_MARKER_RIGHT_END
           
static int LOCALIZATION_MARKER_RIGHT_END_LENGTH
           
static String LOCALIZATION_SEP
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static CollectionService service
          

Supported API: false
private static boolean VERBOSE
           
static int[] ZERO
           
 
Constructor Summary
CollectionHelper()
           
 
Method Summary
static CriterionObject addCriterion(CollectionCriteria criteria, BaseCriterionDef definition, InputValue[] inputs)
          

Supported API: false
static void addDefaultObjTypeCriterionObject(CollectionCriteria criteria)
           
static void addObjTypeCriterionObject(CollectionCriteria criteria, Class[] types, boolean allowSub)
           
static boolean containsObjTypeCriterionDef(CollectionCriteria criteria)
           
private static BaseCriterionDef createCriterionDef(Element content)
           
private static BaseCriterionDef createCriterionDef(String unique_name, String displayName, String description, Element content)
           
private static RelationshipMapDef createRelationshipMapDef(String unique_name, String displayName, String description, Element content)
           
protected static CollectionHelper.TmpCriteriaHolder createTmpCriteriaHolder(CollectionCriteria criteria)
           
static File exportToFile(CollectionCriteria criteria, RelationshipMap map)
          

Supported API: false
protected static CollectionHelper.TmpCriteriaHolder fetchTmpCriteriaHolder(CollectionCriteria criteria)
           
static BaseCriterionDef[] getAvailableCriterionDefs(BaseCriterionDef[] current)
          

Supported API: false
static WTContainerRef getContextRefFromCriterions(CriterionObject[] criterions, InputValue[][] inputs)
           
static WTContainerRef[] getContextRefsFromCriterions(CriterionObject[] criterions, InputValue[][] inputs)
           
static BaseCriterionDef getCriterionDef(String name)
          

Supported API: false
static WTSet getCriterionDefValidWith(BaseCriterionDef def, boolean sourceRole, boolean targetRole)
           
static CriterionObject[] getCriterionObjects(CollectionCriteria criteria)
          

Supported API: false
static RelationshipMapDef getRelationshipMapDef(String name)
          

Supported API: false
static void importFromFile(File file)
          

Supported API: false
static boolean isEditable(CollectionCriteria criteria)
          

Supported API: false
static boolean isUsed(BaseCriterionDef definition)
          

Supported API: false
static boolean isUsed(CollectionCriteria criteria)
          

Supported API: false
static boolean isUsed(RelationshipMap map)
          

Supported API: false
static BaseCriterionDef loadCriterionDef(XMLLob xmlspec, boolean primaryDef)
          

Supported API: false
static RelationshipMapDef loadRelationshipMapDef(XMLLob xmlspec)
          

Supported API: false
static List makeValueList(InputType type, String value, boolean inflateRef)
           
protected static void PP(String msg)
           
protected static void PPln(String msg)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(CollectionHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static void removeCriterion(CollectionCriteria criteria, CriterionObject criterion)
          

Supported API: false
static CollectionCriteria saveCollectionCriteria(CollectionCriteria criteria)
          

Supported API: false
protected static CollectionCriteria saveCollectionCriteria(CollectionCriteria criteria, CollectionHelper.TmpCriteriaHolder tch)
           
private static BaseCriterionDef saveCriterionDef(BaseCriterionDef def)
           
private static RelationshipMapDef saveRelationshipMapDef(RelationshipMapDef def)
           
static CollectionCriteria storeCollectionCriteria(CollectionCriteria criteria)
          

Supported API: false
static RelationshipMap storeRelationshipMap(String name, RelationshipMapDef definition, InputValue[] inputs)
          

Supported API: false
static CriterionObject updateCriterion(CollectionCriteria criteria, CriterionObject criterion, InputValue[] values)
          

Supported API: false
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

service

public static final CollectionService service


Supported API: false


serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

CRITERIA_CACHE_SIZE

protected static int CRITERIA_CACHE_SIZE

criteriaHolderCache

protected static Cache criteriaHolderCache

ZERO

public static int[] ZERO

DEF_OBJ_TYPES

public static final Class[] DEF_OBJ_TYPES

DEF_ALLOW_SUBTYPES

public static final boolean DEF_ALLOW_SUBTYPES
See Also:
Constant Field Values

LOCALIZATION_MARKER_RIGHT_END

public static final String LOCALIZATION_MARKER_RIGHT_END
See Also:
Constant Field Values

LOCALIZATION_MARKER_LEFT_END

public static final String LOCALIZATION_MARKER_LEFT_END
See Also:
Constant Field Values

LOCALIZATION_MARKER_RIGHT_END_LENGTH

public static final int LOCALIZATION_MARKER_RIGHT_END_LENGTH

LOCALIZATION_MARKER_LEFT_END_LENGTH

public static final int LOCALIZATION_MARKER_LEFT_END_LENGTH

LOCALIZATION_SEP

public static final String LOCALIZATION_SEP
See Also:
Constant Field Values
Constructor Detail

CollectionHelper

public CollectionHelper()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(CollectionHelper thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getAvailableCriterionDefs

public static BaseCriterionDef[] getAvailableCriterionDefs(BaseCriterionDef[] current)
                                                    throws WTException


Supported API: false

Parameters:
current -
Returns:
BaseCriterionDef[]
Throws:
WTException

addCriterion

public static CriterionObject addCriterion(CollectionCriteria criteria,
                                           BaseCriterionDef definition,
                                           InputValue[] inputs)
                                    throws WTException


Supported API: false

Parameters:
criteria -
definition -
inputs -
Returns:
CriterionObject
Throws:
WTException

removeCriterion

public static void removeCriterion(CollectionCriteria criteria,
                                   CriterionObject criterion)
                            throws WTException


Supported API: false

Parameters:
criteria -
criterion -
Throws:
WTException

storeCollectionCriteria

public static CollectionCriteria storeCollectionCriteria(CollectionCriteria criteria)
                                                  throws WTException


Supported API: false

Parameters:
criteria -
Returns:
CollectionCriteria
Throws:
WTException

loadCriterionDef

public static BaseCriterionDef loadCriterionDef(XMLLob xmlspec,
                                                boolean primaryDef)
                                         throws WTException


Supported API: false

Parameters:
xmlspec -
primaryDef -
Returns:
BaseCriterionDef
Throws:
WTException

getCriterionDef

public static BaseCriterionDef getCriterionDef(String name)
                                        throws WTException


Supported API: false

Parameters:
name -
Returns:
BaseCriterionDef
Throws:
WTException

getCriterionObjects

public static CriterionObject[] getCriterionObjects(CollectionCriteria criteria)
                                             throws WTException


Supported API: false

Parameters:
criteria -
Returns:
CriterionObject[]
Throws:
WTException

updateCriterion

public static CriterionObject updateCriterion(CollectionCriteria criteria,
                                              CriterionObject criterion,
                                              InputValue[] values)
                                       throws WTException


Supported API: false

Parameters:
criteria -
criterion -
values -
Returns:
CriterionObject
Throws:
WTException

saveCollectionCriteria

public static CollectionCriteria saveCollectionCriteria(CollectionCriteria criteria)
                                                 throws WTException


Supported API: false

Parameters:
criteria -
Returns:
CollectionCriteria
Throws:
WTException

isEditable

public static boolean isEditable(CollectionCriteria criteria)
                          throws WTException


Supported API: false

Parameters:
criteria -
Returns:
boolean
Throws:
WTException

isUsed

public static boolean isUsed(CollectionCriteria criteria)
                      throws WTException


Supported API: false

Parameters:
criteria -
Returns:
boolean
Throws:
WTException

isUsed

public static boolean isUsed(BaseCriterionDef definition)
                      throws WTException


Supported API: false

Parameters:
definition -
Returns:
boolean
Throws:
WTException

loadRelationshipMapDef

public static RelationshipMapDef loadRelationshipMapDef(XMLLob xmlspec)
                                                 throws WTException


Supported API: false

Parameters:
xmlspec -
Returns:
RelationshipMapDef
Throws:
WTException

storeRelationshipMap

public static RelationshipMap storeRelationshipMap(String name,
                                                   RelationshipMapDef definition,
                                                   InputValue[] inputs)
                                            throws WTException


Supported API: false

Parameters:
name -
definition -
inputs -
Returns:
RelationshipMap
Throws:
WTException

getRelationshipMapDef

public static RelationshipMapDef getRelationshipMapDef(String name)
                                                throws WTException


Supported API: false

Parameters:
name -
Returns:
RelationshipMapDef
Throws:
WTException

isUsed

public static boolean isUsed(RelationshipMap map)
                      throws WTException


Supported API: false

Parameters:
map -
Returns:
boolean
Throws:
WTException

exportToFile

public static File exportToFile(CollectionCriteria criteria,
                                RelationshipMap map)
                         throws WTException


Supported API: false

Parameters:
criteria -
map -
Returns:
File
Throws:
WTException

importFromFile

public static void importFromFile(File file)
                           throws WTException


Supported API: false

Parameters:
file -
Throws:
WTException

saveCriterionDef

private static BaseCriterionDef saveCriterionDef(BaseCriterionDef def)
                                          throws WTException
Throws:
WTException

createCriterionDef

private static BaseCriterionDef createCriterionDef(Element content)
                                            throws WTException
Throws:
WTException

createCriterionDef

private static BaseCriterionDef createCriterionDef(String unique_name,
                                                   String displayName,
                                                   String description,
                                                   Element content)
                                            throws WTException
Throws:
WTException

fetchTmpCriteriaHolder

protected static CollectionHelper.TmpCriteriaHolder fetchTmpCriteriaHolder(CollectionCriteria criteria)
                                                                    throws WTException
Throws:
WTException

createTmpCriteriaHolder

protected static CollectionHelper.TmpCriteriaHolder createTmpCriteriaHolder(CollectionCriteria criteria)
                                                                     throws WTException
Throws:
WTException

saveCollectionCriteria

protected static CollectionCriteria saveCollectionCriteria(CollectionCriteria criteria,
                                                           CollectionHelper.TmpCriteriaHolder tch)
                                                    throws WTException
Throws:
WTException

getContextRefFromCriterions

public static WTContainerRef getContextRefFromCriterions(CriterionObject[] criterions,
                                                         InputValue[][] inputs)
                                                  throws WTException
Throws:
WTException

getContextRefsFromCriterions

public static WTContainerRef[] getContextRefsFromCriterions(CriterionObject[] criterions,
                                                            InputValue[][] inputs)
                                                     throws WTException
Throws:
WTException

makeValueList

public static List makeValueList(InputType type,
                                 String value,
                                 boolean inflateRef)
                          throws WTException
Throws:
WTException

createRelationshipMapDef

private static RelationshipMapDef createRelationshipMapDef(String unique_name,
                                                           String displayName,
                                                           String description,
                                                           Element content)
                                                    throws WTException
Throws:
WTException

saveRelationshipMapDef

private static RelationshipMapDef saveRelationshipMapDef(RelationshipMapDef def)
                                                  throws WTException
Throws:
WTException

containsObjTypeCriterionDef

public static boolean containsObjTypeCriterionDef(CollectionCriteria criteria)
                                           throws WTException
Throws:
WTException

addDefaultObjTypeCriterionObject

public static void addDefaultObjTypeCriterionObject(CollectionCriteria criteria)
                                             throws WTException
Throws:
WTException

addObjTypeCriterionObject

public static void addObjTypeCriterionObject(CollectionCriteria criteria,
                                             Class[] types,
                                             boolean allowSub)
                                      throws WTException
Throws:
WTException

PPln

protected static void PPln(String msg)

PP

protected static void PP(String msg)

getCriterionDefValidWith

public static WTSet getCriterionDefValidWith(BaseCriterionDef def,
                                             boolean sourceRole,
                                             boolean targetRole)
                                      throws WTException
Throws:
WTException