|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.altair.hwm.database.dbmodel.HWMAttributeConstraints
public class HWMAttributeConstraints
Title: HWMAttributeConstraints
Description: The class that represents the constraints valid for attributes. It currently will support not null, unique and default value
Company: Altair Engineering, Inc.
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
Add property change listener |
void |
Export(org.jdom.Element elemConst)
Creates XML element representation for this constraint class |
java.lang.String |
GetDefaultValue()
Get the default value(if null... |
java.lang.String |
GetSQLString(HWMDatabaseInfo hwmDBInfo)
Create and return the SQL string for the constraints |
void |
Import(org.jdom.Element elemConst)
Recreates the attribute's constraints |
boolean |
IsAutoInc()
Returns true if the auto increment constraint is used |
boolean |
IsNotNull()
Returns true if the not null constraint is used |
boolean |
IsPrimaryKey()
Returns the value of the primary key property |
boolean |
IsUnique()
Returns true if unique constraint is used else false |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
Remove property change listener |
void |
SetAutoInc(boolean bAutoInc)
Set the auto increment constraint to true or false |
void |
SetDefaultValue(java.lang.String strDefValue)
Set the default value to use (if null... |
void |
SetNotNull(boolean bNotNull)
Set the not null constraint to true or false |
void |
SetPrimaryKey(boolean bIsPrimaryKey)
Sets the primary key property |
void |
SetUnique(boolean bUnique)
Set the unique constraint to true or false |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void SetUnique(boolean bUnique)
bUnique
- If true the unique constraint is used.public boolean IsUnique()
public void SetNotNull(boolean bNotNull)
bNotNull
- If true the not null constraint is used.public boolean IsNotNull()
public void SetAutoInc(boolean bAutoInc)
bAutoInc
- If true the auto increment constraint is used.public boolean IsAutoInc()
public void SetDefaultValue(java.lang.String strDefValue)
strDefValue
- The default value to usepublic java.lang.String GetDefaultValue()
public void SetPrimaryKey(boolean bIsPrimaryKey)
bIsPrimaryKey
- True if pk, false if notpublic boolean IsPrimaryKey()
public java.lang.String GetSQLString(HWMDatabaseInfo hwmDBInfo)
hwmDBInfo
- The DB info that contains the types supported and the
syntax used by the DB
public void Export(org.jdom.Element elemConst)
elemConst
- The element representing this constraint classpublic void Import(org.jdom.Element elemConst) throws java.lang.Exception
elemConst
- The element representing this attribute's constraints
java.lang.Exception
public void addPropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
propChangeListener
- The listener for property change events fired
by this classpublic void removePropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
propChangeListener
- The listener to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |