NatureExtendable
, PropertyHolder
, FieldDescriptor
XMLFieldDescriptorImpl
public class FieldDescriptorImpl extends java.lang.Object implements FieldDescriptor
Modifier | Constructor | Description |
---|---|---|
protected |
FieldDescriptorImpl() |
Creates a default instance of a field descriptor.
|
|
FieldDescriptorImpl(java.lang.String fieldName,
TypeInfo typeInfo,
FieldHandler handler,
boolean isTransitive) |
Constructs a new field descriptor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addNature(java.lang.String nature) |
Adds a specified nature.
|
ClassDescriptor |
getClassDescriptor() |
Returns the class descriptor related to the field type.
|
FieldMappingCollectionType |
getCollection() |
|
java.lang.String |
getComparator() |
|
ClassDescriptor |
getContainingClassDescriptor() |
Get the class descriptor which contains this field.
|
java.lang.String |
getCreateMethod() |
|
java.lang.String |
getFieldName() |
Returns the name of the field.
|
java.lang.Class<?> |
getFieldType() |
Returns the Java type of the field.
|
java.lang.String |
getGetMethod() |
|
FieldHandler |
getHandler() |
Returns the handler of the field.
|
java.lang.Object |
getProperty(java.lang.String name) |
Get a property by its name.
|
java.lang.String |
getSetMethod() |
|
boolean |
hasNature(java.lang.String nature) |
Checks if a specified nature has been added.
|
boolean |
isDirect() |
|
boolean |
isIdentity() |
Is the described field is part of the identity of the class it belongs to?
|
boolean |
isImmutable() |
Returns true if the field type is immutable.
|
boolean |
isLazy() |
|
boolean |
isMultivalued() |
Returns true if the field is multivalued (a collection).
|
boolean |
isRequired() |
Returns true if the field type is required.
|
boolean |
isTransient() |
Returns true if the field is transient.
|
void |
setClassDescriptor(ClassDescriptor classDescriptor) |
Set the ClassDescriptor for the described field.
|
void |
setCollection(FieldMappingCollectionType collection) |
|
void |
setComparator(java.lang.String comparator) |
|
void |
setContainingClassDescriptor(ClassDescriptor parent) |
Set the class descriptor which contains this field.
|
void |
setCreateMethod(java.lang.String createMethod) |
|
void |
setDirect(boolean direct) |
|
void |
setFieldName(java.lang.String fieldName) |
Set the name of the field.
|
void |
setFieldType(java.lang.Class<?> fieldType) |
Set the type of the field.
|
void |
setGetMethod(java.lang.String getMethod) |
|
void |
setHandler(FieldHandler handler) |
Set the FieldHandler for the field being described by this FieldDescriptor.
|
void |
setIdentity(boolean identity) |
Set wether the described field is part of the identity of the class it belongs to.
|
void |
setImmutable(boolean immutable) |
Set the immutable flag which indicates that changes to this Field result in a
new Object to be created, such as java.lang.String.
|
void |
setLazy(boolean lazy) |
|
void |
setMultivalued(boolean multivalued) |
Set wheter the object described by this descriptor is multivalued or not.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
Set a property specified by the name to the passed value.
|
void |
setRequired(boolean required) |
Set whether or not the described field is required.
|
void |
setSetMethod(java.lang.String setMethod) |
|
void |
setTransient(boolean isTransient) |
Sets whether or not the describled field is 'transient'.
|
java.lang.String |
toString() |
protected FieldDescriptorImpl()
public FieldDescriptorImpl(java.lang.String fieldName, TypeInfo typeInfo, FieldHandler handler, boolean isTransitive)
fieldName
- The field nametypeInfo
- The field type informationhandler
- The field handler (may be null)isTransitive
- True if the field is transientpublic final void setContainingClassDescriptor(ClassDescriptor parent)
FieldDescriptor
setContainingClassDescriptor
in interface FieldDescriptor
parent
- The class descriptor which contains this field.FieldDescriptor.setContainingClassDescriptor(
org.exolab.castor.mapping.ClassDescriptor)
public final ClassDescriptor getContainingClassDescriptor()
FieldDescriptor
getContainingClassDescriptor
in interface FieldDescriptor
FieldDescriptor.getContainingClassDescriptor()
public final void setFieldName(java.lang.String fieldName)
fieldName
- Field name.public final java.lang.String getFieldName()
FieldDescriptor
getFieldName
in interface FieldDescriptor
FieldDescriptor.getFieldName()
public final void setFieldType(java.lang.Class<?> fieldType)
fieldType
- Field type.public final java.lang.Class<?> getFieldType()
FieldDescriptor
getFieldType
in interface FieldDescriptor
FieldDescriptor.getFieldType()
public final void setClassDescriptor(ClassDescriptor classDescriptor)
classDescriptor
- The ClassDescriptor for the described field.public final ClassDescriptor getClassDescriptor()
FieldDescriptor
getClassDescriptor
in interface FieldDescriptor
FieldDescriptor.getClassDescriptor()
public final void setHandler(FieldHandler handler)
handler
- The FieldHandler for the field being described.public final FieldHandler getHandler()
FieldDescriptor
getHandler
in interface FieldDescriptor
FieldDescriptor.getHandler()
public final void setTransient(boolean isTransient)
isTransient
- The flag indicating if the described field is 'transient'.public final boolean isTransient()
FieldDescriptor
isTransient
in interface FieldDescriptor
FieldDescriptor.isTransient()
public final void setImmutable(boolean immutable)
immutable
- Flag which if true indicates that the field is immutable.public final boolean isImmutable()
FieldDescriptor
isImmutable
in interface FieldDescriptor
FieldDescriptor.isImmutable()
public final void setRequired(boolean required)
required
- The flag indicating whether or not the described field is required.public final boolean isRequired()
FieldDescriptor
isRequired
in interface FieldDescriptor
FieldDescriptor.isRequired()
public final void setMultivalued(boolean multivalued)
multivalued
- True if the object described by this descriptor is multivalued.public final boolean isMultivalued()
FieldDescriptor
isMultivalued
in interface FieldDescriptor
FieldDescriptor.isMultivalued()
public final void setIdentity(boolean identity)
identity
- true
if field is part of the classes identity.public final boolean isIdentity()
true
if field is part of the classes identity.public java.lang.Object getProperty(java.lang.String name)
PropertyHolder
getProperty
in interface PropertyHolder
name
- of the propertypublic void setProperty(java.lang.String name, java.lang.Object value)
PropertyHolder
setProperty
in interface PropertyHolder
name
- of the propertyvalue
- of the propertypublic void addNature(java.lang.String nature)
NatureExtendable
addNature
in interface NatureExtendable
nature
- ID of the Naturepublic boolean hasNature(java.lang.String nature)
NatureExtendable
hasNature
in interface NatureExtendable
nature
- ID of the Naturepublic java.lang.String getComparator()
public void setComparator(java.lang.String comparator)
public FieldMappingCollectionType getCollection()
public void setCollection(FieldMappingCollectionType collection)
public boolean isDirect()
public void setDirect(boolean direct)
public java.lang.String getGetMethod()
public void setGetMethod(java.lang.String getMethod)
public java.lang.String getSetMethod()
public void setSetMethod(java.lang.String setMethod)
public java.lang.String getCreateMethod()
public void setCreateMethod(java.lang.String createMethod)
public boolean isLazy()
public void setLazy(boolean lazy)
public java.lang.String toString()
toString
in class java.lang.Object
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com