|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpt.moredata.dao.core.AbstractSQLStatementBuilder
AbstractSQLStatementBuilder.java Company MoreData
| Field Summary | |
protected DAOFieldsInfo |
_fieldsInfo
DAOFieldsInfo object with information about DAO columns and tables. |
protected SQLInformation |
_info
Aditional information to build the SQL command. |
protected RecordSet |
_recordSet
DAO RecordSet. |
| Constructor Summary | |
AbstractSQLStatementBuilder(DAOFieldsInfo fieldsInfo,
RecordSet recordSet)
Creates a new instance of AbstractSQLStatementBuilder |
|
| Method Summary | |
protected abstract java.lang.String |
getSQLStatement()
Builds a SQL command for interacting with a table of a relational database repository. |
java.lang.String |
getSQLStatement(SQLInformation info)
Builds a SQL command for interacting with a table of a relational database repository. |
protected static java.lang.Object |
getStringObjectWithSpaceAtEnd(java.lang.Object obj,
MetaField mf)
Add spaces to the Object if the Obect is a String and the column type is CHAR(n). |
void |
setDAOFieldsInfo(DAOFieldsInfo fieldsInfo)
Set the DAOFieldsInfo object with information about the columns of the RecordSet. |
void |
setRecordSet(RecordSet recordSet)
Set the RecordSet used to store the information read from the repository. |
protected void |
setRecordValue(java.sql.PreparedStatement statement,
int statementIndex,
int rowNumber,
MetaField field)
Afecta os dados ao statement enviado como parametro na posição pretendida verificando se estes estão ou não nulos Ainda é dependente do tipo de dados pois o setNull obriga a tipo de dados |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface pt.moredata.dao.SQLStatementBuilder |
loadData, setStatementParameters |
| Field Detail |
protected SQLInformation _info
protected DAOFieldsInfo _fieldsInfo
protected RecordSet _recordSet
| Constructor Detail |
public AbstractSQLStatementBuilder(DAOFieldsInfo fieldsInfo,
RecordSet recordSet)
fieldsInfo - The DAO fields information object.recordSet - The DAO RecordSet object witch contains the DAO data.| Method Detail |
protected abstract java.lang.String getSQLStatement()
protected void setRecordValue(java.sql.PreparedStatement statement,
int statementIndex,
int rowNumber,
MetaField field)
throws java.sql.SQLException
Ainda é dependente do tipo de dados pois o setNull obriga a tipo de dados
rowNumber - numero da linha.field - MetaField que representa a linha.statementIndex - Index da coluna para a qual se vai afectar o valor.statement - Prepared Statement
java.sql.SQLException - Se ocorrer erro na passagem de
dados ao motor.
protected static java.lang.Object getStringObjectWithSpaceAtEnd(java.lang.Object obj,
MetaField mf)
obj - The String object.mf - The column meta field descriptor.
public void setDAOFieldsInfo(DAOFieldsInfo fieldsInfo)
SQLStatementBuilder
setDAOFieldsInfo in interface SQLStatementBuilderfieldsInfo - The DAOFieldInfo object.public void setRecordSet(RecordSet recordSet)
SQLStatementBuilder
setRecordSet in interface SQLStatementBuilderrecordSet - The RecorSet object to store the readed information.public java.lang.String getSQLStatement(SQLInformation info)
getSQLStatement in interface SQLStatementBuilderinfo - Adicional information to help building the sql statement.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||