|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This is the interface used for representing information about all columns of the DataAccessObject. Company MoreData
| Field Summary | |
static int |
SORT_FOR_DELETE
Type of sort to sort the tables names for delete. |
static int |
SORT_FOR_INSERT
Type of sort to sort the tables names for insert. |
static int |
SORT_FOR_UPDATE
Type of sort to sort the tables names for update. |
| Method Summary | |
void |
addMetaField(MetaField metaField)
Add a new MetaField to the end of the metafield list. |
void |
addTable(DataBaseTable dataBaseTable)
Adds a new table to the DAOFieldsInfo. |
void |
clear()
Remove all meta fields from the meta fields list and from the primary key meta fields list. |
java.lang.String |
getColumnName(int columnNumber)
Return a column name of a MetaField at a specific index. |
int |
getColumnNumber(java.lang.String columnName)
Return the index of a column inside DAO. |
int |
getColumnNumber(java.lang.String tableName,
java.lang.String columnName)
Return the index of a column inside DAO for a giveen table. |
int |
getColumns()
Return the number of columns of the DAOFieldsInfo. |
int |
getColumns(java.lang.String tableName)
Return the number of columns of the DAOFieldsInfo for a giveen table. |
java.util.ArrayList |
getColumnsNames()
Return a list with the column names for all the columns of the RecordSet. |
java.util.ArrayList |
getColumnsNames(java.lang.String tableName)
Return a list with the column names for all the columns of the giveen table of the RecordSet. |
DataBaseTable |
getDataBaseTable(java.lang.String tableName)
Return a DataBaseTable for a giveen table. |
java.util.List |
getJoinColumns(java.lang.String tableName,
java.lang.String columnName)
Return a list of ColumnId objects representing all the columns that are equal to the one passing by argument. |
MetaField |
getMetaField(int columnNumber)
Return a MetaField for a specific column number. |
MetaField |
getMetaField(java.lang.String columnName)
Return a MetaField for a specific column name. |
MetaField |
getMetaField(java.lang.String tableName,
java.lang.String columnName)
Return a MetaField for a specific column name of a giveen table. |
java.util.Iterator |
getMetaFields()
Return a list with MetaFields Objects for all columns of the RecordSet. |
java.util.Iterator |
getMetaFields(java.lang.String tableName)
Return a list with MetaFields Objects for all columns of one table of the RecordSet. |
MetaField |
getPKMetaField(int index)
Return a list of MetaField objects for the primary key columns. |
java.util.Iterator |
getPKMetaFields()
Return a list with MetaFields Objects for all primary key columns of the RecordSet. |
java.util.Iterator |
getPKMetaFields(java.lang.String tableName)
Return a list with MetaFields Objects for all primary key columns of one table of the RecordSet. |
int |
getPKSize()
Return the number of metafields int the primary key meta fileds list. |
int |
getPKSize(java.lang.String tableName)
Return the number of metafields in the primary key meta fileds list for a specific table. |
java.util.Iterator |
getTablesNames()
Return a list with the names of all DAOFieldsInfo tables. |
java.util.Iterator |
getTablesNames(int sortType)
Return a list with the names of all DAOFieldsInfo tables sort for insert, update or delete. |
boolean |
isColumn(java.lang.String columnName)
Check if a column with a giveen name has allready added. |
boolean |
isColumn(java.lang.String tableName,
java.lang.String columnName)
Check if a column with a giveen name has allready added. |
boolean |
isPKPart(int columnNumber)
Check if a column is a primary key column. |
boolean |
isTable(java.lang.String tableName)
Check if a table was already added to the DAOFieldsInfo. |
void |
removeMetaField(int columnNumber)
Remove a MetaField at a specific index from the MetaFields list. |
void |
removeMetaField(java.lang.String columnName)
Remove a MetaField with a specific name from the MetaFields list. |
void |
removeMetaField(java.lang.String tableName,
java.lang.String columnName)
Remove a MetaField with a specific name from the MetaFields list. |
void |
removeTable(java.lang.String tableName)
Remove a table from the DAOFieldsInfo. |
void |
setPKFlag(int columnNumber,
boolean isPK)
Marca uma determinada coluna do recordset como sendo uma coluna que comp? |
void |
setUpdateOrder(java.lang.String[] tablesNames)
Chage the order of the tables used in a update. |
| Field Detail |
public static final int SORT_FOR_UPDATE
public static final int SORT_FOR_INSERT
public static final int SORT_FOR_DELETE
| Method Detail |
public void addMetaField(MetaField metaField)
throws java.lang.NullPointerException,
UnknownTableNameException,
AmbiguousTableNameException,
DuplicatedColumnNameException
metaField - The MetaField to be added.
java.lang.NullPointerException - if the column name or the table name of the
MetaField is null.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
DuplicatedColumnNameException - If a Metafield already exists with
the same column name.
public void removeMetaField(int columnNumber)
throws ColumnIndexOutOfBoundsException
columnNumber - The column number, an integer from 0 to getColumns()-1.
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().
public void removeMetaField(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.columnName - The name of the column.
UnknownColumnNameException - When the supplied column name is unknown.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public void removeMetaField(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The name of the column.
UnknownColumnNameException - When the supplied column name is unknown.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.public void clear()
public java.lang.String getColumnName(int columnNumber)
throws ColumnIndexOutOfBoundsException
columnNumber - The column number, an integer from 0 to getColumns()-1.
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().public int getColumns()
public int getColumns(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public java.util.ArrayList getColumnsNames()
public java.util.ArrayList getColumnsNames(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public int getColumnNumber(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
columnName - The name of the column.tableName - The table name or table alias.
UnknownColumnNameException - When the supplied column name is unknown.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public int getColumnNumber(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The name of the column.
UnknownColumnNameException - When the supplied column name is unknown.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.
public MetaField getMetaField(int columnNumber)
throws ColumnIndexOutOfBoundsException
columnNumber - The column number, an integer from 0 to getColumns()-1.
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().
public MetaField getMetaField(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The name alias of the table that owns the column.columnName - The column name.
UnknownColumnNameException - If the columnName does not exist in
the giveen table.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public MetaField getMetaField(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The column name.
UnknownColumnNameException - If the columnName does not exist.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.public java.util.Iterator getMetaFields()
public java.util.Iterator getMetaFields(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public MetaField getPKMetaField(int index)
throws java.lang.IndexOutOfBoundsException
index - The index of the column in the primary key meta fileds list.
java.lang.IndexOutOfBoundsExceptionpublic java.util.Iterator getPKMetaFields()
public java.util.Iterator getPKMetaFields(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public int getPKSize()
public int getPKSize(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is unknown.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public boolean isColumn(java.lang.String columnName)
throws AmbiguousColumnNameException
columnName - The column name.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.
public boolean isColumn(java.lang.String tableName,
java.lang.String columnName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.columnName - The column name.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public boolean isPKPart(int columnNumber)
throws ColumnIndexOutOfBoundsException
columnNumber - The column number, an integer from 0 to getColumns()-1.
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().
public void setPKFlag(int columnNumber,
boolean isPK)
throws ColumnIndexOutOfBoundsException
columnNumber - The column number, an integer from 0 to getColumns()-1.isPK - O valor a atribuir a flag, true para o caso da coluna
ser chave primaria, false caso contrario.
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().public void addTable(DataBaseTable dataBaseTable)
dataBaseTable - The DataBaseTable object to be added.
public void removeTable(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public DataBaseTable getDataBaseTable(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name or table alias.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public boolean isTable(java.lang.String tableName)
throws AmbiguousTableNameException
tableName - The table name or table alias.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public java.util.Iterator getTablesNames()
public java.util.Iterator getTablesNames(int sortType)
sortType - The type of sort to be used. The suported types are :
SORT_FOR_UPDATE, SORT_FOR_INSERT or SORT_FOR_DELETE.
public void setUpdateOrder(java.lang.String[] tablesNames)
tablesNames - A array of tables names in the request order to be
used in a update.
UnknownTableNameException - If the array contains a unknown table
name.
public java.util.List getJoinColumns(java.lang.String tableName,
java.lang.String columnName)
throws AmbiguousTableNameException
tableName - The table name or table alias of the column.columnName - The column name.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||