com.docmosis.template.population
Class SQLDataProvider
java.lang.Object
com.docmosis.template.population.MemoryDataProvider
com.docmosis.template.population.SQLDataProvider
- All Implemented Interfaces:
- Cleanable, DataProvider, MutableDataProvider, Serializable
- public class SQLDataProvider
- extends MemoryDataProvider
Currently the SQL Data Provider doesn't support Image Data
being provided by the database.
- See Also:
- Serialized Form
| Methods inherited from class com.docmosis.template.population.MemoryDataProvider |
addDataProvider, cleanup, finalize, getBoolean, getDataProvider, getDataProviderCount, getImage, getRealKey, hasBooleanKey, hasDataProviderKey, hasImageKey, setBoolean, setFalse, setImage, setImage, setString, setTrue, toDebugString |
SQLDataProvider
public SQLDataProvider()
setDataItem
public void setDataItem(String key,
SQLDataItem value)
- Sets the given value for the given key.
NOTE: nesting of keys is not supported for set methods. See class
description for more information.
- Parameters:
key - the key to look for.value - the value to set.
- Throws:
IllegalArgumentException - if the value not a String.
getDataItem
public SQLDataItem getDataItem(String key)
hasDataItem
public boolean hasDataItem(String key)
getString
public String getString(String key)
- Get the value for the given string key. Since this
class is both a MemoryDataProvider and an SQLDataProvider
it can have data plugged in as either Strings or as SQLDataItems.
When retrieving, we check to see if we have the item in the SQL
results before checking in the memory results.
- Specified by:
getString in interface DataProvider- Overrides:
getString in class MemoryDataProvider
- Parameters:
key - the key to find the value.
- Returns:
- a string value.
hasStringKey
public boolean hasStringKey(String key)
- Determine if this dataprovider has a value for the key.
- Specified by:
hasStringKey in interface DataProvider- Overrides:
hasStringKey in class MemoryDataProvider
toString
public String toString()
- Overrides:
toString in class MemoryDataProvider
toDebugString
public String toDebugString(int level)
- Overrides:
toDebugString in class MemoryDataProvider
Copyright © 2007 Docmosis. All Rights Reserved.