com.caucho.db.table
Class Constraint

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

@Module
public abstract class Constraint
extends java.lang.Object

Validity constraints.


Constructor Summary
Constraint()
           
 
Method Summary
 java.lang.String getName()
          Gets an identifier for the constraint.
 void setName(java.lang.String name)
          Sets an identifier for the constraint.
 void validate(TableIterator[] rows, QueryContext contstraint, DbTransaction xa)
          Tries to validate the constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraint

public Constraint()
Method Detail

setName

public void setName(java.lang.String name)
Sets an identifier for the constraint.


getName

public java.lang.String getName()
Gets an identifier for the constraint.


validate

public void validate(TableIterator[] rows,
                     QueryContext contstraint,
                     DbTransaction xa)
              throws java.sql.SQLException
Tries to validate the constraint.

Throws:
java.sql.SQLException