Ontimize 5.2072EN

com.ontimize.db.sql
Class SQLTableAlterConstraint

java.lang.Object
  extended bycom.ontimize.db.sql.SQLTable
      extended bycom.ontimize.db.sql.SQLTableAlter
          extended bycom.ontimize.db.sql.SQLTableAlterConstraint

public class SQLTableAlterConstraint
extends SQLTableAlter


Field Summary
protected  SQLConstraint constraint
          The constraint that are going to be introduced into the database table.
 
Fields inherited from class com.ontimize.db.sql.SQLTableAlter
add
 
Fields inherited from class com.ontimize.db.sql.SQLTable
tableName
 
Constructor Summary
SQLTableAlterConstraint(java.lang.String tableName, boolean add)
          Creates a new SQLTableAlterConstraint indicating the name of the table to be altered and the kind of operation to realize with the parameter add.
SQLTableAlterConstraint(java.lang.String tableName, boolean add, SQLConstraint constraint)
          Creates a new SQLTableAlterConstraint indicating the name of the table to be altered, the constraint that are going to be modified in the database table and the kind of operation to realize with the parameter add.
 
Method Summary
 SQLConstraint getConstraint()
          Returns the constraint that are going to be introduced into the database table.
 void setConstraint(SQLConstraint constraint)
          Set the constraint that are going to be introduced into the database table.
 
Methods inherited from class com.ontimize.db.sql.SQLTableAlter
isAdd, setAdd
 
Methods inherited from class com.ontimize.db.sql.SQLTable
getTableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraint

protected SQLConstraint constraint
The constraint that are going to be introduced into the database table.

Constructor Detail

SQLTableAlterConstraint

public SQLTableAlterConstraint(java.lang.String tableName,
                               boolean add)
Creates a new SQLTableAlterConstraint indicating the name of the table to be altered and the kind of operation to realize with the parameter add. If it is true the operation will be ADD CONSTRAINT and if the parameter is false the operation will be DROP CONSTRAINT.

Parameters:
tableName - The name of the table.
add - The value of the parameter add. Indicates add or drop.

SQLTableAlterConstraint

public SQLTableAlterConstraint(java.lang.String tableName,
                               boolean add,
                               SQLConstraint constraint)
Creates a new SQLTableAlterConstraint indicating the name of the table to be altered, the constraint that are going to be modified in the database table and the kind of operation to realize with the parameter add. If it is true the operation will be ADD CONSTRAINT and if the parameter is false the operation will be DROP CONSTRAINT.

Parameters:
tableName - The name of the table.
add - The value of the parameter add. Indicates add or drop.
constraint - The SQLConstraint with whole definition of it.
Method Detail

getConstraint

public SQLConstraint getConstraint()
Returns the constraint that are going to be introduced into the database table.

Returns:
a SQLConstraint

setConstraint

public void setConstraint(SQLConstraint constraint)
Set the constraint that are going to be introduced into the database table.

Parameters:
constraint - The SQLConstraint with whole definition of it.

Ontimize