com.triactive.jdo.store.mapping
Class RawOIDMapping

java.lang.Object
  extended bycom.triactive.jdo.store.mapping.Mapping
      extended bycom.triactive.jdo.store.mapping.ColumnMapping
          extended bycom.triactive.jdo.store.mapping.OIDMapping
              extended bycom.triactive.jdo.store.mapping.RawOIDMapping

public class RawOIDMapping
extends OIDMapping

A column mapping that maps a raw OID object to a single column.

This mapping is rarely used. One place it is used is if an application specifically declares a persistent field to be of type OID.

Author:
Mike Martin

Field Summary
 
Fields inherited from class com.triactive.jdo.store.mapping.ColumnMapping
col, typeInfo
 
Fields inherited from class com.triactive.jdo.store.mapping.Mapping
dba, fmd, type
 
Constructor Summary
RawOIDMapping(DatabaseAdapter dba, java.lang.Class type)
          Constructs a new raw OID mapping for a given Java type.
RawOIDMapping(DatabaseAdapter dba, FieldMetaData fmd)
          Constructs a new raw OID mapping for a given persistent field.
 
Method Summary
 SqlExpression newSqlExpression(QueryStatement.QueryColumn qsc)
          Returns an SQL expression representing a reference to a column in a query statement.
 SqlExpression newSqlLiteral(QueryStatement qs, java.lang.Object value)
          Returns an SQL expression representing the literal value of a Java object.
 
Methods inherited from class com.triactive.jdo.store.mapping.OIDMapping
getObject, mapTo, setObject
 
Methods inherited from class com.triactive.jdo.store.mapping.ColumnMapping
accessAsFieldIn, chooseColumnType, defineConstraints, defineStorage, equals, getBoolean, getByte, getChar, getColumn, getDouble, getFloat, getInt, getLong, getShort, getSqlInsertionValue, getSqlUpdateValue, getString, getTypeInfo, hashCode, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
 
Methods inherited from class com.triactive.jdo.store.mapping.Mapping
getDefaultMappingsByType, getFieldMetaData, getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawOIDMapping

public RawOIDMapping(DatabaseAdapter dba,
                     java.lang.Class type)
Constructs a new raw OID mapping for a given Java type.

Parameters:
dba - the database adapter
type - The Java class that this mapping maps to the database. Must be OID.class or a subclass.

RawOIDMapping

public RawOIDMapping(DatabaseAdapter dba,
                     FieldMetaData fmd)
Constructs a new raw OID mapping for a given persistent field.

Parameters:
dba - the database adapter
fmd - the field metadata for the field that this mapping maps to the database
Method Detail

newSqlLiteral

public SqlExpression newSqlLiteral(QueryStatement qs,
                                   java.lang.Object value)
Description copied from class: Mapping
Returns an SQL expression representing the literal value of a Java object. The object must be of a type used with this mapping.

Specified by:
newSqlLiteral in class Mapping
Parameters:
qs - the surrounding query statement for the expression
value - the literal value

newSqlExpression

public SqlExpression newSqlExpression(QueryStatement.QueryColumn qsc)
Description copied from class: ColumnMapping
Returns an SQL expression representing a reference to a column in a query statement.

Specified by:
newSqlExpression in class ColumnMapping
Parameters:
qsc - the query column reference


Copyright 2001-2007 The TJDO Project All Rights Reserved.