|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.dao.db.Constraint
public class Constraint
Constraint class.
| Field Summary | |
|---|---|
static int |
CHECK
Constant CHECK=3 |
static int |
FOREIGN_KEY
Constant FOREIGN_KEY=2 |
static int |
PRIMARY_KEY
Constant PRIMARY_KEY=1 |
| Constructor Summary | |
|---|---|
Constraint(String table,
String constraint)
Constructor for Constraint. |
|
Constraint(String table,
String name,
List<String> columns)
Construct a primary key constraint from it's required elements |
|
Constraint(String table,
String name,
List<String> columns,
String ftable,
List<String> fcolumns,
String fupdtype,
String fdeltype)
Construct a foreign key constraint from it's required elements |
|
Constraint(String table,
String name,
String checkExpression)
Construct a check type constraint from it's required elements |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other_o)
|
boolean |
equals(Object other_o,
boolean ignoreFdelType)
equals |
String |
getCheckExpression()
getCheckExpression |
List<String> |
getColumns()
getColumns |
List<String> |
getForeignColumns()
getForeignColumns |
String |
getForeignDelType()
getForeignDelType |
String |
getForeignTable()
getForeignTable |
String |
getForeignUpdType()
getForeignUpdType |
String |
getName()
getName |
String |
getTable()
getTable |
int |
getType()
getType |
int |
hashCode()
hashCode |
boolean |
isCheckConstraint()
isCheckConstraint |
boolean |
isForeignKeyConstraint()
isForeignKeyConstraint |
boolean |
isPrimaryKeyConstraint()
isPrimaryKeyConstraint |
void |
setCheckExpression(String expression)
setCheckExpression |
void |
setColumn(String column)
setColumn |
void |
setColumns(List<String> columns)
setColumns |
void |
setForeignColumn(String fcolumn)
setForeignColumn |
void |
setForeignColumns(List<String> fcolumns)
setForeignColumns |
void |
setForeignDelType(String fdeltype)
setForeignDelType |
void |
setForeignTable(String ftable)
setForeignTable |
void |
setForeignUpdType(String fupdtype)
setForeignUpdType |
void |
setName(String name)
setName |
void |
setTable(String table)
setTable |
void |
setType(int type)
setType |
String |
toString()
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int PRIMARY_KEY
PRIMARY_KEY=1
public static final int FOREIGN_KEY
FOREIGN_KEY=2
public static final int CHECK
CHECK=3
| Constructor Detail |
|---|
public Constraint(String table,
String constraint)
throws Exception
Constructor for Constraint.
table - a String object.constraint - a String object.
Exception - if any.
public Constraint(String table,
String name,
List<String> columns)
table - a String object.name - a String object.columns - a List object.
public Constraint(String table,
String name,
List<String> columns,
String ftable,
List<String> fcolumns,
String fupdtype,
String fdeltype)
throws Exception
table - a String object.name - a String object.columns - a List object.ftable - a String object.fcolumns - a List object.fupdtype - a String object.fdeltype - a String object.
Exception - if any.
public Constraint(String table,
String name,
String checkExpression)
table - a String object.name - a String object.checkExpression - a String object.| Method Detail |
|---|
public void setForeignUpdType(String fupdtype)
setForeignUpdType
fupdtype - a String object.public String getForeignUpdType()
getForeignUpdType
String object.public String getName()
getName
String object.public void setName(String name)
setName
name - a String object.public int getType()
getType
public void setType(int type)
setType
type - a int.public boolean isPrimaryKeyConstraint()
isPrimaryKeyConstraint
public boolean isForeignKeyConstraint()
isForeignKeyConstraint
public boolean isCheckConstraint()
isCheckConstraint
public String getTable()
getTable
String object.public void setTable(String table)
setTable
table - a String object.public void setColumns(List<String> columns)
setColumns
columns - a List object.public List<String> getColumns()
getColumns
List object.public void setColumn(String column)
setColumn
column - a String object.public String getForeignTable()
getForeignTable
String object.public void setForeignTable(String ftable)
setForeignTable
ftable - a String object.public List<String> getForeignColumns()
getForeignColumns
List object.public void setForeignColumn(String fcolumn)
setForeignColumn
fcolumn - a String object.public void setForeignColumns(List<String> fcolumns)
setForeignColumns
fcolumns - a List object.public String getForeignDelType()
getForeignDelType
String object.
public void setForeignDelType(String fdeltype)
throws Exception
setForeignDelType
fdeltype - a String object.
Exception - if any.public String getCheckExpression()
getCheckExpression
String object.public void setCheckExpression(String expression)
setCheckExpression
expression - a String object.public String toString()
toString
toString in class ObjectString object.public boolean equals(Object other_o)
equals in class Object
public boolean equals(Object other_o,
boolean ignoreFdelType)
equals
other_o - a Object object.ignoreFdelType - a boolean.
public int hashCode()
hashCode
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||