Package javax.jdo.annotations
Annotation Type Discriminator
-
@Target(TYPE) @Retention(RUNTIME) public @interface Discriminator
Annotation for the discriminator of the class. Corresponds to the xml element "discriminator" of the "inheritance" element.- Since:
- 2.1
- Version:
- 2.1
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
column
Name of the column for the discriminatorColumn[]
columns
The column(s) making up the discriminator.String
customStrategy
Custom strategy to use for the discriminator.String
indexed
Whether the discriminator is indexed.DiscriminatorStrategy
strategy
Strategy to use for the discriminator.String
value
The value for the discriminator for objects of this class when using "value-map" strategy.
-
-
-
Element Detail
-
strategy
DiscriminatorStrategy strategy
Strategy to use for the discriminator. The discriminator determines the class associated with a row in the datastore.- Returns:
- the strategy to use for the discriminator
- Default:
- javax.jdo.annotations.DiscriminatorStrategy.UNSPECIFIED
-
-
-
customStrategy
String customStrategy
Custom strategy to use for the discriminator. If customStrategy is non-empty, then strategy must be UNSPECIFIED.- Returns:
- the custom strategy
- Default:
- ""
-
-
-
indexed
String indexed
Whether the discriminator is indexed.- Returns:
- whether the discriminator is indexed
- Default:
- ""
-
-
-
column
String column
Name of the column for the discriminator- Returns:
- the name of the column for the discriminator
- Default:
- ""
-
-
-
value
String value
The value for the discriminator for objects of this class when using "value-map" strategy.- Returns:
- The value for the discriminator for objects of this class when using "value-map" strategy
- Default:
- ""
-
-
-
columns
Column[] columns
The column(s) making up the discriminator.- Returns:
- the column(s) making up the discriminator
- Default:
- {}
-
-