org.exolab.castor.mapping
Interface FieldDescriptor

All Known Subinterfaces:
XMLFieldDescriptor
All Known Implementing Classes:
DelegateFieldDescriptor, FieldDescriptorImpl, JDOFieldDescriptor, XMLFieldDescriptorImpl, XMLMappingLoader.ContainerElementFieldDescriptor

public interface FieldDescriptor

Describes the properties of a field. Implementations will extend this inteface to provide additional properties.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:26 $
Author:
Assaf Arkin
See Also:
FieldHandler

Method Summary
 ClassDescriptor getClassDescriptor()
          Returns the class descriptor related to the field type.
 ClassDescriptor getContainingClassDescriptor()
           
 java.lang.String getFieldName()
          Returns the name of the field.
 java.lang.Class getFieldType()
          Returns the Java type of the field.
 FieldHandler getHandler()
          Returns the handler of the field.
 boolean isImmutable()
          Returns true if the field type is immutable.
 boolean isMultivalued()
          Returns true if the field is multi valued (a collection).
 boolean isRequired()
          Returns true if the field type is required.
 boolean isTransient()
          Returns true if the field is transient.
 void setContainingClassDescriptor(ClassDescriptor contClsDesc)
          Set the class which contains this field
 

Method Detail

setContainingClassDescriptor

void setContainingClassDescriptor(ClassDescriptor contClsDesc)
Set the class which contains this field


getContainingClassDescriptor

ClassDescriptor getContainingClassDescriptor()
Returns:
the class which contains this field

getFieldName

java.lang.String getFieldName()
Returns the name of the field.

Returns:
Field name

getFieldType

java.lang.Class getFieldType()
Returns the Java type of the field.

Returns:
Field type

isTransient

boolean isTransient()
Returns true if the field is transient. Transient fields are never persisted or marshalled.

Returns:
True if transient field

isImmutable

boolean isImmutable()
Returns true if the field type is immutable.

Returns:
True if the field type is immutable

isRequired

boolean isRequired()
Returns true if the field type is required.

Returns:
True if the field type is required

isMultivalued

boolean isMultivalued()
Returns true if the field is multi valued (a collection).

Returns:
True if the field is multi valued

getClassDescriptor

ClassDescriptor getClassDescriptor()
Returns the class descriptor related to the field type. If the field type is a class for which a descriptor exists, this descriptor is returned. If the field type is a class for which no mapping is provided, null is returned.

Returns:
The class descriptor of the field type, or null

getHandler

FieldHandler getHandler()
Returns the handler of the field. In order to persist or marshal a field descriptor will be associated with a handler.

Returns:
The field handler


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