Ontimize 5.2072EN

com.ontimize.db.sql
Class SQLUnique

java.lang.Object
  extended bycom.ontimize.db.sql.SQLConstraint
      extended bycom.ontimize.db.sql.SQLUnique
All Implemented Interfaces:
java.io.Serializable

public class SQLUnique
extends SQLConstraint

See Also:
Serialized Form

Field Summary
protected static java.lang.String UNIQUE
           
 
Fields inherited from class com.ontimize.db.sql.SQLConstraint
columns, CONSTRAINT, constraintName
 
Constructor Summary
SQLUnique(java.util.List columns)
          Creates a new SQLPrimaryKey just indicating the column/s in where the constraint is applied.
SQLUnique(java.lang.String constraintName, java.util.List columns)
          Creates a new SQLUnique indicating the name of the constraint and the columns in where the constraint is applied.
 
Method Summary
 java.lang.String toString()
          This method returns the SQL Statement to add a Unique constraint to a database table.
 
Methods inherited from class com.ontimize.db.sql.SQLConstraint
getColumnList, getColumns, getConstraintName, setConstraintName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIQUE

protected static final java.lang.String UNIQUE
See Also:
Constant Field Values
Constructor Detail

SQLUnique

public SQLUnique(java.lang.String constraintName,
                 java.util.List columns)
Creates a new SQLUnique indicating the name of the constraint and the columns in where the constraint is applied.

Parameters:
constraintName - The name of the constraint.
columns - The column/s that are going to be included into the constraint.

SQLUnique

public SQLUnique(java.util.List columns)
Creates a new SQLPrimaryKey just indicating the column/s in where the constraint is applied. The name of the constraint is generated by default.

Parameters:
columns - The column/s that are going to be included into the constraint.
Method Detail

toString

public java.lang.String toString()
This method returns the SQL Statement to add a Unique constraint to a database table. Returns a String with the SQL Statement.


Ontimize