|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.metadata.SpeedoElement
org.objectweb.speedo.metadata.SpeedoInheritance
public class SpeedoInheritance
Defines a the Speedo meta information about the inheritance. There is 3 possible mappings - The first mapping is the horizontal. Each concrete class has its own table containg all fields (fields of the class + inherited fields). The strategy for this mapping is new-table for each class. In each class, all inherited field must be mapped included inherited field. This means that in a class all inherited fields must be mapped into the tables of the current class. (#remappedInheritedFields) - The second mapping is filtered. All classes are mapped into the same tables. The table name is defined on the parent class. The strategy of the children classes is 'superclass-table'. To distinguish classes, a discriminator is required. (#discriminator) - The third mapping is vertical.All classes have its own table containing only fields of the class (not the inherited fields). Each table of devrived classes must defines a join to its parent (#join). In a vertical mapping it is possible and advised to use a discriminator similary than the filtered mapping. The strategy of the children is 'new-table'.
Field Summary | |
---|---|
SpeedoClass |
clazz
Is speedo meta object representing the class with inheritance. |
SpeedoDiscriminator |
discriminator
In case of filtered of vertical mapping, a discriminator permits to distinguish the classes of persistent instances. |
java.util.Map |
discriminatorValues
In case of there is discriminator, this fields defines the values of the discriminator parts. |
SpeedoJoin |
join
Is the meta object representing the join to herited table in case of vertical mapping. |
java.util.Map |
remappedInheritedFields
is the list of field inherited (SpeedoInheritedField) from ancestors. |
static java.lang.String |
SPEEDO_DEFAULT_DISCRIMINENT_VALUE
|
int |
strategy
Is the inheritance strategy. |
static int |
STRATEGY_NEW_TABLE
|
static int |
STRATEGY_SUBCLASS_TABLE
|
static int |
STRATEGY_SUPERCLASS_TABLE
|
static int |
STRATEGY_UNKOWN
|
java.lang.String |
superClassName
Super class name. |
Fields inherited from class org.objectweb.speedo.metadata.SpeedoElement |
---|
jdoExtension, personality |
Constructor Summary | |
---|---|
SpeedoInheritance()
|
|
SpeedoInheritance(SpeedoClass moClass)
|
Method Summary | |
---|---|
void |
add(SpeedoInheritedField sif)
Adds a SpeedoInheritedField for defining the mapping of an inherited field. |
boolean |
isFilteredMapping()
|
boolean |
isHorizontalMapping()
|
boolean |
isVerticalMapping()
|
SpeedoInheritedField |
newSpeedoInheritedField(SpeedoField sf)
|
SpeedoInheritedField |
newSpeedoInheritedField(java.lang.String fieldName)
|
static int |
parseStrategy(java.lang.String strategyName)
|
static java.lang.String |
strategy2str(int s)
|
Methods inherited from class org.objectweb.speedo.metadata.SpeedoElement |
---|
addExtension, addInArray, getExtension, getExtensionByKey, getExtensionValueByKey, indexOfInArray, removeInArray, setValueInArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STRATEGY_UNKOWN
public static final int STRATEGY_NEW_TABLE
public static final int STRATEGY_SUPERCLASS_TABLE
public static final int STRATEGY_SUBCLASS_TABLE
public int strategy
STRATEGY_NEW_TABLE
,
STRATEGY_SUBCLASS_TABLE
,
#see #STRATEGY_UNKOWN
public SpeedoClass clazz
public java.lang.String superClassName
public SpeedoJoin join
public java.util.Map remappedInheritedFields
public SpeedoDiscriminator discriminator
public static final java.lang.String SPEEDO_DEFAULT_DISCRIMINENT_VALUE
public java.util.Map discriminatorValues
SpeedoDiscriminator
,
SpeedoDiscriminator.elements
Constructor Detail |
---|
public SpeedoInheritance()
public SpeedoInheritance(SpeedoClass moClass)
Method Detail |
---|
public static final java.lang.String strategy2str(int s)
public static final int parseStrategy(java.lang.String strategyName)
public void add(SpeedoInheritedField sif)
sif
- is the field to addpublic SpeedoInheritedField newSpeedoInheritedField(java.lang.String fieldName) throws SpeedoRuntimeException
fieldName
- is the
SpeedoRuntimeException
- if the field has not been found or if the
field belong the current class (#clazz).public SpeedoInheritedField newSpeedoInheritedField(SpeedoField sf) throws SpeedoRuntimeException
SpeedoRuntimeException
public boolean isHorizontalMapping()
public boolean isVerticalMapping()
public boolean isFilteredMapping()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |