org.objectweb.medor.query.jorm.lib
Class PNameField
- Cloneable, Field, JormField, NullStatus, QueryTreeField
This class represents Fields corresponding to the PName of a class or a
Genclass(the NameDef of the class itself) or the the PName associated to a
reference field or to a genclass element.
The name of such a Field is a constant.
Inherited field te:
===================
In case where this PNameField represents the a reference field, this
field is not null and references the Jorm Meta object Reference.
In case where this PNameField represents GenClass identifier or the
genclass element this field is not null and references the Jorm meta
object GenClassRef.
- Alexandre Lefebvre, Sebastien Chassande-Barrioz
protected Class | clazz - In case where this PNameField represents the PName of a Jorm class, this
field is not null and references the Jorm Meta object Class.
|
protected boolean | isClassPName - If the current PNameField represents a PName of a Jorm class or genclass,
this field is equals to 'true'.
|
protected boolean | isInGenClass - This fiedl returns 'true' if the current PNameField has been built to
describe the PName identifier of a GenClass or the PName of the GenClass
element.
|
PNameField()
|
PNameField(String fn, Class cl, QueryTree qt) - This constructor must be used to built a PNameField associated to a Class
identifier or a reference field.
|
PNameField(String fieldName, ClassRef cr, QueryTree qt) - This constructor must be used to built a PNameField associated to a
classRef.
|
PNameField(String fieldName, GenClassRef gcr, boolean isGenClassPName, QueryTree qt) - This constructor must be used to built a PNameField associated to a
GenClass identifier or the genclass element.
|
Object | clone(Object clone, Map obj2clone)
|
GenClassRef | getGenClassRef() - It returns the jorm meta object GenClassRef in case of this PNameField
represents a GenClass identifier or a GenClass element.
|
Class | getMetaObjectClass() - It returns the jorm meta object Class in case of this PNameField
represents an identifier of a jorm class.
|
NameDef | getNameDef(JormExtent extent) - Retrieves the NameDef corresponding to this PNameField
|
String | getPNamingContextParameter() - Retrieves the name of the ParameterOperand containing the PNamingContext.
|
Reference | getReference() - It returns the jorm meta object Reference in case of this PNameField
represents a reference field in a jorm class.
|
MetaObject | getTargetedMetaObject() - Retrieves the Jorm meta object of the Class represented by this
PNameField.
|
boolean | isClassPName() - It returns 'true' when this PNameField represents the identifier of a jorm
class or a jorm genclass.
|
boolean | isInGenClass() - It returns 'true' if the current PNameField has been built to
describe the PName identifier of a GenClass or the PName of the GenClass
element.
|
clazz
protected Class clazz
In case where this PNameField represents the PName of a Jorm class, this
field is not null and references the Jorm Meta object Class.
isClassPName
protected boolean isClassPName
If the current PNameField represents a PName of a Jorm class or genclass,
this field is equals to 'true'. Otherwise the current PNameField
represents a reference field or the genclass element then this field is
equals to 'false'.
isInGenClass
protected boolean isInGenClass
This fiedl returns 'true' if the current PNameField has been built to
describe the PName identifier of a GenClass or the PName of the GenClass
element.
PNameField
public PNameField()
PNameField
public PNameField(String fn,
Class cl,
QueryTree qt)
throws MedorException
This constructor must be used to built a PNameField associated to a Class
identifier or a reference field.
fn
- is the name which must be given to the field.cl
- is the jorm meta object Class associated to this PNameField. In
case of the class contains a field which the name is equals to @fn then
this PNameField represents a reference field.qt
- is the QueryTree which is associated to this QueryTree field.
PNameField
public PNameField(String fieldName,
ClassRef cr,
QueryTree qt)
throws MedorException
This constructor must be used to built a PNameField associated to a
classRef.
cr
- is the jorm meta object ClassRef associated to this PNameField.qt
- is the QueryTree which is associated to this QueryTree field.
PNameField
public PNameField(String fieldName,
GenClassRef gcr,
boolean isGenClassPName,
QueryTree qt)
throws MedorException
This constructor must be used to built a PNameField associated to a
GenClass identifier or the genclass element.
fieldName
- is the name which must be given to the field.gcr
- is the jorm meta object which describes the genclass.isGenClassPName
- indicates if this PNameField will represent a
genclass identifier(value='true'). Otherwise the this PNameField will
represent a genclass element(value='false').qt
- is the QueryTree which is associated to this QueryTree field.
clone
public Object clone(Object clone,
Map obj2clone)
throws CloneNotSupportedException
- clone in interface BasicJormField
getGenClassRef
public GenClassRef getGenClassRef()
It returns the jorm meta object GenClassRef in case of this PNameField
represents a GenClass identifier or a GenClass element.
getMetaObjectClass
public Class getMetaObjectClass()
It returns the jorm meta object Class in case of this PNameField
represents an identifier of a jorm class.
getNameDef
public NameDef getNameDef(JormExtent extent)
throws MedorException
Retrieves the NameDef corresponding to this PNameField
extent
- attached to this PNameField
MedorException
- if it is not possible to fetch the Mapping for
the project name and the mapper attached to the JormExtent.
getPNamingContextParameter
public String getPNamingContextParameter()
Retrieves the name of the ParameterOperand containing the PNamingContext.
getReference
public Reference getReference()
It returns the jorm meta object Reference in case of this PNameField
represents a reference field in a jorm class.
getTargetedMetaObject
public MetaObject getTargetedMetaObject()
Retrieves the Jorm meta object of the Class represented by this
PNameField. If the parameter is
a Class then the same value is returned. If the parameter is a ClassRef
or a GenClassRef then referenced Class is returned. Otherwise a null
value is returned.
isClassPName
public boolean isClassPName()
It returns 'true' when this PNameField represents the identifier of a jorm
class or a jorm genclass.
isInGenClass
public boolean isInGenClass()
It returns 'true' if the current PNameField has been built to
describe the PName identifier of a GenClass or the PName of the GenClass
element.