SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.meta.map
Class NToPCObjectMapMapping

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
        |
        +--com.solarmetric.rd.kodo.impl.jdbc.meta.ExtensionsMapping
              |
              +--com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping
                    |
                    +--com.solarmetric.rd.kodo.impl.jdbc.meta.map.ReferenceMapping
                          |
                          +--com.solarmetric.rd.kodo.impl.jdbc.meta.map.ContainerMapping
                                |
                                +--com.solarmetric.rd.kodo.impl.jdbc.meta.map.AbstractMapMapping
                                      |
                                      +--com.solarmetric.rd.kodo.impl.jdbc.meta.map.ColumnMapMapping
                                            |
                                            +--com.solarmetric.rd.kodo.impl.jdbc.meta.map.NToPCObjectMapMapping
All Implemented Interfaces:
java.lang.Comparable, Extensions, FieldMetaData

public class NToPCObjectMapMapping
extends ColumnMapMapping

A map where the keys are simple values and the values are unknown persistent objects.


Field Summary
static java.lang.String TYPE
           
 
Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping
CONTAINER_META, DELETE_ACTION, ELEMENT_DELETE_ACTION, ELEMENT_INDEXED, ELEMENT_SIZE, EMPTY_COLUMNS, INDEXED, KEY_DELETE_ACTION, KEY_INDEXED, KEY_SIZE, ORDERED, REF_DELETE_ACTION, REF_INDEXED, SIZE, TYPE_ASCII_STREAM, TYPE_BINARY_STREAM, TYPE_BLOB, TYPE_BYTES, TYPE_CHAR_STREAM, TYPE_CLOB, TYPE_JDBC_DEFAULT, TYPE_REF, TYPE_SQL_ARRAY, TYPE_SQL_DATE, TYPE_SQL_OBJECT, TYPE_TIME, TYPE_TIMESTAMP, USE_FIELD_MAP, USE_NULL_IND, VALUE_DELETE_ACTION, VALUE_INDEXED, VALUE_SIZE
 
Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
DEFAULT, FALSE, LOB, TRUE, UNIQUE
 
Fields inherited from interface com.solarmetric.rd.kodo.meta.FieldMetaData
DEPENDENT, ELEMENT_DEPENDENT, ELEMENT_PC_CLASS, INVERSE_OWNER, KEY_DEPENDENT, KEY_PC_CLASS, MANAGE_NONE, MANAGE_PERSISTENT, MANAGE_TRANSACTIONAL, NULL_DEFAULT, NULL_EXCEPTION, NULL_NONE, PC_CLASS, TYPE_ARRAY, TYPE_BIGDECIMAL, TYPE_BIGINTEGER, TYPE_BOOLEAN, TYPE_BOOLEAN_OBJ, TYPE_BYTE, TYPE_BYTE_OBJ, TYPE_CHAR, TYPE_CHAR_OBJ, TYPE_COLLECTION, TYPE_DATE, TYPE_DOUBLE, TYPE_DOUBLE_OBJ, TYPE_FCO, TYPE_FLOAT, TYPE_FLOAT_OBJ, TYPE_INT, TYPE_INT_OBJ, TYPE_LOCALE, TYPE_LONG, TYPE_LONG_OBJ, TYPE_MAP, TYPE_NUMBER, TYPE_OBJECT, TYPE_PC_OBJECT, TYPE_SHORT, TYPE_SHORT_OBJ, TYPE_STRING, VALUE_DEPENDENT, VALUE_PC_CLASS
 
Constructor Summary
NToPCObjectMapMapping(com.solarmetric.rd.kodo.meta.FieldMetaData meta)
          Constructor.
 
Method Summary
 boolean fromMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info, boolean adapt)
          Deserialize this mapping from a simple MappingInfo instance parsed from XML or some other format.
protected  int getDataStoreTypeCode()
          Return the type of the value stored in the data store for the value column.
 java.lang.Object getDataStoreValue(java.lang.Object val)
          Translate the given field value to its datastore equivalent.
protected  java.lang.Object getJavaValue(java.lang.Object val, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, java.sql.Connection conn)
          Return the Java value for the given datastore value.
 java.lang.String getMappingType()
          Return the abbreviated name of this mapping, or the full class name if it is a custom mapping.
 boolean map()
          Map a new instance of this mapping type.
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.map.ColumnMapMapping
delete, deleteEmbedded, getColumns, getJDBCType, getKeyColumn, getKeyColumns, getKeyDataStoreTypeCode, getKeyJavaValue, getKeyJDBCType, getValueColumn, insert, joinKeyRelation, joinRelation, load, nullEmbedded, refSchemaComponents, setKeyColumn, setValueColumn, toMappingInfo, update
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.map.AbstractMapMapping
joinKey
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.map.ContainerMapping
appendIsEmpty, appendIsNotNull, appendIsNull, getMetaDataColumn, getVRowTable, join, load, newCollection, newMap, select, selectVRowData, setMetaDataColumn
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.map.ReferenceMapping
createRefForeignKey, fromMappingInfo, getRefForeignKey, getSelectJoins, getTable, join, setRefForeignKey, wherePrimaryKey
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping
addExtension, addExtension, checkRepository, compareTo, deleteEmbedded, getBooleanExtension, getBooleanExtension, getContainerMeta, getDeclaredElementType, getDeclaredIndex, getDeclaredKeyType, getDeclaredType, getDefaults, getDeleteAction, getDoubleExtension, getDoubleExtension, getElementDeleteAction, getElementIndexed, getElementPCClass, getElementSize, getElementType, getElementTypeCode, getElementTypeMapping, getElementTypeMetaData, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionKeys, getExtensionKeys, getExtensionVendors, getFieldFlag, getFullName, getIndex, getIndexed, getIntExtension, getIntExtension, getInverseOwner, getInverseOwnerMapping, getInverseOwnerMetaData, getKeyDataStoreValue, getKeyDeleteAction, getKeyIndexed, getKeyPCClass, getKeySize, getKeyType, getKeyTypeCode, getKeyTypeMapping, getKeyTypeMetaData, getManagement, getMappingRepository, getMetaData, getName, getNullValue, getObjectExtension, getObjectExtension, getOrdered, getOwner, getOwnerMapping, getPCClass, getRefDeleteAction, getRefIndexed, getSize, getStringExtension, getStringExtension, getType, getTypeCode, getTypeMapping, getTypeMetaData, getUseFieldMapping, getUseNullIndicator, hasExtension, hasExtension, invalidateResolve, isCustomDeleteEmbedded, isCustomNullEmbedded, isDeleteActionDeferred, isDependent, isEager, isElementDeleteActionDeferred, isElementDependent, isElementEager, isEmbedded, isEmbeddedElement, isEmbeddedKey, isEmpty, isExplicit, isInDefaultFetchGroup, isKeyDeleteActionDeferred, isKeyDependent, isKeyEager, isPrimaryKey, isRefDeleteActionDeferred, isValue, newInstance, newInstance, nullEmbedded, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension, resolve, setContainerMeta, setDeclaredIndex, setDeleteAction, setDependent, setElementDeleteAction, setElementDependent, setElementIndexed, setElementPCClass, setElementSize, setElementType, setEmbedded, setEmbeddedElement, setEmbeddedKey, setExplicit, setInDefaultFetchGroup, setIndex, setIndexed, setInverseOwner, setKeyDeleteAction, setKeyDependent, setKeyIndexed, setKeyPCClass, setKeySize, setKeyType, setManagement, setName, setNullValue, setOrdered, setOwner, setPCClass, setPrimaryKey, setRefDeleteAction, setRefIndexed, setSize, setType, setUseFieldMapping, setUseNullIndicator, toString
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
checkIndex, createColumn, delete, getDBDictionary, getForeignKey, getLog, getSchemaGroup, insert, invalidMapping, isCustomDelete, isCustomInsert, isCustomUpdate, reverseMap, setForeignKey, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.solarmetric.rd.kodo.meta.Extensions
addExtension, addExtension, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values
Constructor Detail

NToPCObjectMapMapping

public NToPCObjectMapMapping(com.solarmetric.rd.kodo.meta.FieldMetaData meta)
Constructor. Supply underlying metadata.

Method Detail

getDataStoreTypeCode

protected int getDataStoreTypeCode()
Description copied from class: ColumnMapMapping
Return the type of the value stored in the data store for the value column. Defaults to FieldMetaData.getElementTypeCode().

Overrides:
getDataStoreTypeCode in class ColumnMapMapping

getDataStoreValue

public java.lang.Object getDataStoreValue(java.lang.Object val)
Description copied from class: FieldMapping
Translate the given field value to its datastore equivalent. If the mapping occupies multiple columns in the datastore, return an object array, else return a single object. Simply returns the given object by default.

Overrides:
getDataStoreValue in class FieldMapping

getJavaValue

protected java.lang.Object getJavaValue(java.lang.Object val,
                                        com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                                        java.sql.Connection conn)
                                 throws java.sql.SQLException
Description copied from class: ColumnMapMapping
Return the Java value for the given datastore value. Returns the given value by default.

Overrides:
getJavaValue in class ColumnMapMapping
java.sql.SQLException

getMappingType

public java.lang.String getMappingType()
Description copied from class: Mapping
Return the abbreviated name of this mapping, or the full class name if it is a custom mapping. Returns the full class name by default.

Overrides:
getMappingType in class Mapping

fromMappingInfo

public boolean fromMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info,
                               boolean adapt)
Description copied from class: Mapping
Deserialize this mapping from a simple MappingInfo instance parsed from XML or some other format. If the info is incompatible and adapt is true, try to adapt to the new info, else return false. This method must validate the given mapping information using the SchemaGroup.findTable(java.lang.String) method to find any needed tables, the Table.getColumn(java.lang.String) method to retrieve columns from those tables, and the Column.isCompatible(int, int) method to check all column types. This is important, as some schema groups use these methods to build themselves up dynamically rather than reading schema information from the database.

Overrides:
fromMappingInfo in class ColumnMapMapping

map

public boolean map()
Description copied from class: Mapping
Map a new instance of this mapping type. If the underlying metadata cannot be mapped using this type, return false.

Overrides:
map in class ColumnMapMapping

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.