IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.em.annotations
Annotation Type CompositeIndexes


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface CompositeIndexes

Defines one or more composite indexes to be used with an entity. When creating a single-attribute index, define a Index annotation on the entity attribute. In the following example, three indexes are created; two composite indexes named StateCityZip and LastFirst and a single-attribute index over the birthday attribute:

 @Entity
 @CompositeIndexes({
     @CompositeIndex(name="StateCityZip", attributeNames="state,city,zip"),
     @CompositeIndex(name="LastFirst", attributeNames="lastName,firstName")
 })
 public class Person {
     @Id String taxId;
     String lastName;
     String firstName;
     @Index Date birthday;
     String state;
     String city;
     int zip;
 }
 

Since:
7.0

Required Element Summary
 CompositeIndex[] value
          The array of CompositeIndex annotations, each defining a composite index.
 

Element Detail

value

public abstract CompositeIndex[] value
The array of CompositeIndex annotations, each defining a composite index.

Returns:
the array of CompositeIndex annotations.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.