org.objectweb.jorm.metainfo.api

Interface NameRef

All Superinterfaces:
MetaObject, Serializable

public interface NameRef
extends MetaObject

The NameRef interface defines methods to manage reference to composite name. NameRef are used in namedef to reference a composite name that describe the structure of the namedef.

Author:
N. De Palma

Method Summary

void
addProjection(String namefield, String classfield)
Add a projection between a field in the composite name structure and a field in the class.
boolean
equalCNType(Object obj)
test if the type of the compositename referenced in this nameref is equals to the type referenced by the nameref passed as parameter.
String
getCNPackageName()
Return the name of the schema for the composite name referenced by this nameref.
String
getClassFieldName(String fieldName)
Return the class field name associated with the composite name field name.
CompositeName
getCompositeName()
Retrieve the metaobject describing the composite name referenced by this nameref.
String
getName()
Retrieve the name of the nameref.
Map
getProjection()
Retrieve the list of projections between the fields of the composite name and the field of the class.

Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject

getParent, setParent

Method Details

addProjection

public void addProjection(String namefield,
                          String classfield)
Add a projection between a field in the composite name structure and a field in the class.

Parameters:
namefield - the name of the field in the composite name
classfield - the name of the field in the class


equalCNType

public boolean equalCNType(Object obj)
test if the type of the compositename referenced in this nameref is equals to the type referenced by the nameref passed as parameter.

Parameters:
obj - the nameref to compare to

Returns:
true if the schema name ans the compositename name are equal.


getCNPackageName

public String getCNPackageName()
Return the name of the schema for the composite name referenced by this nameref.


getClassFieldName

public String getClassFieldName(String fieldName)
Return the class field name associated with the composite name field name.

Parameters:
fieldName - the name of a field in the composite name.

Returns:
a String object containing a class field name.


getCompositeName

public CompositeName getCompositeName()
Retrieve the metaobject describing the composite name referenced by this nameref.

Returns:
the composite name.


getName

public String getName()
Retrieve the name of the nameref. This name is equal to the name of the referenced composite name.

Returns:
the nameof the nameref used to describe the current pname.


getProjection

public Map getProjection()
Retrieve the list of projections between the fields of the composite name and the field of the class.

Returns:
a map object describing the projection.