org.objectweb.speedo.metadata
Class SpeedoClass

java.lang.Object
  |
  +--org.objectweb.speedo.metadata.SpeedoElement
        |
        +--org.objectweb.speedo.metadata.SpeedoClass

public class SpeedoClass
extends SpeedoElement

Describes a persistence capable class.

Author:
Y. Devaux

Field Summary
 ClassCode classCode
          Descriptor of this class code.
 boolean failed
          Indicates whether something goes wrong during the JDO Instances generation.
 byte identityType
          Attribute identity-type.
 boolean isAbstract
          Indicates if the class is abstract.
 boolean isInstanceCallbacks
          Indicates if the class implements InstanceCallbacks
 boolean isSerializable
          Indicates if the class implements InstanceCallbacks
 java.util.Map jdoField
          Description of persistent capable fields of this class.
 SpeedoPackage jdoPackage
          Description of the package which contains this class.
 org.objectweb.jorm.metainfo.api.Class jormclass
          Class jorm corresponding to this jdoclass
 java.lang.String name
          Class name.
 java.lang.String objectidClass
          Attribute objectid-class.
 java.lang.String persistenceCapableSuperClassName
          Super class name.
 boolean requiresExtent
          Attribute requires-extent.
 java.lang.String signature
          Class signature.
 long VersionUID
          Version UID for serialization.
 
Fields inherited from class org.objectweb.speedo.metadata.SpeedoElement
jdoExtension
 
Constructor Summary
SpeedoClass()
           
 
Method Summary
 void add(java.lang.Object field)
          Adds a SpeedoField to the class.
 void add(java.lang.Object field, boolean failsOnError, org.objectweb.util.monolog.api.Logger logger)
          Adds a SpeedoField to the class.
 int computeFieldNumbers()
          Computes the field numbers for the fields of this class.
 boolean generateObjectId()
           
 java.lang.String getFQName()
           
 java.lang.String getJormFileName()
           
 int getPkFieldCount()
           
 java.lang.String toString()
          Transforms a SpeedoClass into a String.
 
Methods inherited from class org.objectweb.speedo.metadata.SpeedoElement
addExtension, getExtension, getExtensionByKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Class name.

identityType

public byte identityType
Attribute identity-type.

objectidClass

public java.lang.String objectidClass
Attribute objectid-class.

requiresExtent

public boolean requiresExtent
Attribute requires-extent.

persistenceCapableSuperClassName

public java.lang.String persistenceCapableSuperClassName
Super class name.

jdoField

public java.util.Map jdoField
Description of persistent capable fields of this class. The HashMap key is the field name.

classCode

public ClassCode classCode
Descriptor of this class code.

jdoPackage

public SpeedoPackage jdoPackage
Description of the package which contains this class.

isAbstract

public boolean isAbstract
Indicates if the class is abstract.

isInstanceCallbacks

public boolean isInstanceCallbacks
Indicates if the class implements InstanceCallbacks

isSerializable

public boolean isSerializable
Indicates if the class implements InstanceCallbacks

signature

public java.lang.String signature
Class signature.

VersionUID

public long VersionUID
Version UID for serialization.

failed

public boolean failed
Indicates whether something goes wrong during the JDO Instances generation.

jormclass

public org.objectweb.jorm.metainfo.api.Class jormclass
Class jorm corresponding to this jdoclass
Constructor Detail

SpeedoClass

public SpeedoClass()
Method Detail

getFQName

public java.lang.String getFQName()

toString

public java.lang.String toString()
Transforms a SpeedoClass into a String.
Overrides:
toString in class java.lang.Object
Returns:
the Sting corresponding to the SpeedoClass.

add

public void add(java.lang.Object field)
Adds a SpeedoField to the class. Precondition: this field doesn't exist in the jdoFields HashMap.
Parameters:
field - field to add.

add

public void add(java.lang.Object field,
                boolean failsOnError,
                org.objectweb.util.monolog.api.Logger logger)
         throws SpeedoException
Adds a SpeedoField to the class.
Parameters:
field - field to add.
failsOnError - if an error must be thrown or creates a warning.
logger - logger for writting warn message if necessary.
Throws:
SpeedoException - if the field was already defined into the class.

computeFieldNumbers

public int computeFieldNumbers()
Computes the field numbers for the fields of this class.
Returns:
the number of fields of this class (including inherited fields).

getJormFileName

public java.lang.String getJormFileName()

generateObjectId

public boolean generateObjectId()

getPkFieldCount

public int getPkFieldCount()