|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.objectweb.jorm.metainfo.lib.BasicClass
BasicClass is an implementation of the Class interface defined in the meta information system. This object is defined by a list of fields, a name, a list of mapping.
| Constructor Summary | |
BasicClass(java.lang.String className,
boolean abstractClass,
MetaObject parent)
Builds a new Class object. |
|
| Method Summary | |
void |
addAllInheritedClass(java.util.Map table)
Constructs an Map with inherited class |
void |
addInheritedClass(Class class_)
Adds a new inherited class to the list of the inherited classes for the current class object. |
ClassMapping |
createClassMapping(java.lang.String mapperName,
java.lang.String mappingName)
Creates a new ClassMapping object for the current class. |
ClassRef |
createClassRef(java.lang.String fieldName,
Class class_)
Allows to obtain a new ClassRef from a field name an its class. |
GenClassRef |
createGenClassRef(java.lang.String fieldName,
java.lang.String genName)
Allows to obtain a new GenClassRef from a field name an its generic class. |
ScalarField |
createHiddenField(java.lang.String fieldName,
PType type)
Creates a new scalar field and adds it to the list of hidden fields. |
NameDef |
createNameDef()
Creates a new NameDef object for the current Class object. |
PrimitiveElement |
createPrimitiveElement(java.lang.String fieldName,
PType type)
Allows to obtain a new PrimitiveElement from a class field name an its type. |
java.util.Collection |
getAllFields()
|
ClassMapping |
getClassMapping(java.lang.String mapperName,
java.lang.String mappingName)
Returns an existing ClassMapping object for the current class object. |
int |
getFieldRefNumber()
Returns the number of fields which are references to classes. |
java.lang.String |
getFQName()
|
ScalarField |
getHiddenField(java.lang.String fieldName)
retrieve an hiddenfield from its name. |
int |
getInheritedClassNumber()
Returns the number of inherited classes for the current Class object. |
org.objectweb.util.monolog.api.Logger |
getLogger()
Returns a logger to an component that wants to log things. |
org.objectweb.util.monolog.api.LoggerFactory |
getLoggerFactory()
Returns a logger factory that allows the creation of new loggers. |
java.lang.String |
getName()
Allows to know the name of the current class object. |
NameDef |
getNameDef(java.lang.String mappingName)
Returns a NameDef object from a given mapperName and mappingName. |
MetaObject |
getParent()
Allows to know the parent MetaObject of the current MetaObject. |
TypedElement |
getTypedElement(java.lang.String fieldName)
Allows to obtain an existing Field. |
boolean |
isAbstract()
Allows to know if the current class is an abstract class or not. |
boolean |
isInherited()
Tests if this class is inherited by another one. |
java.util.Iterator |
iterateAllField()
Returns an iterator on existing class fields + fields from super classes. |
java.util.Iterator |
iterateAllHiddenField()
Provides an iterator over the all the hiddenfield of the class including inherited fields. |
java.util.Iterator |
iterateClassMapping()
Allows to know all the ClassMapping object used for the current class. |
java.util.Iterator |
iterateField()
Returns an iterator on existing class fields. |
java.util.Iterator |
iterateHiddenField()
return an iterator over the hiddenfield of the class definition. |
java.util.Iterator |
iterateInheritedClass()
Allows to obtain all the inherited classes from the current class object. |
java.util.Iterator |
iterateNameDef()
Returns an iterator on existing NameDef for the current Class. |
protected java.util.Collection |
listField()
returns an ArrayList which contains the current fields. |
void |
setInherited()
Specifies that this class is inherited by another one within the set of compiled ones. |
void |
setLogger(org.objectweb.util.monolog.api.Logger logger)
Defines a logger object. |
void |
setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerFactory)
Defines the logger factory to obtain new logger. |
void |
setParent(MetaObject itsParent)
Set the parent of the current meta object if it is not yet done by the constructor of the meta object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicClass(java.lang.String className,
boolean abstractClass,
MetaObject parent)
className - the name of the current classabstractClass - true if the current class is abstract, else false
if the current class is not abstractparent - the parent of the current object| Method Detail |
public boolean isAbstract()
isAbstract in interface Classpublic java.lang.String getName()
getName in interface Classpublic java.lang.String getFQName()
getFQName in interface Classpublic TypedElement getTypedElement(java.lang.String fieldName)
getTypedElement in interface ClassfieldName - the name of the class fieldpublic NameDef createNameDef()
createNameDef in interface ClassnameDefName - the name of the nameDef read in the persistence
description fileisSystem - true, the namedef is defined outside jorm, and false,
the namedef is define inside jormpublic NameDef getNameDef(java.lang.String mappingName)
getNameDef in interface ClassmappingName - the name of the mappingpublic java.util.Iterator iterateNameDef()
iterateNameDef in interface Class
public PrimitiveElement createPrimitiveElement(java.lang.String fieldName,
PType type)
createPrimitiveElement in interface ClassfieldName - the name of the primitive fieldtype - the PType of the primitive field
public ScalarField createHiddenField(java.lang.String fieldName,
PType type)
createHiddenField in interface ClassfieldName - the name of the field to createtype - the type of the field to create
public ClassRef createClassRef(java.lang.String fieldName,
Class class_)
createClassRef in interface ClassfieldName - the name of the fieldclassName - the string representation of the class which represents
the reference of the field
public GenClassRef createGenClassRef(java.lang.String fieldName,
java.lang.String genName)
createGenClassRef in interface ClassfieldName - the name of the fieldgenName - the GenClass object which represents the reference of
the fieldpublic java.util.Iterator iterateField()
iterateField in interface Classprotected java.util.Collection listField()
public java.util.Iterator iterateAllField()
iterateAllField in interface Classpublic java.util.Collection getAllFields()
public java.util.Iterator iterateAllHiddenField()
iterateAllHiddenField in interface Classpublic java.util.Iterator iterateHiddenField()
iterateHiddenField in interface Classorg.objectweb.jorm.metainfo.api.Classpublic ScalarField getHiddenField(java.lang.String fieldName)
getHiddenField in interface Classorg.objectweb.jorm.metainfo.api.Classfieldname - the name of the hiddenfield.public java.util.Iterator iterateInheritedClass()
iterateInheritedClass in interface Classpublic void addInheritedClass(Class class_)
addInheritedClass in interface Classclass_ - the inherited class to add to inherited classes listpublic int getInheritedClassNumber()
getInheritedClassNumber in interface Class
public ClassMapping getClassMapping(java.lang.String mapperName,
java.lang.String mappingName)
getClassMapping in interface ClassmapperName - the name of the mapper class name
public ClassMapping createClassMapping(java.lang.String mapperName,
java.lang.String mappingName)
createClassMapping in interface ClassmapperName - the name of the class mappermappingName - the name of the class mappingpublic java.util.Iterator iterateClassMapping()
iterateClassMapping in interface Classpublic void addAllInheritedClass(java.util.Map table)
addAllInheritedClass in interface Classtable - the hashtable to buildpublic int getFieldRefNumber()
getFieldRefNumber in interface Classpublic void setInherited()
setInherited in interface Classpublic boolean isInherited()
isInherited in interface Classpublic MetaObject getParent()
getParent in interface MetaObjectpublic void setParent(MetaObject itsParent)
setParent in interface MetaObjectitsParent - the parent MetaObject of the current objectpublic void setLogger(org.objectweb.util.monolog.api.Logger logger)
setLogger in interface Loggablelogger - the logger objectpublic void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerFactory)
setLoggerFactory in interface LoggableloggerFactory - the LoggerFactory object to obtain a logger objectpublic org.objectweb.util.monolog.api.Logger getLogger()
LoggablegetLogger in interface Loggableorg.objectweb.jorm.util.api.Loggablelogger - the logger objectpublic org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
LoggablegetLoggerFactory in interface Loggableorg.objectweb.jorm.util.api.Loggableloggerfactory - the LoggerFactory object to obtain new loggers
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||