com.solarmetric.rd.kodo.impl.jdbc.meta.map
Class InClassNameIndicator
java.lang.Object
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.Indicator
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.map.ColumnClassIndicator
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.map.InClassNameIndicator
- public class InClassNameIndicator
- extends ColumnClassIndicator
Determines the class of database records using a column holding the
class name, and limits SELECTs using an IN (...) statement. This mapping
initializes the possible subclasses with a SELECT DISTINCT on the
class column, and thereafter assumes it has a complete list of subclasses
to work with.
|
Field Summary |
static java.lang.String |
TYPE
|
|
Method Summary |
void |
addClassConditions(com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel,
com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping cls,
boolean subclasses)
Add SQL to limit the classes selected as much as possible to the
given base class, and optionally its subclasses. |
protected java.lang.Class |
getClass(java.lang.Object indicator,
java.lang.ClassLoader loader)
Return the class for the given column value. |
protected java.lang.Object |
getClassIndicator(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
Return the value the column should take. |
protected int |
getDataStoreTypeCode()
Return the FieldMapping type code for the type of data stored
by this indicator. |
java.lang.String |
getMappingType()
Return the abbreviated name of this mapping, or the full class name if
it is a custom mapping. |
| 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 |
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
InClassNameIndicator
public InClassNameIndicator()
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
getDataStoreTypeCode
protected int getDataStoreTypeCode()
- Description copied from class:
ColumnClassIndicator
- Return the
FieldMapping type code for the type of data stored
by this indicator.
- Specified by:
getDataStoreTypeCode in class ColumnClassIndicator
getClassIndicator
protected java.lang.Object getClassIndicator(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
- Description copied from class:
ColumnClassIndicator
- Return the value the column should take.
- Specified by:
getClassIndicator in class ColumnClassIndicator
getClass
protected java.lang.Class getClass(java.lang.Object indicator,
java.lang.ClassLoader loader)
throws java.lang.ClassNotFoundException
- Description copied from class:
ColumnClassIndicator
- Return the class for the given column value.
- Specified by:
getClass in class ColumnClassIndicator
java.lang.ClassNotFoundException
addClassConditions
public void addClassConditions(com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel,
com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping cls,
boolean subclasses)
- Description copied from class:
ClassIndicator
- Add SQL to limit the classes selected as much as possible to the
given base class, and optionally its subclasses.
- Specified by:
addClassConditions in class ClassIndicator
Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.