org.exolab.castor.mapping.loader
Class TypeInfo
java.lang.Object
org.exolab.castor.mapping.loader.TypeInfo
public class TypeInfo
extends java.lang.Object
$Revision: 1.3 $ $Date: 2003/04/22 23:18:12 $TypeInfo(Class fieldType) - Construct new type information for a field.
|
TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler) - Construct new type information for the field.
|
TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler, boolean checkForCollection) - Construct new type information for the field.
|
TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, boolean required, Object defaultValue, CollectionHandler colHandler) - Construct new type information for the field.
|
TypeInfo
public TypeInfo(Class fieldType)
Construct new type information for a field. This field
requires no type conversion, and has no default value.
fieldType
- The field type
TypeInfo
public TypeInfo(Class fieldType,
TypeConvertor convertorTo,
TypeConvertor convertorFrom,
String convertorParam,
boolean required,
Object defaultValue,
CollectionHandler colHandler)
Construct new type information for the field.
fieldType
- The field typeconvertorTo
- Convertor to the field type from external
type, or null if no conversion is requiredconvertorFrom
- Convertor from the field type to external
type, or null if no conversion is requiredconvertorParam
- Optional parameter for the convertor,
or null if either no conversion is required or no parameter is specifiedrequired
- True if the field is requireddefaultValue
- The default value of the field, null to
use the known Java defaultscolHandler
- The collection handler for this field, or null if
field is singular
TypeInfo
public TypeInfo(Class fieldType,
TypeConvertor convertorTo,
TypeConvertor convertorFrom,
String convertorParam,
boolean required,
Object defaultValue,
CollectionHandler colHandler,
boolean checkForCollection)
Construct new type information for the field.
fieldType
- The field typeconvertorTo
- Convertor to the field type from external
type, or null if no conversion is requiredconvertorFrom
- Convertor from the field type to external
type, or null if no conversion is requiredconvertorParam
- Optional parameter for the convertor,
or null if either no conversion is required or no parameter is specifiedrequired
- True if the field is requireddefaultValue
- The default value of the field, null to
use the known Java defaultscolHandler
- The collection handler for this field, or null if
field is singular
TypeInfo
public TypeInfo(Class fieldType,
TypeConvertor convertorTo,
TypeConvertor convertorFrom,
boolean required,
Object defaultValue,
CollectionHandler colHandler)
Construct new type information for the field.
fieldType
- The field typeconvertorTo
- Convertor to the field type from external
type, or null if no conversion is requiredconvertorFrom
- Convertor from the field type to external
type, or null if no conversion is requiredrequired
- True if the field is requireddefaultValue
- The default value of the field, null to
use the known Java defaults
getCollectionHandler
public CollectionHandler getCollectionHandler()
Return the collection handler of this field.
- The collection handler of this field
getConvertorFrom
public TypeConvertor getConvertorFrom()
Returns the convertor from the field type to an external type.
- Convertor from field type
getConvertorParam
public String getConvertorParam()
Returns the convertor parameter.
getConvertorTo
public TypeConvertor getConvertorTo()
Returns the convertor to the field type from an external type.
getDefaultValue
public Object getDefaultValue()
Returns the default value for the field.
getFieldType
public Class getFieldType()
Returns the field type.
isImmutable
public boolean isImmutable()
Returns true if field type is immutable.
- True if type is immutable
isRequired
public boolean isRequired()
Returns true if field type is required.
- True if field is required
setCollectionHandler
public void setCollectionHandler(CollectionHandler handler)
Sets the CollectionHandler to use for the field
described by this TypeInfo.
handler
- the CollectionHandler, or null if no
CollectionHandler should be used.
setRequired
public void setRequired(boolean required)
Sets a flag indictating if the field is required.
required
- the value of the flag. Should be true if the
field is required, false otherwise.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com