|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jso.sql.ConstraintDescriptor
Class for constraint descritptors. Constraint descriptors represent constraints of a table in a relational database.
Field Summary | |
static int |
ALTERNATE_KEY
Constant for the alternate key constraint type. |
static int |
FOREING_KEY
Constant for the foreing key constraint type. |
static int |
INDEX
Constant for the index constraint type. |
static int |
NULL
Constant for the null constraint type. |
static int |
PRIMARY_KEY
Constant for the primary key constraint type. |
static int |
UNIQUE_INDEX
Constant for the unique index constraint type. |
Constructor Summary | |
ConstraintDescriptor()
Constructs the constraint descriptor. |
|
ConstraintDescriptor(java.lang.String aName,
int aType,
java.util.List aFieldList)
Constructs the constraint descriptor. |
|
ConstraintDescriptor(java.lang.String aName,
int aType,
java.util.List aFieldList,
java.lang.String aRefTable,
java.util.List aRefFieldList)
Constructs the constraint descriptor. |
|
ConstraintDescriptor(java.lang.String aName,
int aType,
java.lang.String[] aFieldArray)
Constructs the constraint descriptor. |
|
ConstraintDescriptor(java.lang.String aName,
int aType,
java.lang.String[] aFieldArray,
java.lang.String aRefTable,
java.lang.String[] aRefFieldArray)
Constructs the constraint descriptor. |
Method Summary | |
void |
addField(java.lang.String aField)
Adds a field to the constraint. |
void |
addFields(java.util.List aFieldList)
Adds a list of fields to this constraint's fields list. |
void |
addFields(java.lang.String[] aFieldArray)
Adds an array of fields to this constraint's fields list. |
void |
addRefField(java.lang.String aField)
Adds a referenced field to the constraint. |
void |
addRefFields(java.util.List aFieldList)
Adds a list of fields to this constraint's referenced fields list. |
void |
addRefFields(java.lang.String[] aFieldArray)
Adds an arrayt of fields to this constraint's referenced fields list. |
void |
clearFields()
Clears the constraint's list of fields. |
void |
clearRefFields()
Clears the constraint's list of referenced fields. |
boolean |
equals(java.lang.Object o)
Indicates whether some other constraint descriptor is "equal to" this one. |
java.util.List |
getFields()
Gets the constraint's list of fields. |
java.lang.String |
getName()
Gets constraint's name. |
java.util.List |
getRefFields()
Gets the constraint's list of referenced fields. |
java.lang.String |
getRefTable()
Gets constraint's referenced table name. |
int |
getType()
Gets constraint's type. |
int |
hashCode()
Returns a hash code value for the constraint descriptor. |
void |
removeField(java.lang.String aField)
Removes a field from the constraint. |
void |
removeRefField(java.lang.String aField)
Removes a referenced field from the constraint. |
void |
setName(java.lang.String aName)
Sets constraint's name. |
void |
setRefTable(java.lang.String aName)
Sets constraint's referenced table name. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NULL
public static final int PRIMARY_KEY
public static final int INDEX
public static final int UNIQUE_INDEX
public static final int FOREING_KEY
public static final int ALTERNATE_KEY
Constructor Detail |
public ConstraintDescriptor()
public ConstraintDescriptor(java.lang.String aName, int aType, java.util.List aFieldList) throws java.lang.IllegalArgumentException
aName
- A name for the constraint.aType
- A type for the constraint.aFieldList
- List of fields for the constraint.public ConstraintDescriptor(java.lang.String aName, int aType, java.lang.String[] aFieldArray) throws java.lang.IllegalArgumentException
aName
- A name for the constraint.aType
- A type for the constraint.aFieldArray
- Array of fields for the constraint.public ConstraintDescriptor(java.lang.String aName, int aType, java.util.List aFieldList, java.lang.String aRefTable, java.util.List aRefFieldList) throws java.lang.IllegalArgumentException
aName
- A name for the constraint.aType
- A type for the constraint.aFieldList
- List of fields for the constraint.aRefTable
- A table referenced by the constraint.aRefFieldList
- List of fields referenced by the constraint.public ConstraintDescriptor(java.lang.String aName, int aType, java.lang.String[] aFieldArray, java.lang.String aRefTable, java.lang.String[] aRefFieldArray) throws java.lang.IllegalArgumentException
aName
- A name for the constraint.aType
- A type for the constraint.aFieldArray
- Array of fields for the constraint.aRefTable
- A table referenced by the constraint.aRefFieldArray
- Array of fields referenced by the constraint.Method Detail |
public void setName(java.lang.String aName)
aName
- A name for the constraint.public java.lang.String getName()
public int getType()
public void addField(java.lang.String aField)
aField
- The field to be added.public void removeField(java.lang.String aField)
aField
- The field to be removed.public void addFields(java.util.List aFieldList)
aFieldList
- List of fields to be added.public void addFields(java.lang.String[] aFieldArray)
aFieldArray
- Array of fields to be added.public void clearFields()
public java.util.List getFields()
public void setRefTable(java.lang.String aName)
aName
- The referenced table.public java.lang.String getRefTable()
public void addRefField(java.lang.String aField)
aField
- The referenced field to be added.public void removeRefField(java.lang.String aField)
aField
- The referenced field to be removed.public void addRefFields(java.util.List aFieldList)
aFieldList
- List of fields to be added.public void addRefFields(java.lang.String[] aFieldArray)
aFieldArray
- Array of fields to be added.public void clearRefFields()
public java.util.List getRefFields()
public boolean equals(java.lang.Object o)
o
- The object with which to compare.
true
if the constraint descriptor is the same as the
constraint descriptor argument; false
otherwise.public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |