com.partnersoft.data
Class DataRecordSource
java.lang.Object
com.partnersoft.data.DataRecordSource
- All Implemented Interfaces:
- Coggable, java.lang.Iterable<Naming<java.lang.Object>>
- Direct Known Subclasses:
- StreamingDataRecordSource
public abstract class DataRecordSource
- extends java.lang.Object
- implements Coggable, java.lang.Iterable<Naming<java.lang.Object>>
A source for data records, represented as an iteration of Namings. Usually
the data is tabular; each record has the same keys. However, the addition of
optional transforms can muddy this a bit.
Here is an example of use:
DataSourceMap source = new DataSourceMapSubclass();
Iterator it = source.iterator();
while (it.hasNext()) {
Naming current = (Naming) it.next();
log.info("field value = " + current.getValue("field"));
}
- Author:
- Paul Reavis Copyright 2003 Partner Software, Inc.
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
verbose
protected boolean verbose
showProgress
protected boolean showProgress
DataRecordSource
public DataRecordSource()
DataRecordSource
public DataRecordSource(Cog newState)
iterator
public java.util.Iterator<Naming<java.lang.Object>> iterator()
- Specified by:
iterator in interface java.lang.Iterable<Naming<java.lang.Object>>
createFetcher
protected abstract DataRecordFetcher createFetcher()
- Creates a new fetcher to gather data for a new iteration.
getTransforms
public java.util.List getTransforms()
setTransforms
public void setTransforms(java.util.List newTransforms)
getBeforeActions
public java.util.List getBeforeActions()
setBeforeActions
public void setBeforeActions(java.util.List newBeforeActions)
getAfterActions
public java.util.List getAfterActions()
setAfterActions
public void setAfterActions(java.util.List newAfterActions)
copyStateFrom
protected void copyStateFrom(java.lang.Object nother)
clone
public java.lang.Object clone()
- Overrides:
clone in class java.lang.Object
isVerbose
public boolean isVerbose()
setVerbose
public void setVerbose(boolean tizit)
getShowProgress
public boolean getShowProgress()
setShowProgress
public void setShowProgress(boolean tizit)
close
public void close()
toCog
public Cog toCog()
- Description copied from interface:
Coggable
- Returns the complete internal state of this object in the form of a
Cog.
- Specified by:
toCog in interface Coggable
- Returns:
- Cog representing the internal state of this object