com.caucho.db.table
Class UniqueConstraint

java.lang.Object
  extended by com.caucho.db.table.Constraint
      extended by com.caucho.db.table.UniqueConstraint
Direct Known Subclasses:
PrimaryKeyConstraint

@Module
public class UniqueConstraint
extends Constraint

Validity constraints.


Constructor Summary
UniqueConstraint(Column[] uniqueSet)
          Creates a uniqueness constraint.
 
Method Summary
 void validate(TableIterator[] sourceRows, QueryContext queryContext, DbTransaction xa)
          validate the constraint.
 
Methods inherited from class com.caucho.db.table.Constraint
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueConstraint

public UniqueConstraint(Column[] uniqueSet)
Creates a uniqueness constraint.

Method Detail

validate

public void validate(TableIterator[] sourceRows,
                     QueryContext queryContext,
                     DbTransaction xa)
              throws java.sql.SQLException
validate the constraint.

Overrides:
validate in class Constraint
Throws:
java.sql.SQLException