|
|||||||||
| 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.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 |
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 |
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 |
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 DataSetpublic 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 DataSetcolumn - -
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 DataSetcolumn - -
Name of the columnsdf - -
SimpleDateFormat of the date
java.text.ParseExceptionSimpleDateFormatpublic double getDouble(java.lang.String column)
DataSet
getDouble in interface DataSetcolumn - -
Name of the column
public java.lang.Object getObject(java.lang.String column,
java.lang.Class classToConvertTo)
DataSet
getObject in interface DataSetcolumn - Name of the columnclassToConvertTo - Class type to convert to
public int getErrorCount()
DataSet
getErrorCount in interface DataSetpublic java.util.List getErrors()
DataSet
getErrors in interface DataSetpublic int getIndex()
DataSet
getIndex in interface DataSetpublic int getInt(java.lang.String column)
DataSet
getInt in interface DataSetcolumn - -
Name of the column
public int getRowCount()
DataSet
getRowCount in interface DataSetpublic int getRowNo()
DataSet
getRowNo in interface DataSetpublic java.lang.String getString(java.lang.String column)
DataSet
getString in interface DataSetcolumn - -
Name of the column
public void setValue(java.lang.String column,
java.lang.String value)
DataSet
setValue in interface DataSetcolumn - Column name to set the value forvalue - Value to change the column topublic void goBottom()
DataSet
goBottom in interface DataSetpublic void goTop()
DataSet
goTop in interface DataSetpublic boolean isAnError(int lineNo)
DataSet
isAnError in interface DataSetlineNo - -
int line number
public boolean next()
DataSet
next in interface DataSet
public void orderRows(OrderBy ob)
throws java.lang.Exception
DataSet
orderRows in interface DataSetob - -
OrderBy object
java.lang.ExceptionOrderBy,
OrderColumnpublic boolean previous()
DataSet
previous in interface DataSetpublic void setLowerCase()
setLowerCase in interface DataSetpublic void setUpperCase()
setUpperCase in interface DataSetpublic boolean isRecordID(java.lang.String recordID)
isRecordID in interface DataSetrecordID -
public void absolute(int localPointer)
absolute in interface DataSetlocalPointer - -
int
java.lang.IndexOutOfBoundsExceptionpublic void setStrictNumericParse(boolean strictNumericParse)
setStrictNumericParse in interface DataSetstrictNumericParse - The strictNumericParse to set.public void remove()
DataSet
remove in interface DataSetpublic void setPZConvertProps(java.util.Properties props)
DataSet
setPZConvertProps in interface DataSetprops - Property mapping for String to Object conversionprotected void setPointer(int pointer)
pointer - the pointer to setpublic void clearRows()
DataSet
clearRows in interface DataSetpublic void clearAll()
DataSet
clearAll in interface DataSetpublic void clearErrors()
DataSet
clearErrors in interface DataSetpublic MetaData getMetaData()
public void setMetaData(MetaData metaData)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean contains(java.lang.String column)
DataSet
contains in interface DataSetcolumn - Column name to check for
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||