|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openxava.tab.impl.JDBCTabProvider
public class JDBCTabProvider
An ITabProvider that obtain data via JDBC.
It is a JavaBean and allows set properties as table name, fields,
search condition, etc.
Before use this object is advisable call to invariant().
| Constructor Summary | |
|---|---|
JDBCTabProvider()
|
|
| Method Summary | |
|---|---|
int |
getChunkSize()
Size of chunk returned by nextChunk(). |
java.lang.String[] |
getConditions()
List of codition in SQL format. |
IConnectionProvider |
getConnectionProvider()
To obtaint JDBC connections. |
int |
getCurrent()
|
java.lang.String[] |
getFields()
|
int |
getResultSize()
Record (or object, or row) count of last consult. |
java.lang.Number |
getSum(java.lang.String column)
|
java.lang.String |
getTable()
Database table name. |
void |
invariant()
Verify invariant. |
DataChunk |
nextChunk()
Obtain the next data chunk. |
void |
reset()
If you call this method the next time that you call ITabProvider.nextChunk() you will obtain the first chunk and
fresh data from db. |
void |
search(int index,
java.lang.Object key)
Execute the search. |
void |
search(java.lang.String condition,
java.lang.Object key)
Execute search. |
void |
setChunkSize(int chunkSize)
Size of chunk returned by nextChunk(). |
void |
setConditions(java.lang.String[] conditions)
List of codition in SQL format. |
void |
setConnectionProvider(IConnectionProvider connectionProvider)
To obtaint JDBC connections. |
void |
setCurrent(int i)
|
void |
setFields(java.lang.String[] fields)
Table fields to include. |
void |
setTable(java.lang.String tabla)
Database table name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDBCTabProvider()
| Method Detail |
|---|
public void search(int index,
java.lang.Object key)
throws FinderException,
java.rmi.RemoteException
ISearch
If there are no object then generate a empty result, but does not
throw a exception.
search in interface ISearchindex - Index of serach to executekey - Key to send to search
FinderException - Any logic problem on search
java.rmi.RemoteException - Any system problem on search
public void search(java.lang.String condition,
java.lang.Object key)
throws FinderException,
java.rmi.RemoteException
ISearch
If there are no object then generate a empty result, but does not
throw a exception.
search in interface ISearchcondition - Condition to use in search.key - Key to send to search
FinderException - Any logic problem on search
java.rmi.RemoteException - Any system problem on searchpublic java.lang.String[] getFields()
public java.lang.String[] getConditions()
The condition can be:
fields
and table.
fields and table.fields and table.
public IConnectionProvider getConnectionProvider()
public java.lang.String getTable()
public int getChunkSize()
nextChunk().
public void invariant()
throws java.lang.IllegalStateException
Invariant:
java.lang.IllegalStateException - If invariant is brokenpublic void setFields(java.lang.String[] fields)
public void setConditions(java.lang.String[] conditions)
The condition can be:
fields
and table.
fields and table.fields and table.
public void setConnectionProvider(IConnectionProvider connectionProvider)
public void setTable(java.lang.String tabla)
public void setChunkSize(int chunkSize)
nextChunk().
public DataChunk nextChunk()
throws java.rmi.RemoteException
ITabProvider
This method can be call from a TableModel to
obtain data on demand.
nextChunk in interface ITabProviderjava.rmi.RemoteExceptionpublic int getCurrent()
public void setCurrent(int i)
public int getResultSize()
throws java.rmi.RemoteException
ITabProvider
getResultSize in interface ITabProviderjava.rmi.RemoteException
public java.lang.Number getSum(java.lang.String column)
throws java.rmi.RemoteException
getSum in interface ITabProviderjava.rmi.RemoteException
public void reset()
throws java.rmi.RemoteException
ITabProviderITabProvider.nextChunk() you will obtain the first chunk and
fresh data from db.
reset in interface ITabProviderjava.rmi.RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||