|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.cofax.DataStore | +--org.cofax.SqlDataStore
Provides SQL database connectivity for Cofax.
A subclass of DataStore
. SqlDataStore
uses an SQL compatible database as the data store for Cofax.
SqlDataStore itself is flexible since it is not tied to a given table
or field naming structure other then it's packageTag lookup table.
tblPackageTags must contain the fields tag_name and tag_value for
packageTag lookups. To add a new packageTag to the system simply add a
row to this table.
There should be no mention of the SqlDataStore
in any client code.
Field Summary | |
static java.util.HashMap |
clobColumns
Hashmap into a determination of if stored procedures contain clobs is placed to speed transactions. |
static java.util.HashMap |
dbPackageTags
Hashmap into which package tags may be placed into memory upon initialization. |
static java.util.HashMap |
dbPackageTagsCache
Hashmap into which package tag results are cached. |
static java.util.HashMap |
dbPackageTagsCacheCommand
Hashmap into which the cache results parameter (1,0) is thrown upon initialization. |
Fields inherited from class org.cofax.DataStore |
CLOB_COLUMNS, dataLog, dataLogLocation, dataLogMaxSize, PACKAGE_TAG_CACHE, PACKAGE_TAG_CACHE_COMMAND, PACKAGE_TAG_PROCESSED, PACKAGE_TAG_RESULTS |
Constructor Summary | |
SqlDataStore()
Initializes variables. |
Method Summary | |
static java.util.HashMap |
checkInstance(java.lang.String tag,
java.lang.String key)
|
void |
clearCache(int whichCache)
Clears the cache indicated with whichCache |
boolean |
connect(java.lang.String dbPool)
Connects to the database using a connection established in the database poo |
boolean |
connectFromPool()
Connects to the database using a connection established in the database poo |
void |
destroy()
To be ran once after using the data store. |
boolean |
disConnect(java.lang.String dataStoreName)
Free's a connection from the database pool. |
static java.lang.String |
fillToolsTag(java.util.HashMap ht,
java.lang.String tag)
Populates A SQL String with query values from a HashMap when String is formatted as: select req:value from etc. |
java.lang.Object |
getCacheValue(java.lang.Object key,
int whichCache)
Gets a single value from a cache object |
java.util.List |
getPackageData(java.util.HashMap data,
java.lang.String tagName,
java.lang.String tagData,
boolean init)
Returns a set of content by tag for stored procedures, inserts, updates, or selects. |
java.util.List |
getPackageData(java.lang.String tag,
java.lang.String tagStatement)
Returns a set of content by tag. |
java.lang.String |
getPackageTag(java.lang.String tag,
java.util.HashMap params)
Gets the sql string that is used for the packageTag request and parses it with it's parameters. |
void |
init(java.util.Properties dbProps)
To be ran once before using the data store. |
void |
init(java.lang.String configFile)
Initializes the connection pool. |
void |
initPool()
To be ran once before using the data store. |
boolean |
insertArticle(java.util.HashMap article,
java.lang.String approvedBy,
java.lang.String xmlFileType,
java.util.ArrayList mappings,
java.util.ArrayList relatedLinks)
Purpose: The main insertArticle routine. |
void |
setCache(java.lang.Object cache,
int whichCache)
Set's this data store's cache object and caches all package tags. |
Methods inherited from class org.cofax.DataStore |
getError, getLastError, setError, setLastError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.HashMap clobColumns
public static java.util.HashMap dbPackageTagsCacheCommand
public static java.util.HashMap dbPackageTags
public static java.util.HashMap dbPackageTagsCache
Constructor Detail |
public SqlDataStore()
Method Detail |
public void init(java.lang.String configFile)
init
in class DataStore
public void init(java.util.Properties dbProps)
init
in class DataStore
public void setCache(java.lang.Object cache, int whichCache)
setCache
in class DataStore
public void clearCache(int whichCache)
DataStore
clearCache
in class DataStore
public java.lang.Object getCacheValue(java.lang.Object key, int whichCache)
DataStore
getCacheValue
in class DataStore
public final boolean connect(java.lang.String dbPool)
connect
in class DataStore
public void initPool()
DataStore
initPool
in class DataStore
public final boolean connectFromPool()
connectFromPool
in class DataStore
public final java.lang.String getPackageTag(java.lang.String tag, java.util.HashMap params)
getPackageTag
in class DataStore
org.cofax.DataStore
tag
- The tag name. The Data Store must have a lookup
table of names and definitions.
the command.public final java.util.List getPackageData(java.lang.String tag, java.lang.String tagStatement)
getPackageData
in class DataStore
public final java.util.List getPackageData(java.util.HashMap data, java.lang.String tagName, java.lang.String tagData, boolean init)
getPackageData
in class DataStore
public final boolean disConnect(java.lang.String dataStoreName)
disConnect
in class DataStore
public void destroy()
DataStore
destroy
in class DataStore
public final boolean insertArticle(java.util.HashMap article, java.lang.String approvedBy, java.lang.String xmlFileType, java.util.ArrayList mappings, java.util.ArrayList relatedLinks)
insertArticle
in class DataStore
public static java.lang.String fillToolsTag(java.util.HashMap ht, java.lang.String tag)
public static java.util.HashMap checkInstance(java.lang.String tag, java.lang.String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |