|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Simple DAO for read only Company MoreData
DataAccessObject| Field Summary | |
static int |
DYNASET
No column marked as DYNASET is read from database when the query(...) method is called. |
static int |
INDIVIDUAL_UPDATE
Para cada linha, e gerado um comando preparado. ???? |
static int |
SNAPSHOT
Columns marked as SNAPSHOT are read normaly from the database when query method is executed. |
static int |
SUPERSET_UPDATE
E gerado um comando preparado, que da para efectuar o update de todas as linha. |
static int |
UNKNOWN
Description of the Field |
| Method Summary | |
void |
dump()
Deprecated. This method will be removed and will not have a replacment. |
void |
dump(java.lang.String _prefix)
Deprecated. This method will be removed and will not have a replacment. |
void |
dumpMetaFields()
Deprecated. This method will be removed and will not have a replacment. |
void |
dumpMetaFields(java.lang.String _prefix)
Deprecated. This method will be removed and will not have a replacment. |
java.lang.Object |
getBackupCellAt(int rowNumber,
java.lang.String columnName)
Return the backup value of a cell. |
java.lang.Object |
getBackupCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName)
Return the backup value of a cell. |
int |
getBadRowNumber()
Deprecated. This method was moved to the DataAccessObject interface. |
java.lang.Object |
getCellAt(int line,
int column)
Deprecated. Use the method getCellAt(int line, String columnName) instead. |
java.lang.Object |
getCellAt(int rowNumber,
java.lang.String columnName)
Return the value of a cell. |
java.lang.Object |
getCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName)
Return the value of a cell. |
java.lang.Object |
getCellAt(java.util.List primaryKey,
java.lang.String columnName)
Return a DAOView cell value for a given primary key value. |
java.lang.Object |
getCellAt(java.util.List primaryKey,
java.lang.String tableName,
java.lang.String columnName)
Return a DAOView cell value for a given primary key value. |
java.lang.Object |
getCellByPk(java.util.ArrayList primaryKey,
java.lang.String columnName)
Deprecated. Use getCellAt(ArrayList primaryKey, String columnName) instead. |
java.lang.Object |
getCellFromPk(java.util.ArrayList primaryKey,
int columnNum)
Deprecated. Use method getCellAt(ArrayList primaryKey, String columnName) instead. |
java.lang.Object |
getCellFromPk(java.lang.Object primaryKey,
int columnNum)
Deprecated. Use method getCellAt(ArrayList primaryKey, String columnName) instead. |
java.lang.String |
getColumnName(int columnNumber)
Return the column name associated to a specified column index. |
java.util.Enumeration |
getColumnNames()
Deprecated. Use method getColumnsNames() instead. |
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. |
int |
getColumns()
Return the number of columns of all tables of the DAOView. |
int |
getColumns(int rowNumber)
Return the number of columns for a giveen row of the DAOView. |
int |
getColumns(java.lang.String tableName)
Return the number of columns for a giveen table of the DAOView. |
java.util.Iterator |
getColumnsNames()
Return a list with the names of all columns for all know tables. |
java.util.Iterator |
getColumnsNames(java.lang.String tableName)
Return a list with the names of all columns know to the DAO for a giveen table. |
DataSource |
getDataSource()
Return the DataSource object used to read and write data to the repository. |
int |
getDataSourceAction(int rowNum)
Deprecated. This method was moved to the DataAccessObject interface. |
int |
getDataType(int numField)
Deprecated. Use method getDataType(String fieldName) instead. |
int |
getDataType(java.lang.String columnName)
Return the DataType of a giveen cell. |
int |
getDataType(java.lang.String tableName,
java.lang.String columnName)
Return the DataType of a giveen cell. |
java.lang.String |
getDbType()
Deprecated. This method will be removed and will not have a replacment. |
DataSource |
getDSource()
Deprecated. Use getDataSource() instead. |
java.util.ArrayList |
getPKColumnNames()
Returns a list with the primary key column names of all DAOView tables. |
java.util.ArrayList |
getPKColumnNames(java.lang.String tableName)
Returns a list with the primary key column names of a DAOView table. |
java.util.ArrayList |
getPKName()
Deprecated. Use getPKColumnNames() instead. |
java.util.Hashtable |
getPKNameAndValue(int rowNumber)
Return a Map with the primary key column names and is value for a giveen row number. |
java.util.Hashtable |
getPKNameAndValue(int rowNumber,
java.lang.String tableName)
Return a Map with the primary key column names and is value for a giveen row number and DAOView table. |
java.util.ArrayList |
getPKValue(int rowNumber)
Return a list with the primary key value for all tables of the DAOView. |
java.util.ArrayList |
getPKValue(int rowNumber,
java.lang.String tableName)
Return a list with the primary key value for a giveen table of the DAOView. |
int |
getQueryPolicy(java.lang.String fieldName)
Deprecated. This method was moved to the DataAccessObject interface. |
int |
getRowFromPk(java.util.Collection primaryKey)
Deprecated. Use getRowNumber(Collection primaryKey) instead. |
int |
getRowNumber(java.util.List primaryKey)
Return the index of a row with a giveen primary key value. |
java.util.ArrayList |
getRowNumber(java.lang.String tableName,
java.util.List primaryKey)
Return a list of indexs of rows with a giveen primary key value of a giveen table. |
int |
getRows()
Return the number of rows of the DAOView. |
java.lang.String |
getTableName()
Get the name of the first table of the DAOView object. |
java.util.Iterator |
getTablesNames()
Get a list with the names of all tables of the DAOView object. |
int |
getUpdateType()
Deprecated. This method was moved to the DataAccessObject interface. |
boolean |
hasPrimaryKey()
Check the DAOView table has a primary key defined. |
boolean |
hasPrimaryKey(java.lang.String tableName)
Check if a table of the DAOView has a primary key defined. |
boolean |
isCellModified(int rowNumber,
java.lang.String columnName)
Check if a giveen cell is modified. |
boolean |
isCellModified(int rowNumber,
java.lang.String tableName,
java.lang.String columnName)
Check if a giveen cell is modified. |
boolean |
isColumn(java.lang.String columnName)
Check if a column with a giveen name has allready add to the DAOView. |
boolean |
isColumn(java.lang.String tableName,
java.lang.String columnName)
Check if a column with a giveen name has allready add to the DAOView for a giveen table. |
boolean |
isDeleted(int rowNumber)
Checks if the given row number was deleted. |
boolean |
isInsertColumn(MetaField field)
Deprecated. This method will be removed and will not have a replacment. |
boolean |
isModified(int rowNumber)
Check if a giveen row of the DAOView is modified. |
boolean |
isNewRow(int rowNumber)
Check if a giveen row of the DAOView is a new row. |
boolean |
isPkPart(int columnNum)
Deprecated. Use method isPkPart(String columnName) instead. |
boolean |
isPkPart(java.lang.String columnName)
Check if a column is part of the primary key of the DAOView table. |
boolean |
isPkPart(java.lang.String tableName,
java.lang.String columnName)
Check if a column is part of the primary key of a giveen table. |
boolean |
isUpdateColumn(MetaField field)
Deprecated. This method will be removed and will not have a replacment. |
void |
setQueryPolicy(java.lang.String fieldName,
int queryPolicy)
Deprecated. This method was moved to the DataAccessObject interface. |
| Field Detail |
public static final int UNKNOWN
public static final int SUPERSET_UPDATE
public static final int INDIVIDUAL_UPDATE
public static final int SNAPSHOT
public static final int DYNASET
| Method Detail |
public java.lang.Object getBackupCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - Cell row number. An integer from 0 to getRows()-1.tableName - Cell table name.columnName - Cell 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.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public java.lang.Object getBackupCellAt(int rowNumber,
java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException,
RowIndexOutOfBoundsException
rowNumber - Cell row number. An integer from 0 to getRows()-1.columnName - Cell column name.
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 java.lang.Object getCellAt(int rowNumber,
java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - Cell row number. An integer from 0 to getRows()-1.tableName - Cell table name.columnName - Cell 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.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public java.lang.Object getCellAt(int rowNumber,
java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException,
RowIndexOutOfBoundsException
rowNumber - Cell row number. An integer from 0 to getRows()-1.columnName - Cell column name.
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 java.lang.Object getCellAt(java.util.List primaryKey,
java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
primaryKey - The primary key value. Each element of the
list is a value for a primary key column.tableName - Cell table name.columnName - Cell 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 java.lang.Object getCellAt(java.util.List primaryKey,
java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
primaryKey - The primary key value. Each element of the
list is a value for a primary key column.columnName - Cell 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 getColumnName(int columnNumber)
throws ColumnIndexOutOfBoundsException
columnNumber - The column index.
ColumnIndexOutOfBoundsException - If columnNumber < 0 or
columnNumber >= getColumns().
public java.util.Iterator getColumnsNames(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public java.util.Iterator getColumnsNames()
public int getColumnNumber(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The name of the table.columnName - The name of the column.
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 getColumnNumber(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The name of the column.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.
public int getColumns(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public int getColumns()
public int getColumns(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public int getDataType(java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException
tableName - The name of the table.columnName - The cell 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 getDataType(java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException
columnName - The cell column name.
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.public DataSource getDataSource()
public java.util.ArrayList getPKColumnNames(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 java.util.ArrayList getPKColumnNames()
public java.util.Hashtable getPKNameAndValue(int rowNumber,
java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - The row number in DAOView.tableName - The table name.
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 java.util.Hashtable getPKNameAndValue(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number in DAOView.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public java.util.ArrayList getPKValue(int rowNumber,
java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - The row number in DAOView.tableName - The table name.
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 java.util.ArrayList getPKValue(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number in DAOView.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public java.util.ArrayList getRowNumber(java.lang.String tableName,
java.util.List primaryKey)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name.primaryKey - A list with the primary key value of all the
DAOView tables. The value list must be in the
same order that the columnNames returned by the
method getPKColumnNames().
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.public int getRowNumber(java.util.List primaryKey)
primaryKey - A list with the primary key value of all the
DAOView tables. The value list must be in the
same order that the columnNames returned by the
method getPKColumnNames().
public int getRows()
public java.lang.String getTableName()
public java.util.Iterator getTablesNames()
public boolean hasPrimaryKey(java.lang.String tableName)
throws UnknownTableNameException,
AmbiguousTableNameException
tableName - The table name.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public boolean hasPrimaryKey()
throws AmbiguousTableException
AmbiguousTableException - When the DAOView has more than one table.
public boolean isCellModified(int rowNumber,
java.lang.String tableName,
java.lang.String columnName)
throws UnknownColumnNameException,
UnknownTableNameException,
AmbiguousTableNameException,
RowIndexOutOfBoundsException
rowNumber - The cell row number.columnName - The cell 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.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public boolean isCellModified(int rowNumber,
java.lang.String columnName)
throws UnknownColumnNameException,
AmbiguousColumnNameException,
RowIndexOutOfBoundsException
rowNumber - The cell row number.columnName - The cell column name.
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 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.columnName - The column name.
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists
more than once.
public boolean isDeleted(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public boolean isModified(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public boolean isNewRow(int rowNumber)
throws RowIndexOutOfBoundsException
rowNumber - The row number.
RowIndexOutOfBoundsException - If rowNumber < 0 or
rowNumber >= getRows().
public boolean isPkPart(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 boolean isPkPart(java.lang.String columnName)
throws AmbiguousColumnNameException
columnName - The column name.
AmbiguousColumnNameException - When the supplied columnName exists
in more than one table.public void dump()
public void dump(java.lang.String _prefix)
_prefix - Description of the Parameterpublic void dumpMetaFields()
public void dumpMetaFields(java.lang.String _prefix)
_prefix - Description of the Parameterpublic int getBadRowNumber()
public java.lang.Object getCellAt(int line,
int column)
public java.lang.Object getCellFromPk(java.lang.Object primaryKey,
int columnNum)
public java.lang.Object getCellFromPk(java.util.ArrayList primaryKey,
int columnNum)
Se não existir registo com chave pretendida faz throw de uma excepção DDataNotFoundException
public java.lang.Object getCellByPk(java.util.ArrayList primaryKey,
java.lang.String columnName)
throws DAORuntimeException
primaryKey - Description of the ParametercolumnName - Description of the Parameter
DAORuntimeException - Description of the Exception
public int getDataSourceAction(int rowNum)
throws java.lang.IndexOutOfBoundsException
rowNum - Description of the Parameter
java.lang.IndexOutOfBoundsException - Description of the Exceptionpublic DataSource getDSource()
public int getDataType(int numField)
numField - O numero da coluna.public java.lang.String getDbType()
public java.util.ArrayList getPKName()
public int getQueryPolicy(java.lang.String fieldName)
fieldName - The column name.
public int getRowFromPk(java.util.Collection primaryKey)
primaryKey - Uma lista com os valores das colunas que compoem a
chave primaria.
public int getUpdateType()
public boolean isInsertColumn(MetaField field)
field - Coluna do data control a validarpublic boolean isPkPart(int columnNum)
columnNum - Numero da coluna.
public boolean isUpdateColumn(MetaField field)
field - Coluna do data control a validar
public void setQueryPolicy(java.lang.String fieldName,
int queryPolicy)
fieldName - The column name.queryPolicy - New value of property queryPolicy.pt.moredata.dao.DAOView.SNAPSHOT,
pt.moredata.dao.DAOView.DYNASETpublic java.util.Enumeration getColumnNames()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||