|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Gere acessos a dados tabulares lidos de um data source.
Aborda-se a interacção com os dados a um nivel mais elevado permitindo
assim ao utilizador concentrar-se na sua lógica de programação em vez
de codificar o acesso aos dados.
Mantem associado a toda a informação um conjunto de flags que depois
permitem a sincronização dos dados em memória com os do data source.
Nesta fase suporta os seguintes data sources:
DataBaseTable,
DataCell,
MetaField,
DataRecordSet,
DataRow,
DataSource| Field Summary |
| Fields inherited from interface pt.moredata.dao.DAOView |
DYNASET, INDIVIDUAL_UPDATE, SNAPSHOT, SUPERSET_UPDATE, UNKNOWN |
| Method Summary | |
void |
addAllColumnsFromTable()
Add all columns from all tables to the DataAccessObject. |
void |
addAllColumnsFromTable(java.lang.String tableName)
Add all columns from one table to the DataAccessObject. |
void |
addApplyListener(DAOApplyListener listener)
Adds a new DAOApplyListener to this DataAccessObject. |
void |
addColumn(java.lang.String columnName)
Add a new column to the DataAccessObject from the only table of the DataAccessObject. |
void |
addColumn(java.lang.String tableName,
java.lang.String columnName)
Add a new column to the DataAccessObject from a giveen table. |
void |
addColumn(java.lang.String tableName,
java.lang.String columnName,
boolean isPKPart)
Add a new column to the DataAccessObject from a giveen table. |
void |
addDeleteListener(DAODeleteListener listener)
Adds a new DAODeleteListener to this DataAccessObject. |
void |
addDescColumn(java.lang.String descColumn)
|
void |
addInsertListener(DAOInsertListener listener)
Adds a new DAOInsertListener to this DataAccessObject. |
void |
addJoinClause(java.lang.String whereString)
Add a join clause to the DataAccessObject. |
void |
addMetaField(MetaField metaField)
Deprecated. This method will be removed and will not have a replacment. |
void |
addOrderBy(java.lang.String columnName)
Add a column name to the orderby list to be used by the query method. |
void |
addPkColumn(java.lang.String pkColumn)
Deprecated. Use method addColumn(String tableName, String columnName, isPKPart) instead. |
void |
addPkColumn(java.lang.String tableName,
java.lang.String pkColumn)
Deprecated. Use method addColumn(String tableName, String columnName, isPKPart) instead. |
void |
addPkToListMap(java.util.Collection pKey,
int rowNumber)
Deprecated. This method will be removed and will not have a replacment. |
void |
addQueryListener(DAOQueryListener listener)
Adds a new DAOQueryListener to this DataAccessObject. |
void |
addRowAppliedListener(DAORowAppliedListener listener)
Adds a new DAORowAppliedListener to this DataAccessObject. |
void |
addRowRetrivedListener(DAORowRetrivedListener listener)
Deprecated. This listener will be removed soon. With the introduction of the Reader interface, the data is no longer readed by the DataAcessObject, so ther is no way of fireing the even. |
void |
addSecTable(DataBaseTable table)
Deprecated. Use addTable(String tableName) instead. |
void |
addSecTable(java.lang.String tableName)
Deprecated. Use addTable(String tableName) instead. |
void |
addSecTable(java.lang.String tableName,
java.lang.String tableAlias)
Deprecated. Use addTable(String tableName) instead. |
void |
addTable(java.lang.String tableName)
Add a new table to the DataAccessObject. |
void |
addTable(java.lang.String tableName,
java.lang.String joinClause)
Add a new table to the DataAccessObject. |
void |
addTable(java.lang.String tableName,
java.lang.String tableAlias,
java.lang.String joinClause)
Add a new table to the DataAccessObject. |
void |
addUpdateListener(DAOUpdateListener listener)
Adds a new DAOUpdateListener to this DataAccessObject. |
void |
apply()
Update the repository with the DataAccessObject data. |
void |
apply(int rowNumber)
Update a row of the repository with the DataAccessObject data for that row. |
void |
backupPk(int rowNum)
Deprecated. This method will be removed and will not have a replacment. |
void |
clear()
Remove all row from the DataAccessObject. |
void |
clearAllSecTables()
Deprecated. Use method removeTable(String tableName) instead. |
void |
clearJoinClauses()
Remove all join clauses added by the addJoinClause(String whereString) method. |
void |
clearMetaFieldAt(int index)
Deprecated. This method will be removed and will not have a replacment. |
void |
clearMetaFields()
Deprecated. This method will be removed and will not have a replacment. |
void |
clearOrderBy()
Remove all column names from the orderby list added by the addOrderBy(String columnName) method. |
void |
clearRecordSet()
Deprecated. Use method clear() instead. |
void |
clearSecTable(java.lang.String tableName)
Deprecated. Use method removeTable(String tableName) instead. |
void |
clearSecTableAt(int index)
Deprecated. Use method removeTable(String tableName) instead. |
void |
clearWhereStr()
Delete the whereString clause used by the query method. |
void |
delete()
Deprecated. Use method clear() instead. |
void |
delete(int rowNumber)
Deprecated. Use deleteFromDataSource(int rowNumber) instead. |
void |
deleteFromDAO(int rowNumber)
Delete a row from the DataAccessObject. |
void |
deleteFromDataSource(int rowNumber)
Delete a row from the repository only. |
void |
deleteRow(int rowNumber)
Deprecated. Use deleteFromDAO(int rowNumber) instead. |
int |
getBadRowNumber()
Get the value of badRowNumber. |
DAOFieldsInfo |
getDAOFieldsInfo()
Return the DAOFieldsInfo object with information about this DataAccessObject columns and tables. |
DataMetaField |
getDataMetaField(int numField)
Deprecated. Use method getMetaField(int numField) instead. |
DataMetaField |
getDataMetaField(java.lang.String fieldName)
Deprecated. Use method getMetaField(String fieldName) instead. |
int |
getDataSourceAction(int rowNumber)
Return the code for the action to be executed by the applay method for a giveen row. |
java.util.ArrayList |
getDataSourcePk(int rowNumber)
Return the primary key value for a DataAccessObject row exactly like it was readed from the repository. |
MetaField |
getMetaField(java.lang.String columnName)
Return the meta field information for a giveen column name. |
MetaField |
getMetaField(java.lang.String tableName,
java.lang.String columnName)
Return the meta field information for a giveen column name. |
java.lang.String[] |
getOrderBy()
Return an array with all the columns names of the orderby list. |
java.lang.String |
getOrderBy(int index)
Return the column name at a specific index of the orderby list. |
int |
getQueryPolicy(java.lang.String columnName)
Returns the policy used by DAOView query method for a giveen column. |
int |
getQueryPolicy(java.lang.String tableName,
java.lang.String columnName)
Returns the policy used by DAOView query method for a giveen column. |
RecordSet |
getRecordSet()
Return the RecordSet of the DataAccessObject. |
DataTableInfo |
getTableInfo()
Return a DataTableInfo object with information about the table of the DataAccessObject. |
DataTableInfo |
getTableInfo(java.lang.String tableName)
Return a DataTableInfo object with information about a giveen table of the DataAccessObject. |
int |
getUpdateType()
Returns the update policy of the DataAccessObject. |
java.lang.String |
getWhereStr()
Return the whereString clause to be used by the query method. |
void |
insert(int rowNumber)
Insert a giveen row from the DataAccessObject into the repository. |
boolean |
isDescColumn(java.lang.String descColumn)
Deprecated. Use the method isColumn(String columnName) instead. |
void |
query()
Query the repository and load the data into the DataaccessObject. |
java.util.ArrayList |
queryByPk(java.util.List selectList,
java.util.List pk)
Deprecated. This method will be removed and will not have a replacment. |
void |
removeApplyListener(DAOApplyListener listener)
Removes a DAOApplyListener from this DataAccessObject. |
void |
removeColumn(java.lang.String columnName)
Remove a column from the DataAccessObject. |
void |
removeColumn(java.lang.String tableName,
java.lang.String columnName)
Remove a column from the DataAccessObject. |
void |
removeDeleteListener(DAODeleteListener listener)
Removes a DAODeleteListener from this DataAccessObject. |
void |
removeInsertListener(DAOInsertListener listener)
Removes a DAOInsertListener from this DataAccessObject. |
void |
removeQueryListener(DAOQueryListener listener)
Removes a DAOQueryListener from this DataAccessObject. |
void |
removeRowAppliedListener(DAORowAppliedListener listener)
Removes a DAORowAppliedListener from this DataAccessObject. |
void |
removeRowRetrivedListener(DAORowRetrivedListener listener)
Deprecated. This listener will be removed soon. With the introduction of the Reader interface, the data is no longer readed by the DataAcessObject, so ther is no way of fireing the even. |
void |
removeTable(java.lang.String tableName)
Removes a table and the corresponding MetaField's from the DataAccessObject. |
void |
removeUpdateListener(DAOUpdateListener listener)
Removes a DAOUpdateListener from this DataAccessObject. |
void |
setCellAt(int rowNum,
int columnNum,
java.lang.Object obj)
Deprecated. Use the method setCellAt(int rowNum, String name, Object obj) instead. |
void |
setCellAt(int rowNum,
int columnNum,
java.lang.Object obj,
boolean engineProcessed)
Deprecated. Use the method setCellAt(int rowNum, String name, Object obj,boolean engineProcessed) instead. |
void |
setCellAt(int rowNumber,
java.lang.String columnName,
java.lang.Object obj)
Changes the value of a cell of the DataAccessObject. |
void |
setCellAt(int rowNumber,
java.lang.String columnName,
java.lang.Object obj,
boolean engineProcessed)
Changes the value of a cell of the DataAccessObject. |
void |
setCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName,
java.lang.Object obj)
Changes the value of a cell of the DataAccessObject. |
void |
setCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName,
java.lang.Object obj,
boolean engineProcessed)
Changes the value of a cell of the DataAccessObject. |
void |
setCounterColumn(int column,
boolean value)
Deprecated. This method will be removed and will not have a replacment. |
void |
setDataSource(DataSource dataSource)
Change the DataSource object used to interact with the repository. |
void |
setDefaultValue(java.lang.String columnName,
java.lang.Object value)
Change the default value to be used in a insert statement when a cell value of a giveen column is null. |
void |
setDefaultValue(java.lang.String tableName,
java.lang.String columnName,
java.lang.Object value)
Change the default value to be used in a insert statement when a cell value of a giveen column is null. |
void |
setDeleted(int rowNumber,
boolean deleted)
Change the deleted property of a row. |
void |
setDistinctQuery(boolean distinctQuery)
If true the «distinct» keyword will be used in a query sql command. |
void |
setFixedValue(int column,
java.lang.Object value)
Deprecated. Use method setDefaultValue(String columnName, Object value) instead. |
void |
setMainTable(DataBaseTable mainTable)
Deprecated. Use method addTableName(String tableName) instead. |
void |
setMainTable(java.lang.String tableName)
Deprecated. Use method addTableName(String tableName) instead. |
void |
setMainTable(java.lang.String tableName,
java.lang.String tableAlias)
Deprecated. Use method addTableName(String tableName) instead. |
void |
setNewRow(boolean _newRow,
int rowNum)
Deprecated. Use method setNewRow(int rowNumber , boolean newRow) instead. |
void |
setNewRow(int rowNumber,
boolean newRow)
Change the newRow property of a row. |
void |
setOrderBy(int index,
java.lang.String columnName)
Change a column name at a specific index of the orderby list. |
void |
setOrderBy(java.lang.String[] columnNames)
Rebuild the orderby list with a set of column names. |
void |
setQueryPolicy(java.lang.String columnName,
int queryPolicy)
Change the query policy for a column of the DAOView table. |
void |
setQueryPolicy(java.lang.String tableName,
java.lang.String columnName,
int queryPolicy)
Changes the query policy for a column of a giveen table. |
void |
setTableName(java.lang.String _tableName)
Deprecated. Use method addTableName(String tableName) instead. |
void |
setUpdateType(int policy)
Set the update policy of the DataAccessObject. |
void |
setWhereStr(java.lang.String whereString)
Change the whereString clause used by the query method. |
void |
sort()
Deprecated. This method will be removed and will not have a replacment. Use class DAOSort to sort a DataAccessObject. |
void |
update(int rowNumber)
Update a repository row with data from the DataAccessObject. |
| Method Detail |
public void addAllColumnsFromTable(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException,
DuplicatedColumnNameException
tableName - The table name.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
DuplicatedColumnNameException - If a Metafield already exists with
the same column name.
public void addAllColumnsFromTable()
throws DuplicatedColumnNameException
DuplicatedColumnNameException - If a Metafield already exists with
the same column name.public void addApplyListener(DAOApplyListener listener)
listener - The listener to be add.
public void addColumn(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousTableException,
DuplicatedColumnNameException
columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousTableException - When the DataAccessObject has more
than one table.
DuplicatedColumnNameException - If a Metafield already exists with
the same column name.
public void addColumn(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
DuplicatedColumnNameException
tableName - The table that owns the column.columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
DuplicatedColumnNameException - If a Metafield already exists with
the same column name.
public void addColumn(java.lang.String tableName,
java.lang.String columnName,
boolean isPKPart)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
DuplicatedColumnNameException
tableName - The table that owns the column.columnName - The column name.isPKPart - If true the column is added to the primary key
list of the giveen table.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
DuplicatedColumnNameException - If a Metafield already exists with
the same column name.public void addDeleteListener(DAODeleteListener listener)
listener - The listener to be add.public void addInsertListener(DAOInsertListener listener)
listener - The listener to add.public void addJoinClause(java.lang.String whereString)
whereString - The join clause to be used in the query command.public void addOrderBy(java.lang.String columnName)
columnName - The name of the column to be added to the orderby list.public void addQueryListener(DAOQueryListener listener)
listener - The listener to add.public void addRowAppliedListener(DAORowAppliedListener listener)
listener - The listener to add.public void addRowRetrivedListener(DAORowRetrivedListener listener)
listener - The listener to add.
public void addTable(java.lang.String tableName)
throws DuplicatedTableNameException
tableName - The table name to be add.
DuplicatedTableNameException - If there is a table with the same
table name and no alias.
public void addTable(java.lang.String tableName,
java.lang.String joinClause)
throws DuplicatedTableNameException
tableName - The table name to be add.joinClause - The join clause to be use by the query method.
DuplicatedTableNameException - If there is a table with the same
table name and no alias.
public void addTable(java.lang.String tableName,
java.lang.String tableAlias,
java.lang.String joinClause)
throws DuplicatedTableAliasException,
DuplicatedTableNameException
tableName - The table name to be add.tableAlias - The alias for the table name. A table alias could be used
in any method where the table name is requiered.joinClause - The join clause to be use by the query method.
DuplicatedTableAliasException - If this table alias is the same that
another table name or alias.
DuplicatedTableNameException - If the tableAlias is null and there
is a table with the same table name and no alias.public void addUpdateListener(DAOUpdateListener listener)
listener - The listener to add.
public void apply(int rowNumber)
throws NoTableDefinedException,
NoColumnDefinedException,
NoPrimaryKeyDefinedException,
RowIndexOutOfBoundsException,
WriterException
rowNumber - The row number.
NoTableDefinedException - If there is no table defined.
NoColumnDefinedException - If there is no column defined.
NoPrimaryKeyDefinedException - If there is no primary key defined.
WriterException - If there was an error reported by the repository.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public void apply()
throws NoTableDefinedException,
NoColumnDefinedException,
NoPrimaryKeyDefinedException,
WriterException
NoTableDefinedException - If there is no table defined.
NoColumnDefinedException - If there is no column defined.
NoPrimaryKeyDefinedException - If there is no primary key defined.
WriterException - If there was an error reported by the repository.public void clear()
public void clearJoinClauses()
public void clearOrderBy()
public void clearWhereStr()
public void deleteFromDataSource(int rowNumber)
throws RowIndexOutOfBoundsException,
WriterException
rowNumber - The row number to be deleted.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
WriterException - When ther is an error writing to the repository.
public void deleteFromDAO(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number to be deleted.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().public int getBadRowNumber()
getBadRowNumber in interface DAOViewpublic DAOFieldsInfo getDAOFieldsInfo()
public int getDataSourceAction(int rowNumber)
throws RowIndexOutOfBoundsException
getDataSourceAction in interface DAOViewrowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public java.util.ArrayList getDataSourcePk(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public MetaField getMetaField(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name.columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public MetaField getMetaField(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.public java.lang.String getOrderBy(int index)
index - The index in the orderby list.
public java.lang.String[] getOrderBy()
public int getQueryPolicy(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name.columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public int getQueryPolicy(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
getQueryPolicy in interface DAOViewcolumnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.public RecordSet getRecordSet()
public DataTableInfo getTableInfo(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The name of the table.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public DataTableInfo getTableInfo()
throws AmbiguousTableException
AmbiguousTableException - When the DataAccessObject has more
than one table.public int getUpdateType()
getUpdateType in interface DAOViewpublic java.lang.String getWhereStr()
public void insert(int rowNumber)
throws RowIndexOutOfBoundsException,
WriterException
rowNumber - The row number to be inserted.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
WriterException - When ther is an error writing to the repository.
public void query()
throws ReaderException,
NoTableDefinedException,
NoColumnDefinedException,
NullDataSourceException
ReaderException - If there was an error reported by the repository.
NoTableDefinedException - If there is no table defined.
NoColumnDefinedException - If there is no column defined.
NullDataSourceException - If there is no DataSource defined.public void removeApplyListener(DAOApplyListener listener)
listener - The listener to add.
public void removeColumn(java.lang.String tableName,
java.lang.String columnName)
throws UnknownTableNameException,
AmbiguousTableNameException,
UnknownColumnNameException
tableName - The table that owns the column.columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public void removeColumn(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousTableException
columnName - The column name.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousTableException - When the DataAccessObject has more
than one table.public void removeDeleteListener(DAODeleteListener listener)
listener - The listener to add.public void removeInsertListener(DAOInsertListener listener)
listener - The listener to add.public void removeQueryListener(DAOQueryListener listener)
listener - The listener to add.public void removeRowAppliedListener(DAORowAppliedListener listener)
listener - The listener to add.public void removeRowRetrivedListener(DAORowRetrivedListener listener)
listener - The listener to add.
public void removeTable(java.lang.String tableName)
throws AmbiguousTableNameException
tableName - The name of the table to be removed.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public void removeUpdateListener(DAOUpdateListener listener)
listener - The listener to add.
public void setCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName,
java.lang.Object obj)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - The row number, an integer from 0 to getRows()-1.tableName - The table name.columnName - The column name.obj - The cell new value.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public void setCellAt(int rowNumber,
java.lang.String columnName,
java.lang.Object obj)
throws UnknownColumnNameException,
AmbiguousColumnNameException,
RowIndexOutOfBoundsException
rowNumber - The row number, an integer from 0 to getRows()-1.columnName - The column name.obj - The cell new value.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public void setCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName,
java.lang.Object obj,
boolean engineProcessed)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - The row number, an integer from 0 to getRows()-1.tableName - The table name.columnName - The column name.obj - The cell new value.engineProcessed - True if the content of the cell is to be
processed by the database engine. This will
force a query to update the value of the cell
after the update or insert.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public void setCellAt(int rowNumber,
java.lang.String columnName,
java.lang.Object obj,
boolean engineProcessed)
throws UnknownColumnNameException,
AmbiguousColumnNameException,
RowIndexOutOfBoundsException
rowNumber - The row number, an integer from 0 to getRows()-1.columnName - The column name.obj - The cell new value.engineProcessed - True if the content of the cell is to be
processed by the database engine. This will
force a query to update the value of the cell
after the update or insert.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().public void setDataSource(DataSource dataSource)
dataSource - The new DataSource object.
public void setDeleted(int rowNumber,
boolean deleted)
throws RowIndexOutOfBoundsException
deleted - True to change the row to deleted, false otherwise.rowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().public void setDistinctQuery(boolean distinctQuery)
distinctQuery - New value of property distinctQuery.
public void setDefaultValue(java.lang.String tableName,
java.lang.String columnName,
java.lang.Object value)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The name of the table.columnName - The name of the column.value - The value to use by default.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public void setDefaultValue(java.lang.String columnName,
java.lang.Object value)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The name of the column.value - The value to use by default.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.
public void setNewRow(int rowNumber,
boolean newRow)
throws RowIndexOutOfBoundsException
rowNumber - The row number.newRow - True if the row is a new row, false otherwise.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public void setOrderBy(int index,
java.lang.String columnName)
index - The index of the column name to be change.columnName - The new name of the column to be set in the
orderby list.public void setOrderBy(java.lang.String[] columnNames)
columnNames - An array with the new orderby column names.
public void setQueryPolicy(java.lang.String tableName,
java.lang.String columnName,
int queryPolicy)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name.columnName - The column name.queryPolicy - New value of property queryPolicy.
UnknownColumnNameException - When the supplied column name is invalid.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.pt.moredata.dao.DAOView.SNAPSHOT,
pt.moredata.dao.DAOView.DYNASET
public void setQueryPolicy(java.lang.String columnName,
int queryPolicy)
throws UnknownColumnNameException,
AmbiguousColumnNameException
setQueryPolicy in interface DAOViewcolumnName - The column name.queryPolicy - New value of property queryPolicy.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.pt.moredata.dao.DAOView.SNAPSHOT,
pt.moredata.dao.DAOView.DYNASETpublic void setUpdateType(int policy)
policy - The new update policy.public void setWhereStr(java.lang.String whereString)
whereString - The whereString clause to be used by the query method.
public void update(int rowNumber)
throws NoTableDefinedException,
NoColumnDefinedException,
NoPrimaryKeyDefinedException,
WriterException,
RowIndexOutOfBoundsException
rowNumber - The DataAccessObject row to be updated.
NoTableDefinedException - If there is no table defined.
NoColumnDefinedException - If there is no column defined.
NoPrimaryKeyDefinedException - If there is no primary key defined.
WriterException - If there was an error reported by the repository.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().public void addDescColumn(java.lang.String descColumn)
public void addMetaField(MetaField metaField)
metaField - Coluna a adicionarpublic void addPkColumn(java.lang.String pkColumn)
pkColumn - Nome da coluna a adicionar
DAORuntimeException - se tabela principal não definida
public void addPkColumn(java.lang.String tableName,
java.lang.String pkColumn)
tableName - Nome da tabelapkColumn - Nome da coluna
public void addPkToListMap(java.util.Collection pKey,
int rowNumber)
pKey - O valor da chave primaria.rowNumber - O numero da linha no recordset.public void addSecTable(java.lang.String tableName)
tableName - Nome da tabela a utilizar
public void addSecTable(java.lang.String tableName,
java.lang.String tableAlias)
tableName - Nome da tabela a utilizartableAlias - Nome alternativo para a tabela.public void addSecTable(DataBaseTable table)
table - Objecto que identifica totalmente a tabelapublic void backupPk(int rowNum)
rowNum - Nº da linha que se pretende copiarpublic void clearAllSecTables()
public void clearMetaFieldAt(int index)
public void clearMetaFields()
public void clearRecordSet()
public void clearSecTable(java.lang.String tableName)
public void clearSecTableAt(int index)
public void delete()
public void delete(int rowNumber)
rowNumber - Número da linha que se pretende apagarpublic void deleteRow(int rowNumber)
rowNumber - Nº de linha a removerpublic DataMetaField getDataMetaField(int numField)
numField - Nº de ordem do campo no data control
public DataMetaField getDataMetaField(java.lang.String fieldName)
fieldName - Nome do campo no data control.
DAORuntimeException - Caso nao exista nenhum campo com o nome mencionado.public boolean isDescColumn(java.lang.String descColumn)
descColumn - Nome da coluna.
public java.util.ArrayList queryByPk(java.util.List selectList,
java.util.List pk)
throws DAORuntimeException
Devolve um array list das colunas pretendidas.
Se existir duplicação da chave "atira" uma excepção.
Não está terminado ?
Mas testado, já está. PVP Sex Out 19 16:46:05 WEST 2001
Tambem é chamado do objecto ddataSwingControl. PVP
Podia ser partido em vários métodos para maior clareza
Tem de se por o swing data control a usa-lo para validar duplicações da PK
Falta implementação para outros tipos de data source
selectList - Lista de campos para selectpk - Lista de campos que constituem a chave primária
DAORuntimeException
public void setCellAt(int rowNum,
int columnNum,
java.lang.Object obj)
rowNum - Número da linha a alterarcolumnNum - Número da coluna a alterarobj - Valor a colocar na célula
public void setCellAt(int rowNum,
int columnNum,
java.lang.Object obj,
boolean engineProcessed)
rowNum - Número da linha a alterarcolumnNum - Número da coluna a alterarobj - Valor a colocar na célulaengineProcessed - O valor contem uma instrução a ser processada no
servidor para obter o valor explicito
public void setCounterColumn(int column,
boolean value)
column - Coluna a definir como contadorvalue - Valor da flag
public void setFixedValue(int column,
java.lang.Object value)
column - Coluna do data control a fixarvalue - Valor que é fixado na coluna
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().public void setMainTable(java.lang.String tableName)
tableName - Nome da tabela principal
public void setMainTable(java.lang.String tableName,
java.lang.String tableAlias)
tableName - Nome da tabelatableAlias - Alias da tabelapublic void setMainTable(DataBaseTable mainTable)
public void setNewRow(boolean _newRow,
int rowNum)
public void setTableName(java.lang.String _tableName)
public void sort()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||