org.openxava.tab.impl
Class TabProviderBase

java.lang.Object
  extended by org.openxava.tab.impl.TabProviderBase
All Implemented Interfaces:
java.io.Serializable, IDataReader, ISearch, ITabProvider
Direct Known Subclasses:
JDBCTabProvider, JPATabProvider

public abstract class TabProviderBase
extends java.lang.Object
implements ITabProvider, java.io.Serializable

Author:
Javier Paniza
See Also:
Serialized Form

Constructor Summary
TabProviderBase()
           
 
Method Summary
protected abstract  java.lang.Number executeNumberSelect(java.lang.String select, java.lang.String errorId)
           
 int getChunkSize()
          Size of chunk returned by IDataReader.nextChunk().
 int getCurrent()
           
protected  java.util.Collection getEntityReferencesMappings()
           
protected  java.util.Map getEntityReferencesReferenceNames()
           
protected  java.lang.Object[] getKey()
           
protected  MetaModel getMetaModel()
           
protected  MetaTab getMetaTab()
           
 int getResultSize()
          Record (or object, or row) count of last consult.
protected  java.lang.String getSelect()
           
 java.lang.Number getSum(java.lang.String property)
           
protected  boolean hasReferences()
           
protected  boolean isEOF()
           
protected  boolean keyHasNulls()
           
 void reset()
          If you call this method the next time that you call IDataReader.nextChunk() you will obtain the first chunk and fresh data from db.
protected  void resetEntityReferencesMappings()
           
 void search(java.lang.String condition, java.lang.Object key)
          Execute search.
 void setChunkSize(int chunkSize)
          Size of chunk returned by IDataReader.nextChunk().
 void setCurrent(int i)
           
protected  void setEOF(boolean eof)
           
 void setMetaTab(MetaTab metaTab)
           
protected abstract  java.lang.String translateCondition(java.lang.String condition)
           
protected abstract  java.lang.String translateProperty(java.lang.String property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openxava.tab.impl.ITabProvider
getConverters, getSelectBase, toQueryField, usesConverters
 
Methods inherited from interface org.openxava.tab.impl.IDataReader
nextChunk
 

Constructor Detail

TabProviderBase

public TabProviderBase()
Method Detail

translateProperty

protected abstract java.lang.String translateProperty(java.lang.String property)

translateCondition

protected abstract java.lang.String translateCondition(java.lang.String condition)

executeNumberSelect

protected abstract java.lang.Number executeNumberSelect(java.lang.String select,
                                                        java.lang.String errorId)

setMetaTab

public void setMetaTab(MetaTab metaTab)
Specified by:
setMetaTab in interface ITabProvider

getMetaModel

protected MetaModel getMetaModel()

getMetaTab

protected MetaTab getMetaTab()

search

public void search(java.lang.String condition,
                   java.lang.Object key)
            throws FinderException,
                   java.rmi.RemoteException
Description copied from interface: ISearch
Execute search.

If there are no object then generate a empty result, but does not throw a exception.

Specified by:
search in interface ISearch
Parameters:
condition - Condition to use in search.
key - Key to send to search
Throws:
FinderException - Any logic problem on search
java.rmi.RemoteException - Any system problem on search

getChunkSize

public int getChunkSize()
Size of chunk returned by IDataReader.nextChunk().


setChunkSize

public void setChunkSize(int chunkSize)
Size of chunk returned by IDataReader.nextChunk().

Specified by:
setChunkSize in interface ITabProvider

keyHasNulls

protected boolean keyHasNulls()

getKey

protected java.lang.Object[] getKey()

getCurrent

public int getCurrent()

setCurrent

public void setCurrent(int i)
Specified by:
setCurrent in interface ITabProvider

getResultSize

public int getResultSize()
                  throws java.rmi.RemoteException
Description copied from interface: IDataReader
Record (or object, or row) count of last consult.

Specified by:
getResultSize in interface IDataReader
Throws:
java.rmi.RemoteException

getSum

public java.lang.Number getSum(java.lang.String property)
Specified by:
getSum in interface ITabProvider

reset

public void reset()
           throws java.rmi.RemoteException
Description copied from interface: IDataReader
If you call this method the next time that you call IDataReader.nextChunk() you will obtain the first chunk and fresh data from db.

Specified by:
reset in interface IDataReader
Throws:
java.rmi.RemoteException

getSelect

protected java.lang.String getSelect()

isEOF

protected boolean isEOF()

setEOF

protected void setEOF(boolean eof)

resetEntityReferencesMappings

protected void resetEntityReferencesMappings()

hasReferences

protected boolean hasReferences()
                         throws XavaException
Throws:
XavaException

getEntityReferencesReferenceNames

protected java.util.Map getEntityReferencesReferenceNames()

getEntityReferencesMappings

protected java.util.Collection getEntityReferencesMappings()
                                                    throws XavaException
Throws:
XavaException