org.apache.jdo.impl.enhancer.meta.prop
Class JDOField

java.lang.Object
  extended byorg.apache.jdo.impl.enhancer.meta.prop.JDOField

final class JDOField
extends java.lang.Object

A class to hold the properties of a field.


Field Summary
private  java.lang.String annotationType
          The annotation type.
private  java.lang.String jdoModifier
          The JDO modifier of the field.
private  int modifiers
          The access modifier of the field.
private  java.lang.String name
          The name of the field.
private  java.lang.String type
          The type of the field.
 
Constructor Summary
(package private) JDOField(java.lang.String name)
          Creates a new object with the given name.
 
Method Summary
 int getModifiers()
          Returns the modifiers of the field.
 java.lang.String getName()
          Returns the name of the field.
 java.lang.String getType()
          Returns the type of the field.
 boolean isAnnotated()
          Returns whether the field is annotated.
 boolean isInDefaultFetchGroup()
          Is the field in the default fetch group?
 boolean isKey()
          Returns whether the field is a key primary.
 boolean isKnownTransient()
          Returns whether the field is declared transient.
 boolean isManaged()
          Returns whether the field is managed.
 boolean isPersistent()
          Returns whether the field is persistent.
 boolean isTransactional()
          Returns whether the field is transactional.
 void setAnnotationType(java.lang.String annotationType)
          Sets the annotation type of the field.
 void setJdoModifier(java.lang.String jdoModifier)
          Sets the modifiers of the field.
 void setModifiers(int modifiers)
          Returns the modifiers of the field.
 void setType(java.lang.String type)
          Sets the type of the field.
 java.lang.String toString()
          Creates a string-representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private final java.lang.String name
The name of the field.


type

private java.lang.String type
The type of the field.


modifiers

private int modifiers
The access modifier of the field.


jdoModifier

private java.lang.String jdoModifier
The JDO modifier of the field.


annotationType

private java.lang.String annotationType
The annotation type.

Constructor Detail

JDOField

JDOField(java.lang.String name)
Creates a new object with the given name.

Parameters:
name - The name of the field.
Method Detail

getName

public java.lang.String getName()
Returns the name of the field.

Returns:
The name of the field.

setType

public void setType(java.lang.String type)
Sets the type of the field. The given classname should have a natural form(with dots) and is converted to a VM-similar notation(with slashes).

Parameters:
type - The natural classname.

getType

public java.lang.String getType()
Returns the type of the field.

Returns:
The type of the field.

setModifiers

public void setModifiers(int modifiers)
Returns the modifiers of the field.

Parameters:
modifiers - The modifiers of the field.

getModifiers

public int getModifiers()
Returns the modifiers of the field.

Returns:
The modifiers of the field.

setAnnotationType

public void setAnnotationType(java.lang.String annotationType)
Sets the annotation type of the field.

Parameters:
annotationType - annotation type

isAnnotated

public boolean isAnnotated()
Returns whether the field is annotated.

Returns:
true if annotated field

isKey

public boolean isKey()
Returns whether the field is a key primary.

Returns:
true if primary key.

isInDefaultFetchGroup

public boolean isInDefaultFetchGroup()
Is the field in the default fetch group?

Returns:
Is the field in the default fetch group?

setJdoModifier

public void setJdoModifier(java.lang.String jdoModifier)
Sets the modifiers of the field.

Parameters:
jdoModifier - the persistence modifier of the field

isKnownTransient

public boolean isKnownTransient()
Returns whether the field is declared transient.

Returns:
true if declared transient field.
See Also:
setJdoModifier(java.lang.String)

isPersistent

public boolean isPersistent()
Returns whether the field is persistent.

Returns:
true if persistent field.
See Also:
setJdoModifier(java.lang.String)

isTransactional

public boolean isTransactional()
Returns whether the field is transactional.

Returns:
true if transactional field
See Also:
setJdoModifier(java.lang.String)

isManaged

public boolean isManaged()
Returns whether the field is managed.

Returns:
true if managed field

toString

public java.lang.String toString()
Creates a string-representation of the object.

Returns:
The string-representation of the object.