javax.jdo.annotations
Annotation Type Discriminator


@Target(value=TYPE)
@Retention(value=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
 java.lang.String column
          Name of the column for the discriminator
 Column[] columns
          The column(s) making up the discriminator.
 java.lang.String customStrategy
          Custom strategy to use for the discriminator.
 java.lang.String indexed
          Whether the discriminator is indexed.
 DiscriminatorStrategy strategy
          Strategy to use for the discriminator.
 java.lang.String value
          The value for the discriminator for objects of this class when using "value-map" strategy.
 

strategy

public abstract 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

public abstract java.lang.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

public abstract java.lang.String indexed
Whether the discriminator is indexed.

Returns:
whether the discriminator is indexed
Default:
""

column

public abstract java.lang.String column
Name of the column for the discriminator

Returns:
the name of the column for the discriminator
Default:
""

value

public abstract java.lang.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

public abstract Column[] columns
The column(s) making up the discriminator.

Returns:
the column(s) making up the discriminator
Default:
{}


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.