pt.moredata.dao
Interface DAOView

All Known Subinterfaces:
DataAccessObject

public interface DAOView

Simple DAO for read only Company MoreData

Version:
2.0, $Revision: 1.7 $
Author:
pcarmo
See Also:
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

UNKNOWN

public static final int UNKNOWN
Description of the Field

See Also:
Constant Field Values

SUPERSET_UPDATE

public static final int SUPERSET_UPDATE
E gerado um comando preparado, que da para efectuar o update de todas as linha. No limite, a string de update, contem todas as colunas.

See Also:
Constant Field Values

INDIVIDUAL_UPDATE

public static final int INDIVIDUAL_UPDATE
Para cada linha, e gerado um comando preparado. ???? Sera que vale a pena preparar o comando? Se calhar era melhor gerar a string e executa-la!?

See Also:
Constant Field Values

SNAPSHOT

public static final int SNAPSHOT
Columns marked as SNAPSHOT are read normaly from the database when query method is executed. This constant is used in pt.moredata.dao.MetaField.

See Also:
Constant Field Values

DYNASET

public static final int DYNASET
No column marked as DYNASET is read from database when the query(...) method is called. This type of columns are read from database with a independent "select" statement when the method getCellAt(...) is executed. This constant is used in pt.moredata.dao.MetaField.

See Also:
Constant Field Values
Method Detail

getBackupCellAt

public java.lang.Object getBackupCellAt(int rowNumber,
                                        java.lang.String tableName,
                                        java.lang.String columnName)
                                 throws UnknownColumnNameException,
                                        UnknownTableNameException,
                                        AmbiguousTableNameException,
                                        RowIndexOutOfBoundsException
Return the backup value of a cell.

Parameters:
rowNumber - Cell row number. An integer from 0 to getRows()-1.
tableName - Cell table name.
columnName - Cell column name.
Returns:
The backup value of a cell.
Throws:
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().

getBackupCellAt

public java.lang.Object getBackupCellAt(int rowNumber,
                                        java.lang.String columnName)
                                 throws UnknownColumnNameException,
                                        AmbiguousColumnNameException,
                                        RowIndexOutOfBoundsException
Return the backup value of a cell.

Parameters:
rowNumber - Cell row number. An integer from 0 to getRows()-1.
columnName - Cell column name.
Returns:
The backup value of a cell.
Throws:
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().

getCellAt

public java.lang.Object getCellAt(int rowNumber,
                                  java.lang.String tableName,
                                  java.lang.String columnName)
                           throws UnknownColumnNameException,
                                  UnknownTableNameException,
                                  AmbiguousTableNameException,
                                  RowIndexOutOfBoundsException
Return the value of a cell.

Parameters:
rowNumber - Cell row number. An integer from 0 to getRows()-1.
tableName - Cell table name.
columnName - Cell column name.
Returns:
The value of a cell.
Throws:
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().

getCellAt

public java.lang.Object getCellAt(int rowNumber,
                                  java.lang.String columnName)
                           throws UnknownColumnNameException,
                                  AmbiguousColumnNameException,
                                  RowIndexOutOfBoundsException
Return the value of a cell.

Parameters:
rowNumber - Cell row number. An integer from 0 to getRows()-1.
columnName - Cell column name.
Returns:
The value of a cell.
Throws:
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().

getCellAt

public java.lang.Object getCellAt(java.util.List primaryKey,
                                  java.lang.String tableName,
                                  java.lang.String columnName)
                           throws UnknownColumnNameException,
                                  UnknownTableNameException,
                                  AmbiguousTableNameException
Return a DAOView cell value for a given primary key value.

Parameters:
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.
Returns:
A DAOView cell value for a given primary key value.
Throws:
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.

getCellAt

public java.lang.Object getCellAt(java.util.List primaryKey,
                                  java.lang.String columnName)
                           throws UnknownColumnNameException,
                                  AmbiguousColumnNameException
Return a DAOView cell value for a given primary key value.

Parameters:
primaryKey - The primary key value. Each element of the list is a value for a primary key column.
columnName - Cell column name.
Returns:
A DAOView cell value for a given primary key value.
Throws:
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists in more than one table.

getColumnName

public java.lang.String getColumnName(int columnNumber)
                               throws ColumnIndexOutOfBoundsException
Return the column name associated to a specified column index.

Parameters:
columnNumber - The column index.
Returns:
The column name associated to a specified column index.
Throws:
ColumnIndexOutOfBoundsException - If columnNumber < 0 or columnNumber >= getColumns().

getColumnsNames

public java.util.Iterator getColumnsNames(java.lang.String tableName)
                                   throws UnknownTableNameException,
                                          AmbiguousTableNameException
Return a list with the names of all columns know to the DAO for a giveen table.

Returns:
A Iterator with the names of all columns know to the DAO for a giveen table.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.

getColumnsNames

public java.util.Iterator getColumnsNames()
Return a list with the names of all columns for all know tables. Column names could be repeted if they exist in more than one table.

Returns:
A Iterator with the names of all columns for all know tables.

getColumnNumber

public int getColumnNumber(java.lang.String tableName,
                           java.lang.String columnName)
                    throws UnknownColumnNameException,
                           UnknownTableNameException,
                           AmbiguousTableNameException
Return the index of a column inside DAO.

Parameters:
tableName - The name of the table.
columnName - The name of the column.
Returns:
The index of a column inside DAO.
Throws:
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.

getColumnNumber

public int getColumnNumber(java.lang.String columnName)
                    throws UnknownColumnNameException,
                           AmbiguousColumnNameException
Return the index of a column inside DAO.

Parameters:
columnName - The name of the column.
Returns:
The index of a column inside DAO.
Throws:
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists in more than one table.

getColumns

public int getColumns(java.lang.String tableName)
               throws UnknownTableNameException,
                      AmbiguousTableNameException
Return the number of columns for a giveen table of the DAOView.

Parameters:
tableName - The table name.
Returns:
The number of columns for a giveen table of the DAOView.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.

getColumns

public int getColumns()
Return the number of columns of all tables of the DAOView.

Returns:
The number of columns of all tables of the DAOView.

getColumns

public int getColumns(int rowNumber)
               throws RowIndexOutOfBoundsException
Return the number of columns for a giveen row of the DAOView.

Parameters:
rowNumber - The row number.
Returns:
The number of columns for a giveen row of the DAOView.
Throws:
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

getDataType

public int getDataType(java.lang.String tableName,
                       java.lang.String columnName)
                throws UnknownColumnNameException,
                       UnknownTableNameException,
                       AmbiguousTableNameException
Return the DataType of a giveen cell.

Parameters:
tableName - The name of the table.
columnName - The cell column name.
Returns:
The DataType of a giveen cell.
Throws:
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.

getDataType

public int getDataType(java.lang.String columnName)
                throws UnknownColumnNameException,
                       AmbiguousColumnNameException
Return the DataType of a giveen cell.

Parameters:
columnName - The cell column name.
Returns:
The DataType of a giveen cell.
Throws:
UnknownColumnNameException - When the supplied column name is invalid.
AmbiguousColumnNameException - When the supplied columnName exists in more than one table.

getDataSource

public DataSource getDataSource()
Return the DataSource object used to read and write data to the repository.

Returns:
A DataSource object used to read and write data to the repository.

getPKColumnNames

public java.util.ArrayList getPKColumnNames(java.lang.String tableName)
                                     throws UnknownTableNameException,
                                            AmbiguousTableNameException
Returns a list with the primary key column names of a DAOView table.

Parameters:
tableName - The name of the table
Returns:
ArrayList with the primary key column names of a DAOView table.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.

getPKColumnNames

public java.util.ArrayList getPKColumnNames()
Returns a list with the primary key column names of all DAOView tables.

Returns:
ArrayList with the primary key column names of all DAOView tables.

getPKNameAndValue

public java.util.Hashtable getPKNameAndValue(int rowNumber,
                                             java.lang.String tableName)
                                      throws UnknownTableNameException,
                                             AmbiguousTableNameException,
                                             RowIndexOutOfBoundsException
Return a Map with the primary key column names and is value for a giveen row number and DAOView table.

Parameters:
rowNumber - The row number in DAOView.
tableName - The table name.
Returns:
A Map with the primary key column names and is value.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

getPKNameAndValue

public java.util.Hashtable getPKNameAndValue(int rowNumber)
                                      throws RowIndexOutOfBoundsException
Return a Map with the primary key column names and is value for a giveen row number. The primary key list is build with the primary keys of all DAOView tables.

Parameters:
rowNumber - The row number in DAOView.
Returns:
A Map with the primary key column names and is value for all tables in DAOView.
Throws:
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

getPKValue

public java.util.ArrayList getPKValue(int rowNumber,
                                      java.lang.String tableName)
                               throws UnknownTableNameException,
                                      AmbiguousTableNameException,
                                      RowIndexOutOfBoundsException
Return a list with the primary key value for a giveen table of the DAOView.

Parameters:
rowNumber - The row number in DAOView.
tableName - The table name.
Returns:
A ArrayList with the primary key value for a giveen table of the DAOView.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

getPKValue

public java.util.ArrayList getPKValue(int rowNumber)
                               throws RowIndexOutOfBoundsException
Return a list with the primary key value for all tables of the DAOView.

Parameters:
rowNumber - The row number in DAOView.
Returns:
A ArrayList with the primary key value for all tables of the DAOView.
Throws:
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

getRowNumber

public java.util.ArrayList getRowNumber(java.lang.String tableName,
                                        java.util.List primaryKey)
                                 throws UnknownTableNameException,
                                        AmbiguousTableNameException
Return a list of indexs of rows with a giveen primary key value of a giveen table. If the DAOView only have one table this method is identically to the method getRowNumber(Collection primaryKey) and the list will have one index only.

Parameters:
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().
Returns:
The index of a row with a giveen primary key value or null if no row is found.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.

getRowNumber

public int getRowNumber(java.util.List primaryKey)
Return the index of a row with a giveen primary key value.

Parameters:
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().
Returns:
The index of a row with a giveen primary key value or -1 if no row is found.

getRows

public int getRows()
Return the number of rows of the DAOView.

Returns:
The number of rows of the DAOView.

getTableName

public java.lang.String getTableName()
Get the name of the first table of the DAOView object.

Returns:
The name of the first table of the DAOView object.

getTablesNames

public java.util.Iterator getTablesNames()
Get a list with the names of all tables of the DAOView object.

Returns:
A list with the names of all tables of the DAOView object.

hasPrimaryKey

public boolean hasPrimaryKey(java.lang.String tableName)
                      throws UnknownTableNameException,
                             AmbiguousTableNameException
Check if a table of the DAOView has a primary key defined.

Parameters:
tableName - The table name.
Returns:
True if the DAOView table has a primary key defined, false otherwise.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.

hasPrimaryKey

public boolean hasPrimaryKey()
                      throws AmbiguousTableException
Check the DAOView table has a primary key defined.

Returns:
True if the DAOView table has a primary key defined, false otherwise.
Throws:
AmbiguousTableException - When the DAOView has more than one table.

isCellModified

public boolean isCellModified(int rowNumber,
                              java.lang.String tableName,
                              java.lang.String columnName)
                       throws UnknownColumnNameException,
                              UnknownTableNameException,
                              AmbiguousTableNameException,
                              RowIndexOutOfBoundsException
Check if a giveen cell is modified. For INDIVIDUAL_UPDATE the cell is modified if and only if is content was modified. For SUPERSET_UPDATE, the cell is modified if any cell in the specified row is modified

Parameters:
rowNumber - The cell row number.
columnName - The cell column name.
Returns:
True if the cell is modified, false otherwise.
Throws:
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().

isCellModified

public boolean isCellModified(int rowNumber,
                              java.lang.String columnName)
                       throws UnknownColumnNameException,
                              AmbiguousColumnNameException,
                              RowIndexOutOfBoundsException
Check if a giveen cell is modified. If updateType is INDIVIDUAL_UPDATE the cell is modified if and only if is content was modified. For SUPERSET_UPDATE, the cell is modified if any cell in the specified row is modified

Parameters:
rowNumber - The cell row number.
columnName - The cell column name.
Returns:
True if the cell is modified, false otherwise.
Throws:
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().

isColumn

public boolean isColumn(java.lang.String columnName)
                 throws AmbiguousColumnNameException
Check if a column with a giveen name has allready add to the DAOView.

Parameters:
columnName - The column name.
Returns:
True if the giveen column was added to the DAOView, false otherwise.
Throws:
AmbiguousColumnNameException - When the supplied columnName exists in more than one table.

isColumn

public boolean isColumn(java.lang.String tableName,
                        java.lang.String columnName)
                 throws UnknownTableNameException,
                        AmbiguousTableNameException
Check if a column with a giveen name has allready add to the DAOView for a giveen table.

Parameters:
tableName - The table name.
columnName - The column name.
Returns:
True if the giveen column was added to the DAOView, false otherwise.
Throws:
UnknownTableNameException - When the supplied table name is invalid.
AmbiguousTableNameException - When the supplied tableName exists more than once.

isDeleted

public boolean isDeleted(int rowNumber)
                  throws RowIndexOutOfBoundsException
Checks if the given row number was deleted.

Parameters:
rowNumber - The row number.
Returns:
True if the row number was deleted.
Throws:
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

isModified

public boolean isModified(int rowNumber)
                   throws RowIndexOutOfBoundsException
Check if a giveen row of the DAOView is modified.

Parameters:
rowNumber - The row number.
Returns:
True if the giveen row of the DAOView is modified.
Throws:
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

isNewRow

public boolean isNewRow(int rowNumber)
                 throws RowIndexOutOfBoundsException
Check if a giveen row of the DAOView is a new row. A new row is a row created with the DAOView and not submited to the data source

Parameters:
rowNumber - The row number.
Returns:
True if the giveen row of the DAOView is a new row.
Throws:
RowIndexOutOfBoundsException - If rowNumber < 0 or rowNumber >= getRows().

isPkPart

public boolean isPkPart(java.lang.String tableName,
                        java.lang.String columnName)
                 throws UnknownColumnNameException,
                        UnknownTableNameException,
                        AmbiguousTableNameException
Check if a column is part of the primary key of a giveen table.

Parameters:
tableName - The table name.
columnName - The column name.
Returns:
true if the column is part of the primary key of the giveen table, false otherwise.
Throws:
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.

isPkPart

public boolean isPkPart(java.lang.String columnName)
                 throws AmbiguousColumnNameException
Check if a column is part of the primary key of the DAOView table.

Parameters:
columnName - The column name.
Returns:
true if the column exists and if it is part of the primary key of the giveen table, false otherwise.
Throws:
AmbiguousColumnNameException - When the supplied columnName exists in more than one table.

dump

public void dump()
Deprecated. This method will be removed and will not have a replacment.

Dump DataAccessObject. For debug only!


dump

public void dump(java.lang.String _prefix)
Deprecated. This method will be removed and will not have a replacment.

Dump DataAccessObject. For debug only!

Parameters:
_prefix - Description of the Parameter

dumpMetaFields

public void dumpMetaFields()
Deprecated. This method will be removed and will not have a replacment.

Dump MetaFields. For debug only!


dumpMetaFields

public void dumpMetaFields(java.lang.String _prefix)
Deprecated. This method will be removed and will not have a replacment.

Dump MetaFields. For debug only!

Parameters:
_prefix - Description of the Parameter

getBadRowNumber

public int getBadRowNumber()
Deprecated. This method was moved to the DataAccessObject interface.

Get the value of badRowNumber.

Returns:
Value of badRowNumber.

getCellAt

public java.lang.Object getCellAt(int line,
                                  int column)
Deprecated. Use the method getCellAt(int line, String columnName) instead.

Devolve o objecto que esta numa dada celula Tanto as colunas como linhas começam em zero


getCellFromPk

public java.lang.Object getCellFromPk(java.lang.Object primaryKey,
                                      int columnNum)
Deprecated. Use method getCellAt(ArrayList primaryKey, String columnName) instead.

Devolve determinada coluna acedendo por chave primaria Para chaves simples, so com um valor


getCellFromPk

public java.lang.Object getCellFromPk(java.util.ArrayList primaryKey,
                                      int columnNum)
Deprecated. Use method getCellAt(ArrayList primaryKey, String columnName) instead.

Devolve determinada coluna acedendo por chave primaria

Se não existir registo com chave pretendida faz throw de uma excepção DDataNotFoundException


getCellByPk

public java.lang.Object getCellByPk(java.util.ArrayList primaryKey,
                                    java.lang.String columnName)
                             throws DAORuntimeException
Deprecated. Use getCellAt(ArrayList primaryKey, String columnName) instead.

Gets the cellByPk attribute of the DataAccessObject object

Parameters:
primaryKey - Description of the Parameter
columnName - Description of the Parameter
Returns:
The cellByPk value
Throws:
DAORuntimeException - Description of the Exception

getDataSourceAction

public int getDataSourceAction(int rowNum)
                        throws java.lang.IndexOutOfBoundsException
Deprecated. This method was moved to the DataAccessObject interface.

Devolve a accao que deve ser executada para sincronizacao dos dados do data source com os do data control

Parameters:
rowNum - Description of the Parameter
Returns:
The dataSourceAction value
Throws:
java.lang.IndexOutOfBoundsException - Description of the Exception

getDSource

public DataSource getDSource()
Deprecated. Use getDataSource() instead.

Devolve o data source usado para obter a informação (base de dados, objectos serializados ou XML)

Returns:
Data source de origem da informação

getDataType

public int getDataType(int numField)
Deprecated. Use method getDataType(String fieldName) instead.

Devolve o tipo de dados de uma determinada coluna.

Parameters:
numField - O numero da coluna.

getDbType

public java.lang.String getDbType()
Deprecated. This method will be removed and will not have a replacment.

Devolve o tipo de base de dados que esta a ser usada.


getPKName

public java.util.ArrayList getPKName()
Deprecated. Use getPKColumnNames() instead.

Devolve a o nome da chave primaria relativa a uma linha especifica.

Returns:
ArrayList com os nomes que constituem a chave primária.

getQueryPolicy

public int getQueryPolicy(java.lang.String fieldName)
Deprecated. This method was moved to the DataAccessObject interface.

Returns the policy used by DAOView query method for a column.

Parameters:
fieldName - The column name.
Returns:
The policy used by DAOView query method for a column.

getRowFromPk

public int getRowFromPk(java.util.Collection primaryKey)
Deprecated. Use getRowNumber(Collection primaryKey) instead.

Devolve a linha que contem a chave primária com um determinado valor.

Parameters:
primaryKey - Uma lista com os valores das colunas que compoem a chave primaria.
Returns:
O numero da linha que contem a chave primária com o valor passado como argumento, ou -1 caso nao exista nenhuma linha com a chave primaria.

getUpdateType

public int getUpdateType()
Deprecated. This method was moved to the DataAccessObject interface.

Get the value of updateType.

Returns:
Value of updateType.

isInsertColumn

public boolean isInsertColumn(MetaField field)
Deprecated. This method will be removed and will not have a replacment.


Valida se a coluna é usada na inserção.
Não são para impressão:

Parameters:
field - Coluna do data control a validar

isPkPart

public boolean isPkPart(int columnNum)
Deprecated. Use method isPkPart(String columnName) instead.

Verifica se um coluna faz parte da chave primaria.

Parameters:
columnNum - Numero da coluna.
Returns:
true se a coluna enviada como parametro fizer parta da chave primaria, false caso contrario.

isUpdateColumn

public boolean isUpdateColumn(MetaField field)
Deprecated. This method will be removed and will not have a replacment.


Valida se a coluna é usada na alteracao.
Não são para impressão:

Parameters:
field - Coluna do data control a validar

setQueryPolicy

public void setQueryPolicy(java.lang.String fieldName,
                           int queryPolicy)
Deprecated. This method was moved to the DataAccessObject interface.

Changes the query policy for a column. Query policys could be SNAPSHOT or DYNASET.

Parameters:
fieldName - The column name.
queryPolicy - New value of property queryPolicy.
See Also:
pt.moredata.dao.DAOView.SNAPSHOT, pt.moredata.dao.DAOView.DYNASET

getColumnNames

public java.util.Enumeration getColumnNames()
Deprecated. Use method getColumnsNames() instead.

Return a list with the names of all columns for all know tables. Column names could be repeted if they exist in more than one table.

Returns:
A Enumeration with the names of all columns for all know tables.