org.objectweb.jorm.metainfo.api

Interface Mapping

All Superinterfaces:
MetaObject, Serializable

public interface Mapping
extends MetaObject

A Mapping object contains mapping structures obtained by applying a set of mapping rules whose syntax and semantics depend of a particular mapper. Mapping rules define the way class instances will be stored on a particular type of persistent store and how they will be read and write from/to the persistent store.

Method Summary

void
addGenClassMapping(String genClassId, GenClassMapping genClassMapping)
Adds a GenClassMapping object.
ClassMapping
createClassMapping(String ruleName)
Create a class mapping
ClassMapping
getClassMapping()
Returns the mapping structure of the class.
GenClassMapping
getGenClassMapping(String genclassid)
Returns the GenClassMapping object of a GenClass.
Collection
getGenClassMappings()
Returns a collection of GenClassMapping objects.
String
getMapperName()
Returns the name of the mapper.
void
setClassMapping(ClassMapping classMapping)
Sets the mapping structure of the class.
void
setMapperName(String mapperName)
Sets the mapper name.

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

getParent, setParent

Method Details

addGenClassMapping

public void addGenClassMapping(String genClassId,
                               GenClassMapping genClassMapping)
Adds a GenClassMapping object.

Parameters:
genClassId - a GenClass identifier, genClassMapping a GenClassMapping object.


createClassMapping

public ClassMapping createClassMapping(String ruleName)
Create a class mapping

Parameters:
ruleName -

Returns:


getClassMapping

public ClassMapping getClassMapping()
Returns the mapping structure of the class.

Returns:
a ClassMapping object.


getGenClassMapping

public GenClassMapping getGenClassMapping(String genclassid)
Returns the GenClassMapping object of a GenClass.

Parameters:
genclassid - a GenClass identifier.

Returns:
a GenClassMapping object.


getGenClassMappings

public Collection getGenClassMappings()
Returns a collection of GenClassMapping objects.

Returns:
a collection.


getMapperName

public String getMapperName()
Returns the name of the mapper.

Returns:
the mapper name.


setClassMapping

public void setClassMapping(ClassMapping classMapping)
Sets the mapping structure of the class.

Parameters:
classMapping - a ClassMapping object.


setMapperName

public void setMapperName(String mapperName)
Sets the mapper name.

Parameters:
mapperName - the mapper name.