| java.lang.Object org.exolab.castor.mapping.loader.TypeInfo
TypeInfo | public class TypeInfo (Code) | | Type information passed on creation of a
FieldHandlerImpl .
author: Assaf Arkin version: $Revision: 5951 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $ |
Constructor Summary | |
public | TypeInfo(Class fieldType) Construct new type information for a field. | public | TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, boolean required, Object defaultValue, CollectionHandler colHandler) Construct new type information for the field. | public | TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler) Construct new type information for the field. | 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. |
TypeInfo | public TypeInfo(Class fieldType)(Code) | | Construct new type information for a field. This field
requires no type conversion, and has no default value.
Parameters: fieldType - The field type |
TypeInfo | public TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, boolean required, Object defaultValue, CollectionHandler colHandler)(Code) | | Construct new type information for the field.
Parameters: fieldType - The field type Parameters: convertorTo - Convertor to the field type from externaltype, or null if no conversion is required Parameters: convertorFrom - Convertor from the field type to externaltype, or null if no conversion is required Parameters: required - True if the field is required Parameters: defaultValue - The default value of the field, null touse the known Java defaults Parameters: colHandler - The collection handler for this field, or null iffield is singular |
TypeInfo | public TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler)(Code) | | Construct new type information for the field.
Parameters: fieldType - The field type Parameters: convertorTo - Convertor to the field type from externaltype, or null if no conversion is required Parameters: convertorFrom - Convertor from the field type to externaltype, or null if no conversion is required Parameters: convertorParam - Optional parameter for the convertor,or null if either no conversion is required or no parameter is specified Parameters: required - True if the field is required Parameters: defaultValue - The default value of the field, null touse the known Java defaults Parameters: colHandler - The collection handler for this field, or null iffield is singular |
TypeInfo | public TypeInfo(Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler, boolean checkForCollection)(Code) | | Construct new type information for the field.
Parameters: fieldType - The field type Parameters: convertorTo - Convertor to the field type from externaltype, or null if no conversion is required Parameters: convertorFrom - Convertor from the field type to externaltype, or null if no conversion is required Parameters: convertorParam - Optional parameter for the convertor,or null if either no conversion is required or no parameter is specified Parameters: required - True if the field is required Parameters: defaultValue - The default value of the field, null touse the known Java defaults Parameters: colHandler - The collection handler for this field, or null iffield is singular |
getCollectionHandler | public CollectionHandler getCollectionHandler()(Code) | | Return the collection handler of this field.
The collection handler of this field |
getConvertorFrom | public TypeConvertor getConvertorFrom()(Code) | | Returns the convertor from the field type to an external type.
Convertor from field type |
getConvertorParam | public String getConvertorParam()(Code) | | Returns the convertor parameter.
Convertor parameter |
getConvertorTo | public TypeConvertor getConvertorTo()(Code) | | Returns the convertor to the field type from an external type.
Convertor to field type |
getDefaultValue | public Object getDefaultValue()(Code) | | Returns the default value for the field.
The default value |
getFieldType | public Class getFieldType()(Code) | | Returns the field type.
The field type |
isImmutable | public boolean isImmutable()(Code) | | Returns true if field type is immutable.
True if type is immutable |
isRequired | public boolean isRequired()(Code) | | Returns true if field type is required.
True if field is required |
setCollectionHandler | public void setCollectionHandler(CollectionHandler handler)(Code) | | Sets the CollectionHandler to use for the field
described by this TypeInfo.
Parameters: handler - the CollectionHandler, or null if noCollectionHandler should be used. |
setImmutable | void setImmutable(boolean immutable)(Code) | | Sets whether or not the type is immutable
Parameters: immutable - a boolean that when true indicates the typeis immutable |
setRequired | public void setRequired(boolean required)(Code) | | Sets a flag indictating if the field is required.
Parameters: required - the value of the flag. Should be true if the field is required, false otherwise. |
|
|