|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jdbdump.dump.Constraint
public class Constraint
Represents a table or column constraint.
A constraint can be assigned either to a single column (e.g. "..., cash integer CHECK (cash > 0), ...")
or to the entire table (e.g. "..., CONSTRAINT table_pkey PRIMARY KEY (id), ..."). It has three
attributes: its name (not always used, in the second example that would be "table_pkey"), its text
(entire SQL expression used in create table command), and its type which can be PRIMARE_KEY,
FOREIGN_KEY or OTHER.
Nested Class Summary | |
---|---|
static class |
Constraint.ConstraintType
A category to which this constraint belongs. |
Constructor Summary | |
---|---|
Constraint(java.lang.String name,
Constraint.ConstraintType type,
java.lang.String fullText)
Creates a new constraint with a given name, type and contents. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns this constraint's name. |
java.lang.String |
getText()
Returns this constraint's command. |
Constraint.ConstraintType |
getType()
Returns this constraint's type ((see ConstraintType enum). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Constraint(java.lang.String name, Constraint.ConstraintType type, java.lang.String fullText)
name
- the constraint's name (may be empty)type
- constraint type (see enum ConstraintType description)fullText
- SQL expression used in create table command to add this constraintMethod Detail |
---|
public java.lang.String getText()
public java.lang.String getName()
public Constraint.ConstraintType getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |