| |
|
| java.lang.Object org.objectweb.speedo.metadata.SpeedoElement org.objectweb.speedo.metadata.SpeedoInheritance
SpeedoInheritance | public class SpeedoInheritance extends SpeedoElement (Code) | | 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'.
author: S.Chassande-Barrioz |
SPEEDO_DEFAULT_DISCRIMINENT_VALUE | final public static String SPEEDO_DEFAULT_DISCRIMINENT_VALUE(Code) | | |
STRATEGY_NEW_TABLE | final public static int STRATEGY_NEW_TABLE(Code) | | |
STRATEGY_SUBCLASS_TABLE | final public static int STRATEGY_SUBCLASS_TABLE(Code) | | |
STRATEGY_SUPERCLASS_TABLE | final public static int STRATEGY_SUPERCLASS_TABLE(Code) | | |
STRATEGY_UNKOWN | final public static int STRATEGY_UNKOWN(Code) | | |
clazz | public SpeedoClass clazz(Code) | | Is speedo meta object representing the class with inheritance. It is not
the parent class but the class which has a parent.
It must be defined at initialisation time. It must be not null.
|
discriminator | public SpeedoDiscriminator discriminator(Code) | | In case of filtered of vertical mapping, a discriminator permits to
distinguish the classes of persistent instances. This field can be null
if there is no discriminator (horizontal mapping case for instance).
|
discriminatorValues | public Map discriminatorValues(Code) | | In case of there is discriminator, this fields defines the values of the
discriminator parts.
key = discriminator part description (SpeedoField or SpeedoNoFieldColumn)
value = the value of the discriminator part for the current class;
See Also: SpeedoDiscriminator See Also: See Also: SpeedoDiscriminator.elements See Also: |
join | public SpeedoJoin join(Code) | | Is the meta object representing the join to herited table in case of
vertical mapping. It can be null if the mapping is not 'vertical'.
|
remappedInheritedFields | public Map remappedInheritedFields(Code) | | is the list of field inherited (SpeedoInheritedField) from ancestors.
The mapping of these fields are redefined. Typical case whith inherited
fields correspond to horizontal mapping of the inheritance (one table
per class).
key is the field name (could be fully qualified)
value is a SpeedoInheritedField
|
superClassName | public String superClassName(Code) | | Super class name.
|
SpeedoInheritance | public SpeedoInheritance()(Code) | | |
add | public void add(SpeedoInheritedField sif)(Code) | | Adds a SpeedoInheritedField for defining the mapping of an inherited
field.
Parameters: sif - is the field to add |
isFilteredMapping | public boolean isFilteredMapping()(Code) | | |
isHorizontalMapping | public boolean isHorizontalMapping()(Code) | | |
isVerticalMapping | public boolean isVerticalMapping()(Code) | | |
parseStrategy | final public static int parseStrategy(String strategyName)(Code) | | |
strategy2str | final public static String strategy2str(int s)(Code) | | |
|
|
|