|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.flatpack.DefaultDataSet
public class DefaultDataSet
Constructor Summary | |
---|---|
DefaultDataSet(MetaData pzMetaData,
Parser pzparser)
|
Method Summary | |
---|---|
void |
absolute(int localPointer)
Sets the absolute position of the record pointer |
void |
addError(DataError dataError)
|
void |
addRow(Row row)
|
void |
clearAll()
Clears both the errors and rows from memory |
void |
clearErrors()
Clears out the parse errors from memory |
void |
clearRows()
Clears out the rows in memory from the last parse. |
boolean |
contains(java.lang.String column)
Does this DataSet contain a column with the given name? |
java.math.BigDecimal |
getBigDecimal(java.lang.String column)
Returns the BigDecimal value of a specified column |
java.lang.String[] |
getColumns()
Returns a String array of column names in the DataSet. |
java.lang.String[] |
getColumns(java.lang.String recordID)
Returns a String array of column names in the DataSet for a given |
java.util.Date |
getDate(java.lang.String column)
Returns the date value of a specified column. |
java.util.Date |
getDate(java.lang.String column,
java.text.SimpleDateFormat sdf)
Returns the date value of a specified column. |
double |
getDouble(java.lang.String column)
Returns the double value of a specified column |
int |
getErrorCount()
Returns total number of records which contained a parse error in the file. |
java.util.List |
getErrors()
Returns A Collection Of DataErrors that happened during processing |
int |
getIndex()
Returns the index the pointer is on for the array |
int |
getInt(java.lang.String column)
Returns the interger value of a specified column |
long |
getLong(java.lang.String column)
Returns the long value of a specified column |
MetaData |
getMetaData()
|
java.lang.Object |
getObject(java.lang.String column,
java.lang.Class classToConvertTo)
Returns the value of the column with the type of object specified |
java.lang.String |
getRawData()
|
int |
getRowCount()
Returns the total number of rows parsed in from the file |
int |
getRowNo()
Returns the line number the pointer is on. |
java.lang.String |
getString(java.lang.String column)
Returns the string value of a specified column |
void |
goBottom()
Goes to the last record in the dataset |
void |
goTop()
Goes to the top of the data set. |
boolean |
isAnError(int lineNo)
Returns true or false as to whether or not the line number contains an error. |
boolean |
isRecordID(java.lang.String recordID)
Checks to see if the row has the given |
boolean |
isRowEmpty()
Checks to see if there was no data on the row which was parsed. |
boolean |
next()
Moves to the next record in the set. |
void |
orderRows(OrderBy ob)
Orders the data by column(s) specified. |
boolean |
previous()
Moves back to the previous record in the set return true if move was a success, false if not |
void |
remove()
Removes a row from the dataset. |
void |
setLowerCase()
Sets data in the DataSet to lowercase |
void |
setMetaData(MetaData metaData)
|
protected void |
setPointer(int pointer)
|
void |
setPZConvertProps(java.util.Properties props)
Sets the properties from the pzconvert.properties file. |
void |
setStrictNumericParse(boolean strictNumericParse)
Setting this to True will parse text as is and throw a NumberFormatException. |
void |
setUpperCase()
Sets data in the DataSet to uppercase |
void |
setValue(java.lang.String column,
java.lang.String value)
Changes the value of the given column only for the given row which the pointer is currently sitting on. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultDataSet(MetaData pzMetaData, Parser pzparser)
Method Detail |
---|
public void addRow(Row row)
public void addError(DataError dataError)
public java.lang.String[] getColumns()
DataSet
getColumns
in interface DataSet
public java.lang.String[] getColumns(java.lang.String recordID)
DataSet
getColumns
in interface DataSet
public java.util.Date getDate(java.lang.String column) throws java.text.ParseException
DataSet
getDate
in interface DataSet
column
- -
Name of the column
java.text.ParseException
public java.util.Date getDate(java.lang.String column, java.text.SimpleDateFormat sdf) throws java.text.ParseException
DataSet
getDate
in interface DataSet
column
- -
Name of the columnsdf
- -
SimpleDateFormat of the date
java.text.ParseException
SimpleDateFormat
public double getDouble(java.lang.String column)
DataSet
getDouble
in interface DataSet
column
- -
Name of the column
public java.math.BigDecimal getBigDecimal(java.lang.String column)
DataSet
getBigDecimal
in interface DataSet
column
- -
Name of the column
public java.lang.Object getObject(java.lang.String column, java.lang.Class classToConvertTo)
DataSet
getObject
in interface DataSet
column
- Name of the columnclassToConvertTo
- Class type to convert to
public int getErrorCount()
DataSet
getErrorCount
in interface DataSet
public java.util.List getErrors()
DataSet
getErrors
in interface DataSet
public int getIndex()
DataSet
getIndex
in interface DataSet
public int getInt(java.lang.String column)
DataSet
getInt
in interface DataSet
column
- -
Name of the column
public long getLong(java.lang.String column)
DataSet
getLong
in interface DataSet
column
- -
Name of the column
public int getRowCount()
DataSet
getRowCount
in interface DataSet
public int getRowNo()
DataSet
getRowNo
in interface DataSet
public java.lang.String getString(java.lang.String column)
DataSet
getString
in interface DataSet
column
- -
Name of the column
public void setValue(java.lang.String column, java.lang.String value)
DataSet
setValue
in interface DataSet
column
- Column name to set the value forvalue
- Value to change the column topublic void goBottom()
DataSet
goBottom
in interface DataSet
public void goTop()
DataSet
goTop
in interface DataSet
public boolean isAnError(int lineNo)
DataSet
isAnError
in interface DataSet
lineNo
- -
int line number
public boolean next()
DataSet
next
in interface DataSet
public void orderRows(OrderBy ob)
DataSet
orderRows
in interface DataSet
ob
- -
OrderBy objectOrderBy
,
OrderColumn
public boolean previous()
DataSet
previous
in interface DataSet
public void setLowerCase()
setLowerCase
in interface DataSet
public void setUpperCase()
setUpperCase
in interface DataSet
public boolean isRecordID(java.lang.String recordID)
isRecordID
in interface DataSet
recordID
-
public void absolute(int localPointer)
absolute
in interface DataSet
localPointer
- -
int
java.lang.IndexOutOfBoundsException
public void setStrictNumericParse(boolean strictNumericParse)
setStrictNumericParse
in interface DataSet
strictNumericParse
- The strictNumericParse to set.public void remove()
DataSet
remove
in interface DataSet
public void setPZConvertProps(java.util.Properties props)
DataSet
setPZConvertProps
in interface DataSet
props
- Property mapping for String to Object conversionprotected void setPointer(int pointer)
pointer
- the pointer to setpublic void clearRows()
DataSet
clearRows
in interface DataSet
public void clearAll()
DataSet
clearAll
in interface DataSet
public void clearErrors()
DataSet
clearErrors
in interface DataSet
public MetaData getMetaData()
public void setMetaData(MetaData metaData)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean contains(java.lang.String column)
DataSet
contains
in interface DataSet
column
- Column name to check for
public boolean isRowEmpty()
DataSet
isRowEmpty
in interface DataSet
FPInvalidUsageException
- Parser.isFlagEmptyRows() must be set to true before using this
FPException
- if cursor is on an invalid rowpublic java.lang.String getRawData()
getRawData
in interface DataSet
FPInvalidUsageException
FPException
- if cursor is on an invalid row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |