|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jafer.interfaces.Databean
org.jafer.databeans.DatabeanManager
public class DatabeanManager
This class manages a collection of databases
Field Summary | |
---|---|
private ActiveBean[] |
activeBeans
Stores a reference to an array of active beans forthe current set of databases |
private java.lang.String[] |
allDatabases
Stores a reference to this databeanmanagers complete set of configured databases |
private boolean |
autoPopulateCache
Stores a reference to whether pre filling of the caching is enabled or not. |
private CacheFactory |
cacheFactory
Stores a reference to cache factory that provides the cache for the ActiveBeans data bean to use. |
private java.util.Hashtable |
databeanFactories
Stores a reference to factories that can create databeans for specified databases. |
private java.lang.String |
mode
Stores a reference to search mode. |
private java.lang.String |
name
Stores a reference to the name of this databeanmanager |
private int |
recordCursor
Stores a reference to current record cursor position |
private java.lang.String |
recordSchema
Stores a reference to record schema that should be applied when retrieving records |
private int |
totalRecords
Stores a reference to the total number of records retrieved |
Constructor Summary | |
---|---|
DatabeanManager()
|
Method Summary | |
---|---|
boolean |
autoPopulateCache()
Returns whether the active beans should prepopulate cache after search |
protected void |
finalize()
|
java.lang.String[] |
getAllDatabases()
Get the databeanManagers set of all databases it processes |
CacheFactory |
getCacheFactory()
Returns the cache factory used by this databeanManager |
java.lang.String |
getCurrentDatabase()
Get database of current record |
Field |
getCurrentRecord()
Get current record |
java.lang.String[] |
getDatabases()
Get databases currently searched |
java.util.Map |
getDatabeanFactories()
Returns a map of the supported databean factories |
java.lang.String |
getElementSpec()
Currently Not Supported |
java.lang.String |
getMode()
get the mode that the DatabeanManager is running in |
java.lang.String |
getName()
get the name of the DataBeanManager |
int |
getNumberOfResults()
Get number of results for last query |
int |
getNumberOfResults(java.lang.String databaseName)
Get number of results from the named database for last query |
java.lang.Object |
getQuery()
Currently Not Supported |
int |
getRecordCursor()
Get the current record position cursor |
java.lang.String |
getRecordSchema()
Get currently set record schema |
java.lang.String |
getResultSetName()
Currently Not Supported |
JaferException |
getSearchException(java.lang.String database)
If a search fails this method will return the JaferException for the specified database |
JaferException[] |
getSearchException(java.lang.String[] databases)
If a search fails this method will return the JaferException for the specified databases |
boolean |
isCheckRecordFormat()
Currently Not Supported |
boolean |
isParseQuery()
Currently Not Supported |
void |
saveQuery(java.lang.String file)
Currently Not Supported |
void |
setAllDatabases(java.lang.String[] allDatabases)
Set the databeanManagers set of all databases it processes. |
void |
setAutoPopulateCache(boolean autoPopulate)
Sets whether the active beans should prepopulate cache after search |
void |
setCacheFactory(CacheFactory cacheFactory)
Sets the cache factory to be used by the DatabeanManager |
void |
setCheckRecordFormat(boolean checkRecordFormat)
Currently Not Supported |
void |
setDatabases(java.lang.String database)
Set database to search |
void |
setDatabases(java.lang.String[] databases)
Set databases to search |
void |
setDatabeanFactories(java.util.Hashtable databeanFactories)
Set the databean factories that this databeanmanager supports |
void |
setElementSpec(java.lang.String elementSpec)
Currently Not Supported |
void |
setMode(java.lang.String mode)
Set the mode that this databeanManager runs in |
void |
setName(java.lang.String name)
Set the name of this DataBeanManager |
void |
setParseQuery(boolean parseQuery)
Currently Not Supported |
void |
setRecordCursor(int recordCursor)
Set the current record cursor |
void |
setRecordSchema(java.lang.String recordSchema)
Set current prefered record schema |
void |
setResultSetName(java.lang.String resultSetName)
Currently Not Supported |
void |
stopAutoPopulateCache()
This method stops any auto caching that may being performed by the databean manager in seperate threads to prempt and speed up retrieval. |
int |
submitQuery(java.lang.Object query)
Send query (can be in XML form) |
Methods inherited from class org.jafer.interfaces.Databean |
---|
getCacheSupport, getPresentSupport, getScanSupport, getSearchSupport |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Hashtable databeanFactories
private CacheFactory cacheFactory
private boolean autoPopulateCache
private ActiveBean[] activeBeans
private int recordCursor
private java.lang.String recordSchema
private java.lang.String mode
private int totalRecords
private java.lang.String name
private java.lang.String[] allDatabases
Constructor Detail |
---|
public DatabeanManager()
Method Detail |
---|
public void setDatabeanFactories(java.util.Hashtable databeanFactories)
databeanFactories
- A map where key = database name and value =
factory that creates a databean supporting Search and Present for
the specified databasepublic java.util.Map getDatabeanFactories()
public void setRecordCursor(int recordCursor) throws JaferException
Present
setRecordCursor
in interface Present
recordCursor
- Record position (starting at 1)
JaferException
public int getRecordCursor()
Present
getRecordCursor
in interface Present
public void setRecordSchema(java.lang.String recordSchema)
Present
setRecordSchema
in interface Present
recordSchema
- record schemapublic java.lang.String getRecordSchema()
Present
getRecordSchema
in interface Present
public boolean autoPopulateCache()
public void setAutoPopulateCache(boolean autoPopulate)
autoPopulate
- true if the cache should be auto populatedpublic void setDatabases(java.lang.String database)
Search
setDatabases
in interface Search
database
- databasepublic void setDatabases(java.lang.String[] databases)
Search
setDatabases
in interface Search
databases
- databasespublic java.lang.String[] getDatabases()
Search
getDatabases
in interface Search
public int submitQuery(java.lang.Object query) throws JaferException
Search
submitQuery
in interface Search
JaferException
public int getNumberOfResults()
Search
getNumberOfResults
in interface Search
public int getNumberOfResults(java.lang.String databaseName)
Search
getNumberOfResults
in interface Search
public Field getCurrentRecord() throws JaferException
Present
getCurrentRecord
in interface Present
JaferException
public java.lang.String getCurrentDatabase() throws JaferException
Present
getCurrentDatabase
in interface Present
JaferException
public void setCheckRecordFormat(boolean checkRecordFormat)
setCheckRecordFormat
in interface Present
checkRecordFormat
- setting of record schema checkingPresent.setCheckRecordFormat(boolean)
public boolean isCheckRecordFormat()
isCheckRecordFormat
in interface Present
Present.isCheckRecordFormat()
public void setElementSpec(java.lang.String elementSpec)
setElementSpec
in interface Present
elementSpec
- element specificationPresent.setElementSpec(java.lang.String)
public java.lang.String getElementSpec()
getElementSpec
in interface Present
Present.getElementSpec()
public void setResultSetName(java.lang.String resultSetName)
setResultSetName
in interface Search
Search.setResultSetName(java.lang.String)
public java.lang.String getResultSetName()
getResultSetName
in interface Search
Search.getResultSetName()
public void setParseQuery(boolean parseQuery)
setParseQuery
in interface Search
Search.setParseQuery(boolean)
public boolean isParseQuery()
isParseQuery
in interface Search
Search.isParseQuery()
public void saveQuery(java.lang.String file) throws JaferException
saveQuery
in interface Search
JaferException
Search.saveQuery(java.lang.String)
public java.lang.Object getQuery()
getQuery
in interface Search
Search.getQuery()
public void setMode(java.lang.String mode)
mode
- The mode to set use statics in DatabeanManagerFactorypublic java.lang.String getMode()
public void setName(java.lang.String name)
name
- The name of the databean managerpublic java.lang.String getName()
public void setAllDatabases(java.lang.String[] allDatabases)
allDatabases
- the array of database namespublic java.lang.String[] getAllDatabases()
public void setCacheFactory(CacheFactory cacheFactory)
cacheFactory
- the cache factory to usepublic CacheFactory getCacheFactory()
public JaferException getSearchException(java.lang.String database)
Search
getSearchException
in interface Search
database
- The name of the database to check
public JaferException[] getSearchException(java.lang.String[] databases)
Search
getSearchException
in interface Search
databases
- The databases to search
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void stopAutoPopulateCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |