org.apache.openjpa.jdbc.meta.strats
Class ClassNameDiscriminatorStrategy
java.lang.Object
   org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
       org.apache.openjpa.jdbc.meta.strats.AbstractDiscriminatorStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractDiscriminatorStrategy
           org.apache.openjpa.jdbc.meta.strats.InValueDiscriminatorStrategy
org.apache.openjpa.jdbc.meta.strats.InValueDiscriminatorStrategy
               org.apache.openjpa.jdbc.meta.strats.ClassNameDiscriminatorStrategy
org.apache.openjpa.jdbc.meta.strats.ClassNameDiscriminatorStrategy
- All Implemented Interfaces: 
- java.io.Serializable, DiscriminatorStrategy, Strategy
- public class ClassNameDiscriminatorStrategy 
- extends InValueDiscriminatorStrategy
Stores the class name along with each database object record.
- Author:
- Abe White
- See Also:
- Serialized Form
| Field Summary | 
| static java.lang.String | ALIAS
 | 
 
 
 
| Method Summary | 
|  java.lang.String | getAlias()Return the alias of this strategy.
 | 
| protected  java.lang.Class | getClass(java.lang.Object val,
         JDBCStore store)Convert the given discriminator value to the corresponding class.
 | 
| protected  java.lang.Object | getDiscriminatorValue(ClassMapping cls)Return the discriminator value for the given type.
 | 
| protected  int | getJavaType()Return the Java type code from
 JavaTypesfor the discriminator
 values. | 
|  void | loadSubclasses(JDBCStore store)By default, logs a warning that this discriminator cannot calculate
 its list of subclasses on its own.
 | 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
ALIAS
public static final java.lang.String ALIAS
- See Also:
- Constant Field Values
ClassNameDiscriminatorStrategy
public ClassNameDiscriminatorStrategy()
getAlias
public java.lang.String getAlias()
- Description copied from interface: Strategy
- Return the alias of this strategy. For custom strategies, return the
 full class name.
 
- 
- Specified by:
- getAliasin interface- Strategy
- Overrides:
- getAliasin class- AbstractStrategy
 
- 
 
getJavaType
protected int getJavaType()
- Description copied from class: InValueDiscriminatorStrategy
- Return the Java type code from JavaTypesfor the discriminator
 values. This method is only used during mapping installation.
 
- 
- Specified by:
- getJavaTypein class- InValueDiscriminatorStrategy
 
- 
 
getDiscriminatorValue
protected java.lang.Object getDiscriminatorValue(ClassMapping cls)
- Description copied from class: InValueDiscriminatorStrategy
- Return the discriminator value for the given type.
 
- 
- Specified by:
- getDiscriminatorValuein class- InValueDiscriminatorStrategy
 
- 
 
getClass
protected java.lang.Class getClass(java.lang.Object val,
                                   JDBCStore store)
                            throws java.lang.ClassNotFoundException
- Description copied from class: InValueDiscriminatorStrategy
- Convert the given discriminator value to the corresponding class.
 
- 
- Specified by:
- getClassin class- InValueDiscriminatorStrategy
 
- 
- Throws:
- java.lang.ClassNotFoundException
 
loadSubclasses
public void loadSubclasses(JDBCStore store)
                    throws java.sql.SQLException,
                           java.lang.ClassNotFoundException
- Description copied from class: AbstractDiscriminatorStrategy
- By default, logs a warning that this discriminator cannot calculate
 its list of subclasses on its own.
 
- 
- Specified by:
- loadSubclassesin interface- DiscriminatorStrategy
- Overrides:
- loadSubclassesin class- AbstractDiscriminatorStrategy
 
- 
- Throws:
- java.sql.SQLException
- java.lang.ClassNotFoundException
 
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.