Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.jdbc.schema
Class Index

    java.lang.Object
      org.apache.openjpa.jdbc.schema.ReferenceCounter
          org.apache.openjpa.jdbc.schema.Constraint
              org.apache.openjpa.jdbc.schema.LocalConstraint
                  org.apache.openjpa.jdbc.schema.Index

All Implemented Interfaces:
  Serializable

    public class Index

extends LocalConstraint

Represents a database index. Can also represent a partial index, aligning with `DatabaseMetaData`.

Author:
  Abe White, Stephen Kim
See Also:
  Serialized Form

Constructor Summary
`Index()` Default constructor.
`Index(DBIdentifier name, Table table)`
`Index(String name, Table table)` Deprecated.

Method Summary
`boolean` | `equalsIndex(Index idx)` Indexes are equal if they have the same name, the same columns, and are both unique/not unique.
`DBIdentifier` | `getFullIdentifier()`
`String` | `getFullName()` Deprecated.
`boolean` | `isLogical()` Return whether this constraint is a logical constraint only; i.e.
`boolean` | `isUnique()` Return true if this is a UNIQUE index.
`void` | `setUnique(boolean unique)` Set whether this is a UNIQUE index.

Methods inherited from class org.apache.openjpa.jdbc.schema.LocalConstraint
`addColumn, columnsMatch, containsColumn, derefColumns, equalsLocalConstraint, getColumns, refColumns, remove, removeColumn, setColumns`

Methods inherited from class org.apache.openjpa.jdbc.schema.Constraint
`getColumnIdentifier, getColumnName, getIdentifier, getName, getQualifiedPath, getSchemaIdentifier, getSchemaName, getTable, getTableIdentifier, getTableName, isDeferred, setColumnIdentifier, setColumnName, setDeferred, setIdentifier, setName, setSchemaIdentifier, setSchemaName, setTableIdentifier, setTableName, toString`

Methods inherited from class org.apache.openjpa.jdbc.schema.ReferenceCounter
`deref, getRefCount, ref`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Index

    public Index()

  Default constructor.

### Index

    public Index(String name,
                 Table table)

  Deprecated.

  Constructor.

  Parameters:
    `name` - the name of the index
    `table` - the table of the index

### Index

    public Index(DBIdentifier name,
                 Table table)

Method Detail

### isUnique

    public boolean isUnique()

  Return true if this is a UNIQUE index.

### setUnique

    public void setUnique(boolean unique)

  Set whether this is a UNIQUE index.

### isLogical

    public boolean isLogical()

  Description copied from class: `Constraint`
  Return whether this constraint is a logical constraint only; i.e. if it does not exist in the database.

  Specified by:
    `isLogical` in class `Constraint`

### getFullName

    public String getFullName()

  Deprecated.

  Description copied from class: `Constraint`
  Return the full name of the constraint.

  Overrides:
    `getFullName` in class `Constraint`

### getFullIdentifier

    public DBIdentifier getFullIdentifier()

  Overrides:
    `getFullIdentifier` in class `Constraint`

### equalsIndex

    public boolean equalsIndex(Index idx)

  Indexes are equal if they have the same name, the same columns, and are both unique/not unique.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.