org.exolab.castor.mapping.loader

Class FieldDescriptorImpl

Implemented Interfaces:
FieldDescriptor
Known Direct Subclasses:
JDOFieldDescriptor

public class FieldDescriptorImpl
extends java.lang.Object
implements FieldDescriptor

A basic field descriptor implementation. Engines will extend this class to provide additional functionality.
Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:29 $
Author:
Assaf Arkin
See Also:
ClassDescriptorImpl

Constructor Summary

FieldDescriptorImpl(String fieldName, TypeInfo typeInfo, FieldHandler handler, boolean trans)
Constructs a new field descriptor.
FieldDescriptorImpl(FieldDescriptor fieldDesc)
Constructor used by derived clases.
FieldDescriptorImpl(FieldDescriptorImpl fieldDesc)
Constructor used by derived clases.

Method Summary

ClassDescriptor
getClassDescriptor()
ClassDescriptor
getContainingClassDescriptor()
TypeConvertor
getConvertor()
Returns the convertor from the field type to an external type.
String
getConvertorParam()
Returns the convertor parameter.
String
getFieldName()
Class
getFieldType()
FieldHandler
getHandler()
boolean
isImmutable()
boolean
isMultivalued()
boolean
isRequired()
boolean
isTransient()
(package private) void
setClassDescriptor(ClassDescriptor clsDesc)
Mutator method used by MappingLoader.
void
setContainingClassDescriptor(ClassDescriptor contClsDesc)
(package private) void
setHandler(FieldHandler handler)
Mutator method used by MappingLoader.
(package private) void
setRequired(boolean required)
Mutator method used by MappingLoader.
String
toString()

Constructor Details

FieldDescriptorImpl

public FieldDescriptorImpl(String fieldName,
                           TypeInfo typeInfo,
                           FieldHandler handler,
                           boolean trans)
            throws MappingException
Constructs a new field descriptor.
Parameters:
fieldName - The field name
typeInfo - The field type information
handler - The field handler (may be null)
trans - True if the field is transient

FieldDescriptorImpl

protected FieldDescriptorImpl(FieldDescriptor fieldDesc)
Constructor used by derived clases.

FieldDescriptorImpl

protected FieldDescriptorImpl(FieldDescriptorImpl fieldDesc)
Constructor used by derived clases.

Method Details

getClassDescriptor

public ClassDescriptor getClassDescriptor()
Specified by:
getClassDescriptor in interface FieldDescriptor

getContainingClassDescriptor

public ClassDescriptor getContainingClassDescriptor()
Specified by:
getContainingClassDescriptor in interface FieldDescriptor

getConvertor

public TypeConvertor getConvertor()
Returns the convertor from the field type to an external type.
Returns:
Convertor from field type

getConvertorParam

public String getConvertorParam()
Returns the convertor parameter.
Returns:
Convertor parameter

getFieldName

public String getFieldName()
Specified by:
getFieldName in interface FieldDescriptor

getFieldType

public Class getFieldType()
Specified by:
getFieldType in interface FieldDescriptor

getHandler

public FieldHandler getHandler()
Specified by:
getHandler in interface FieldDescriptor

isImmutable

public boolean isImmutable()
Specified by:
isImmutable in interface FieldDescriptor

isMultivalued

public boolean isMultivalued()
Specified by:
isMultivalued in interface FieldDescriptor

isRequired

public boolean isRequired()
Specified by:
isRequired in interface FieldDescriptor

isTransient

public boolean isTransient()
Specified by:
isTransient in interface FieldDescriptor

setClassDescriptor

(package private)  void setClassDescriptor(ClassDescriptor clsDesc)
Mutator method used by MappingLoader.

setContainingClassDescriptor

public void setContainingClassDescriptor(ClassDescriptor contClsDesc)
Specified by:
setContainingClassDescriptor in interface FieldDescriptor

setHandler

(package private)  void setHandler(FieldHandler handler)
Mutator method used by MappingLoader.

setRequired

(package private)  void setRequired(boolean required)

toString

public String toString()

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com