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 Unique

    java.lang.Object
      org.apache.openjpa.jdbc.schema.Constraint
          org.apache.openjpa.jdbc.schema.LocalConstraint
              org.apache.openjpa.jdbc.schema.Unique

    public class Unique

extends LocalConstraint

Represents a unique constraint. It can also represent a partial constraint.

Author:
  Abe White

Constructor Summary
`Unique()` Default constructor.
`Unique(String name, Table table)` Constructor.

Method Summary
`void` | `deref()`
`boolean` | `equalsUnique(Unique unq)` Return true if the structure of this primary key matches that of the given one (same table, same columns).
`int` | `getRefCount()`
`boolean` | `isLogical()` Return whether this constraint is a logical constraint only; i.e.
`void` | `ref()`

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

Methods inherited from class org.apache.openjpa.jdbc.schema.Constraint
`getColumnName, getFullName, getName, getSchemaName, getTable, getTableName, isDeferred, setColumnName, setDeferred, setName, setSchemaName, setTableName, toString`

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

Constructor Detail

### Unique

    public Unique()

  Default constructor.

### Unique

    public Unique(String name,
                  Table table)

  Constructor.

  Parameters:
    `name` - the name of the constraint, if any
    `table` - the table of the constraint

Method Detail

### 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`

### equalsUnique

    public boolean equalsUnique(Unique unq)

  Return true if the structure of this primary key matches that of the given one (same table, same columns).

### getRefCount

    public int getRefCount()

### ref

    public void ref()

### deref

    public void deref()

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 Apache Software Foundation. All Rights Reserved.