|
JDBaccess API 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Select
Interface for selecting objects: with Select you define and execute sql selects.
Example:
Select select = new Select();
select.setSql("select * from employee");
Result result = select.execute();
ArrayList list = result.getAllElements();
long count = result.getSize();
select.end();
| Method Summary | |
|---|---|
Result |
execute()
Executes the given Select-object |
java.util.ArrayList |
getOrderBy()
|
java.lang.String |
getSqlCount()
|
void |
setOrderBy(java.util.ArrayList orderByFieldNames)
Set the order by fields. |
void |
setResultFieldType(java.lang.String fieldName,
java.lang.Class type)
If you do not want to get the default class type for a field in your select result, you can set a field to a specific class type. |
void |
setResultType(java.lang.Class type)
Set the result of the select to a specific class which means that all elements which are returned in that result are of this type. |
void |
setSqlCount(java.lang.String sqlCount)
Too gain further performance for method getSize() you can define countSelects on your select. |
| Methods inherited from interface com.jdbaccess.da.DataAccess |
|---|
end, getName, getObjectType, getPackageName, getSize, getSql, setName, setObjectType, setPackageName, setParameters, setSql, toString |
| Method Detail |
|---|
Result execute()
throws ApplicationException
ApplicationExceptionvoid setResultType(java.lang.Class type)
type -
void setResultFieldType(java.lang.String fieldName,
java.lang.Class type)
fieldName - type - void setSqlCount(java.lang.String sqlCount)
sqlCount - java.lang.String getSqlCount()
void setOrderBy(java.util.ArrayList orderByFieldNames)
orderByFieldNames - java.util.ArrayList getOrderBy()
|
JDBaccess API 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||