org.objectweb.jorm.mapper.rdb.metainfo
Class RdbPrimitiveElementMapping

java.lang.Object
  extended byorg.objectweb.jorm.metainfo.lib.BasicMetaObject
      extended byorg.objectweb.jorm.metainfo.lib.BasicMappingStructure
          extended byorg.objectweb.jorm.mapper.rdb.metainfo.RdbPrimitiveElementMapping
All Implemented Interfaces:
java.lang.Comparable, Loggable, MappingStructure, MetaObject, PrimitiveElementMapping, java.io.Serializable

public class RdbPrimitiveElementMapping
extends BasicMappingStructure
implements PrimitiveElementMapping, java.lang.Comparable

Description

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMappingStructure
linkedMO
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
debug, logger, loggerFactory, parent
 
Constructor Summary
RdbPrimitiveElementMapping(java.lang.String name, java.lang.String type, boolean notNull, MetaObject linkedMO, MetaObject parent)
          Builds a new BasicRdbPrimitiveElementMapping.
RdbPrimitiveElementMapping(java.lang.String name, java.lang.String type, boolean notNull, MetaObject linkedMO, MetaObject parent, RdbJoin join)
          Builds a new BasicRdbPrimitiveElementMapping.
 
Method Summary
 void bindPrimitiveElement(RdbJoin join, PrimitiveElement pe)
           
 int compareTo(java.lang.Object o)
           
 java.lang.String getEqualPredicateValue()
          Returns the predicate value associated with the column.
 RdbJoin getJoinByPrimitiveElement(PrimitiveElement pe)
           
 java.lang.String getName()
          Returns the name of the current column.
 java.util.Map getPrimitiveElementByRdbJoin()
           
 RdbFilter getRdbFilter()
          Returns an RdbFilter object.
 java.lang.String getType()
          Returns the SQL type of the current object.
 boolean isFilter()
          Indicates if the column is used as a filter column
 boolean isNotNull()
          Allows to know if the column is null or not.
 PrimitiveElement lookupPrimitiveElement(RdbJoin join)
           
 void setIsNotNull(boolean isNotNull)
           
 void setName(java.lang.String columnName)
           
 void setType(java.lang.String sqlType)
           
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMappingStructure
getLinkedMO, getMapperName, getProjectName, setLinkedMO
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
getChildren, getLogger, getLoggerFactory, getManager, getParent, setLogger, setLoggerFactory, setLoggingOnChild, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MappingStructure
getLinkedMO, getMapperName, getProjectName, setLinkedMO
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Constructor Detail

RdbPrimitiveElementMapping

public RdbPrimitiveElementMapping(java.lang.String name,
                                  java.lang.String type,
                                  boolean notNull,
                                  MetaObject linkedMO,
                                  MetaObject parent)
Builds a new BasicRdbPrimitiveElementMapping.

Parameters:
name - the name of the column
type - the sql type of the column
notNull - true, if the column can not be null, else false.
parent - the parent of the current object

RdbPrimitiveElementMapping

public RdbPrimitiveElementMapping(java.lang.String name,
                                  java.lang.String type,
                                  boolean notNull,
                                  MetaObject linkedMO,
                                  MetaObject parent,
                                  RdbJoin join)
Builds a new BasicRdbPrimitiveElementMapping.

Parameters:
name - the name of the column
type - the sql type of the column
notNull - true, if the column can not be null, else false.
parent - the parent of the current object
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

getName

public java.lang.String getName()
Returns the name of the current column.

Returns:
the string representation of column name

getType

public java.lang.String getType()
Returns the SQL type of the current object.

Returns:
the string representation of the sql type

getRdbFilter

public RdbFilter getRdbFilter()
Returns an RdbFilter object.

Returns:
an RdbFilter object.

isFilter

public boolean isFilter()
Indicates if the column is used as a filter column

Returns:
true, if the column is a filter column, else false

getEqualPredicateValue

public java.lang.String getEqualPredicateValue()
                                        throws PException
Returns the predicate value associated with the column. If the predicate does not correspond to an equal operator, a PException is raised.

Returns:
the predicate value associated with the column.
Throws:
PException

isNotNull

public boolean isNotNull()
Allows to know if the column is null or not.

Returns:
true, if the column is null, else false

setName

public void setName(java.lang.String columnName)

setType

public void setType(java.lang.String sqlType)

setIsNotNull

public void setIsNotNull(boolean isNotNull)

bindPrimitiveElement

public void bindPrimitiveElement(RdbJoin join,
                                 PrimitiveElement pe)

lookupPrimitiveElement

public PrimitiveElement lookupPrimitiveElement(RdbJoin join)

getPrimitiveElementByRdbJoin

public java.util.Map getPrimitiveElementByRdbJoin()

getJoinByPrimitiveElement

public RdbJoin getJoinByPrimitiveElement(PrimitiveElement pe)