|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.db.sql.SQLColumn
Class that contains all the information necessary to define a column into a database.
| Field Summary | |
protected java.lang.String |
columnName
The name of the column. |
protected int |
columnSQLSize
The SQL size of the column. |
protected int |
columnSQLType
The SQl Type of the column. |
protected java.lang.Object |
defaultValue
The default value to this column. |
protected boolean |
primaryKey
Parameter that indicates if the column is PRIMARY KEY. |
protected boolean |
required
Parameter that indicates if the column is required, that is, if it accepts or not Null values. |
protected boolean |
unique
Parameter that indicates if the column is UNIQUE. |
| Constructor Summary | |
SQLColumn(java.lang.String columnName,
int columnSQLType)
Creates a new SQLColumn indicating the name of the column and the SQL Type of it. |
|
SQLColumn(java.lang.String columnName,
int columnSQLType,
boolean primaryKey)
Creates a new SQLColumn indicating the name of the column, the SQL Type of it and
the parameter primaryKey. |
|
SQLColumn(java.lang.String columnName,
int columnSQLType,
boolean primaryKey,
boolean required)
Creates a new SQLColumn indicating the name of the column, the SQL Type of it,
the parameter primaryKey and the parameter required. |
|
| Method Summary | |
java.lang.String |
getColumnName()
Returns the name of the column. |
int |
getColumnSQLSize()
Returns the SQL size of the column. |
int |
getColumnSQLType()
Returns the SQL Type of the column. |
java.lang.Object |
getDefaultValue()
Returns the default value to this column. |
boolean |
isPrimaryKey()
Checks if the current column is part of a Primary Key. |
boolean |
isRequired()
Checks if the current column is required. |
boolean |
isUnique()
Checks if the current column is unique. |
void |
setColumnName(java.lang.String columnName)
Sets the name of the column. |
void |
setColumnSQLSize(int columnSQLSize)
Sets the SQL size of the column. |
void |
setColumnSQLType(int columnSQLType)
Sets the SQL Type of the column. |
void |
setDefaultValue(java.lang.Object defaultValue)
Sets de default value to this column. |
void |
setPrimaryKey(boolean primaryKey)
Sets the value of the parameter primaryKey. |
void |
setRequired(boolean required)
Sets the value of the parameter required. |
void |
setUnique(boolean unique)
Sets the value of the parameter unique. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String columnName
protected int columnSQLType
protected int columnSQLSize
protected boolean unique
protected boolean primaryKey
protected boolean required
protected java.lang.Object defaultValue
| Constructor Detail |
public SQLColumn(java.lang.String columnName,
int columnSQLType)
SQLColumn indicating the name of the column and the SQL Type of it.
columnName - The name of the column.columnSQLType - The int value to the SQL Type.
public SQLColumn(java.lang.String columnName,
int columnSQLType,
boolean primaryKey)
SQLColumn indicating the name of the column, the SQL Type of it and
the parameter primaryKey. If this parameter is true this column will be set as Primary Key.
columnName - The name of the column.columnSQLType - The int value to the SQL Type.primaryKey - The value of parameter primaryKey. If it is true the column will be set as Primary Key.
public SQLColumn(java.lang.String columnName,
int columnSQLType,
boolean primaryKey,
boolean required)
SQLColumn indicating the name of the column, the SQL Type of it,
the parameter primaryKey and the parameter required. If the parameter prikaryKey is true this column will be set as Primary Key.
As well if the parameter required is true, the column will be set as Required, that is, it doesn't admit null values.
columnName - The name of the column.columnSQLType - The int value to the SQL Type.primaryKey - The value of parameter primaryKey. If it is true the column will be set as Primary Key.required - The value of parameter required. If it is true the column will be set as Required (doesn't admit null values).| Method Detail |
public java.lang.String getColumnName()
String with the column's name.public void setColumnName(java.lang.String columnName)
columnName - String with the name of the column.public int getColumnSQLType()
int with the column's SQL Type.public void setColumnSQLType(int columnSQLType)
columnSQLType - An int with the SQL Type to this column.public boolean isPrimaryKey()
booleanpublic void setPrimaryKey(boolean primaryKey)
primaryKey - A boolean that sets the value of the parameter primaryKey.public boolean isRequired()
booleanpublic void setRequired(boolean required)
required - A boolean that sets the value of the parameter required.public java.lang.Object getDefaultValue()
Object with the default value.public void setDefaultValue(java.lang.Object defaultValue)
defaultValue - Object with the default value.public int getColumnSQLSize()
int with the SQL size of the column.public void setColumnSQLSize(int columnSQLSize)
columnSQLSize - int with the SQL size of the column.public boolean isUnique()
booleanpublic void setUnique(boolean unique)
unique - A boolean that sets the value of the parameter unique.
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||