public class DataStore
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
INSERT
Constant indicating the row was inserted
|
static int |
UPDATE
Constant indicating the row was updated
|
| Constructor and Description |
|---|
DataStore(DataSet dataSet)
Constructs a new DataStore, wrapping the provided DataSet.
|
DataStore(JsonObject jso)
Constructs a new DataStore that was previously serialized with .toJsonObject()
|
DataStore(JsonObject jso,
com.labvantage.sapphire.services.ConnectionInfo connectionInfo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addColumn(java.lang.String columnid,
int type)
See documentation for the DataSet class for details of this method.
|
int |
addRow()
Adds a new row to the end of the dataset.
|
int |
addRow(int newrow)
Adds a new row as a specified position in the dataset.
|
static java.lang.String |
convertDateToUserFormat(java.lang.String dateVal,
M18NUtil userM18NUtil,
boolean isTimeZoneIndependent,
boolean isDateOnly) |
void |
deleteRow(int row)
Deletes the specified row from the wrapped dataset.
|
int |
findRow(java.util.HashMap findmap)
See documentation for the DataSet class for details of this method.
|
int |
findRow(java.util.HashMap findmap,
int start)
See documentation for the DataSet class for details of this method.
|
int |
findRow(java.lang.String columnId,
java.lang.String value)
See documentation for the DataSet class for details of this method.
|
java.math.BigDecimal |
getBigDecimal(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
java.math.BigDecimal |
getBigDecimal(int row,
java.lang.String columnid,
java.math.BigDecimal defaultvalue)
See documentation for the DataSet class for details of this method.
|
java.util.Calendar |
getCalendar(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
java.util.Calendar |
getCalendar(int row,
java.lang.String columnid,
java.util.Calendar defaultvalue)
See documentation for the DataSet class for details of this method.
|
int |
getColumnCount()
See documentation for the DataSet class for details of this method.
|
java.lang.String[] |
getColumns()
See documentation for the DataSet class for details of this method.
|
int |
getColumnType(java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
java.lang.String |
getColumnValues(java.lang.String columnid,
int startrow,
int endrow,
java.lang.String delimeter)
See documentation for the DataSet class for details of this method.
|
DataSet |
getDataSet()
Returns the wrapped dataset
Note: This returned dataset should only be used for reading data passively.
|
java.text.DateFormat |
getDateDisplayFormat(java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
DataSet |
getDeleteDataSet()
Returns a dataset comprising those rows that were deleted
|
double |
getDouble(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
double |
getDouble(int row,
java.lang.String columnid,
double defaultvalue)
See documentation for the DataSet class for details of this method.
|
JsonArray |
getEncryptedColumns() |
DataSet |
getFilteredDataSet(java.util.HashMap filtermap)
See documentation for the DataSet class for details of this method.
|
DataSet |
getFilteredDataSet(java.util.HashMap filtermap,
boolean exclusive)
See documentation for the DataSet class for details of this method.
|
java.util.ArrayList<DataSet> |
getGroupedDataSets(java.lang.String columnList)
See documentation for the DataSet class for details of this method.
|
DataSet |
getInsertDataSet()
Returns a dataset comprising only those rows that were inserted
|
int |
getInt(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
int |
getInt(int row,
java.lang.String columnid,
int defaultvalue)
See documentation for the DataSet class for details of this method.
|
long |
getLong(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
M18NUtil |
getM18n()
See documentation for the DataSet class for details of this method.
|
java.lang.Object |
getObject(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
int |
getRowCount()
See documentation for the DataSet class for details of this method.
|
java.lang.String |
getString(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
java.lang.String |
getString(int row,
java.lang.String columnid,
java.lang.String defaultvalue)
See documentation for the DataSet class for details of this method.
|
DataSet |
getUnlinkDataSet()
Returns a dataset comprising those rows that were unlinked
|
DataSet |
getUpdateDataSet()
Returns a dataset comprising only those rows that were updated
|
java.lang.String |
getValue(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
java.lang.String |
getValue(int row,
java.lang.String columnid,
java.lang.String nullvalue)
See documentation for the DataSet class for details of this method.
|
boolean |
isNull(int row,
java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
boolean |
isRowInsert(int row)
Returns whether the specified row has been inserted
|
boolean |
isRowUpdate(int row)
Returns whether the specified row has been updated
|
void |
reset() |
void |
setConnectionInfo(com.labvantage.sapphire.services.ConnectionInfo connectionInfo)
See documentation for the DataSet class for details of this method.
|
boolean |
setDate(int row,
java.lang.String columnid,
java.util.Calendar value)
See documentation for the DataSet class for details of this method.
|
boolean |
setDate(int row,
java.lang.String columnid,
long value)
See documentation for the DataSet class for details of this method.
|
boolean |
setDate(int row,
java.lang.String columnid,
java.lang.String value)
See documentation for the DataSet class for details of this method.
|
boolean |
setDate(int row,
java.lang.String columnid,
java.sql.Timestamp value)
See documentation for the DataSet class for details of this method.
|
void |
setEncrypted(java.lang.String columnid) |
void |
setM18NUtil(M18NUtil m18NUtil)
See documentation for the DataSet class for details of this method.
|
boolean |
setNumber(int row,
java.lang.String columnid,
java.math.BigDecimal value)
See documentation for the DataSet class for details of this method.
|
boolean |
setNumber(int row,
java.lang.String columnid,
double value)
See documentation for the DataSet class for details of this method.
|
boolean |
setNumber(int row,
java.lang.String columnid,
int value)
See documentation for the DataSet class for details of this method.
|
boolean |
setNumber(int row,
java.lang.String columnid,
long value)
See documentation for the DataSet class for details of this method.
|
boolean |
setNumber(int row,
java.lang.String columnid,
java.lang.String value)
See documentation for the DataSet class for details of this method.
|
boolean |
setObject(int row,
java.lang.String columnid,
java.lang.Object o)
See documentation for the DataSet class for details of this method.
|
void |
setRowInsert(int row)
Can be used to flag that a row has been Inserted
|
void |
setRowUpdate(int row)
Can be used to flag that a row has been Updated
|
boolean |
setSequence(java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
boolean |
setString(int row,
java.lang.String columnid,
java.lang.String value)
See documentation for the DataSet class for details of this method.
|
void |
setTimeZoneInsensitive(java.lang.String columnid)
See documentation for the DataSet class for details of this method.
|
boolean |
setValue(int row,
java.lang.String columnid,
java.lang.String value)
See documentation for the DataSet class for details of this method.
|
int |
size()
See documentation for the DataSet class for details of this method.
|
void |
sort(java.lang.String sortstring)
See documentation for the DataSet class for details of this method.
|
JsonObject |
toJsonObject()
Serialized the DataStore object
|
JsonObject |
toJsonObject(boolean onlyChanges) |
JsonObject |
toJsonObject(boolean onlyChanges,
boolean optimizedFormat,
boolean includeClobs,
boolean includeUnknows) |
JsonObject |
toJsonObject(boolean onlyChanges,
boolean optimizedFormat,
java.lang.String[] columns,
boolean includeClobs,
boolean includeUnknows) |
void |
unlinkRow(int row)
Unlinks the specified row from the wrapped dataset.
|
public static int INSERT
public static int UPDATE
public DataStore(DataSet dataSet)
public DataStore(JsonObject jso)
public DataStore(JsonObject jso, com.labvantage.sapphire.services.ConnectionInfo connectionInfo)
public static java.lang.String convertDateToUserFormat(java.lang.String dateVal,
M18NUtil userM18NUtil,
boolean isTimeZoneIndependent,
boolean isDateOnly)
throws java.text.ParseException
java.text.ParseExceptionpublic JsonObject toJsonObject() throws SapphireException
SapphireExceptionpublic JsonObject toJsonObject(boolean onlyChanges) throws SapphireException
SapphireExceptionpublic JsonObject toJsonObject(boolean onlyChanges, boolean optimizedFormat, boolean includeClobs, boolean includeUnknows)
public JsonObject toJsonObject(boolean onlyChanges, boolean optimizedFormat, java.lang.String[] columns, boolean includeClobs, boolean includeUnknows)
public void setRowInsert(int row)
public void setRowUpdate(int row)
public boolean isRowInsert(int row)
public boolean isRowUpdate(int row)
public DataSet getDataSet()
public DataSet getInsertDataSet()
public DataSet getUpdateDataSet()
public DataSet getDeleteDataSet()
public void deleteRow(int row)
public DataSet getUnlinkDataSet()
public void unlinkRow(int row)
public int addRow()
public int addRow(int newrow)
public int getRowCount()
public int size()
public boolean addColumn(java.lang.String columnid,
int type)
public int getColumnCount()
public java.lang.String[] getColumns()
public int getColumnType(java.lang.String columnid)
public java.lang.String getColumnValues(java.lang.String columnid,
int startrow,
int endrow,
java.lang.String delimeter)
public boolean setObject(int row,
java.lang.String columnid,
java.lang.Object o)
public boolean setString(int row,
java.lang.String columnid,
java.lang.String value)
public boolean setNumber(int row,
java.lang.String columnid,
int value)
public boolean setNumber(int row,
java.lang.String columnid,
long value)
public boolean setNumber(int row,
java.lang.String columnid,
double value)
public boolean setNumber(int row,
java.lang.String columnid,
java.math.BigDecimal value)
public boolean setNumber(int row,
java.lang.String columnid,
java.lang.String value)
public boolean setDate(int row,
java.lang.String columnid,
long value)
public boolean setDate(int row,
java.lang.String columnid,
java.lang.String value)
public boolean setDate(int row,
java.lang.String columnid,
java.util.Calendar value)
public boolean setDate(int row,
java.lang.String columnid,
java.sql.Timestamp value)
public boolean setValue(int row,
java.lang.String columnid,
java.lang.String value)
public java.text.DateFormat getDateDisplayFormat(java.lang.String columnid)
public void setTimeZoneInsensitive(java.lang.String columnid)
public void setM18NUtil(M18NUtil m18NUtil)
public M18NUtil getM18n()
public void setConnectionInfo(com.labvantage.sapphire.services.ConnectionInfo connectionInfo)
public boolean setSequence(java.lang.String columnid)
public java.lang.String getString(int row,
java.lang.String columnid)
public java.lang.String getString(int row,
java.lang.String columnid,
java.lang.String defaultvalue)
public java.math.BigDecimal getBigDecimal(int row,
java.lang.String columnid)
public java.math.BigDecimal getBigDecimal(int row,
java.lang.String columnid,
java.math.BigDecimal defaultvalue)
public double getDouble(int row,
java.lang.String columnid)
public double getDouble(int row,
java.lang.String columnid,
double defaultvalue)
public int getInt(int row,
java.lang.String columnid)
public int getInt(int row,
java.lang.String columnid,
int defaultvalue)
public long getLong(int row,
java.lang.String columnid)
public java.util.Calendar getCalendar(int row,
java.lang.String columnid)
public java.util.Calendar getCalendar(int row,
java.lang.String columnid,
java.util.Calendar defaultvalue)
public java.lang.Object getObject(int row,
java.lang.String columnid)
public java.lang.String getValue(int row,
java.lang.String columnid)
public java.lang.String getValue(int row,
java.lang.String columnid,
java.lang.String nullvalue)
public boolean isNull(int row,
java.lang.String columnid)
public void sort(java.lang.String sortstring)
public DataSet getFilteredDataSet(java.util.HashMap filtermap)
public DataSet getFilteredDataSet(java.util.HashMap filtermap, boolean exclusive)
public java.util.ArrayList<DataSet> getGroupedDataSets(java.lang.String columnList)
public int findRow(java.util.HashMap findmap,
int start)
public int findRow(java.util.HashMap findmap)
public int findRow(java.lang.String columnId,
java.lang.String value)
public void setEncrypted(java.lang.String columnid)
public JsonArray getEncryptedColumns()
public void reset()