| Modifier and Type | Class and Description |
|---|---|
static class |
DataStore.StorageType |
| Modifier and Type | Field and Description |
|---|---|
String |
valueSeparator
This separator should be used when submitting values in the addData methods
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addData(Table table,
String values)
Add data to a table, this may result in duplicate values
|
abstract void |
addData(Table table,
String primaryKey,
String primaryValue,
String values)
Add or update data in a table, if used properly this will ensure that there are no duplicate
rows and allows mass value updating
|
abstract void |
closeConnection()
Closes any currently open connections to the database
|
void |
convertData(DataStore to,
List<Table> tables) |
protected abstract void |
dropTable(Table table)
Drop an entire table
|
abstract Boolean |
getBoolean(Table table,
String primaryKey,
String value,
String key)
Get a value of the type Boolean
|
abstract List<String> |
getEntireColumn(Table table,
String key)
Get all the values in a column of a table
|
abstract List<String> |
getEntireRow(Table table,
String primaryKey,
String value)
Returns a list of String that contains all the values in a row that matches the primary key and value
|
abstract List<String> |
getEntireTable(Table table)
Get a list of all rows in a table, the values are separated with
valueSeparator |
abstract Long |
getLong(Table table,
String primaryKey,
String value,
String key)
Get a value of the type Long
|
abstract List<Long> |
getLongList(Table table,
String primaryKey,
String value,
String key)
Get a list of long, use a non unique primary key and value to get multiple values returned
|
abstract Object |
getObject(Table table,
String primaryKey,
String value,
String key)
Get a value of the type Object
|
abstract DataStore.StorageType |
getStorageType()
Get the storage type
|
abstract String |
getString(Table table,
String primaryKey,
String value,
String key)
Get a value of the type String
|
abstract List<String> |
getStringList(Table table,
String primaryKey,
String value,
String key)
Get a list of strings, use a non unique primary key and value to get multiple values returned
|
abstract void |
initialiseDataStore()
This will create and necessary files and generate tables
|
boolean |
isAsync()
Check if operations are being done asynchronously
|
abstract void |
removeAllData(Table table)
Removes all rows from the given table
|
abstract void |
removeData(Table table,
String key,
String value)
Removes any row with value in the key column in table
|
void |
setAsync(boolean isAsync)
Enable or disable async operations
|
abstract void |
setData(Table table,
String primaryKey,
String primaryValue,
String key,
String value)
Set a single value in a row
|
abstract void |
shutdown()
Shutdown will close any connections and shutdown the connection manager
|
public String valueSeparator
public abstract void initialiseDataStore()
public abstract DataStore.StorageType getStorageType()
public boolean isAsync()
public void setAsync(boolean isAsync)
isAsync - true means operations will be completed asynchronouslypublic abstract void closeConnection()
public abstract void shutdown()
public abstract void addData(Table table, String values)
table - The table you wish to add toovalues - The values you wish to add, must be in the correct order based on the table definition and be
separated by the valueSeparator, Must include all values of the tablepublic abstract void addData(Table table, String primaryKey, String primaryValue, String values)
table - The table you wish to editprimaryKey - The primary key of this tableprimaryValue - The value you wish to add/edit for in the primary key columnvalues - The values you wish to add, must be in the correct order based on the table definition and be
separated by the valueSeparator, Must include all values of the tablepublic abstract void setData(Table table, String primaryKey, String primaryValue, String key, String value)
table - The table you wish to editprimaryKey - The primary key of the row you wish to editprimaryValue - The primary keys value for the row you wish to editkey - The key of the value you wish to editvalue - The value you wish the key to be set toopublic abstract Long getLong(Table table, String primaryKey, String value, String key)
table - The table you wish to accessprimaryKey - The primary key of the row you wish to accessvalue - The value of the primary key in the row you wish to accesskey - The key to the value you wish to accesspublic abstract String getString(Table table, String primaryKey, String value, String key)
table - The table you wish to accessprimaryKey - The primary key of the row you wish to accessvalue - The value of the primary key in the row you wish to accesskey - The key to the value you wish to accesspublic abstract Boolean getBoolean(Table table, String primaryKey, String value, String key)
table - The table you wish to accessprimaryKey - The primary key of the row you wish to accessvalue - The value of the primary key in the row you wish to accesskey - The key to the value you wish to accesspublic abstract Object getObject(Table table, String primaryKey, String value, String key)
table - The table you wish to accessprimaryKey - The primary key of the row you wish to accessvalue - The value of the primary key in the row you wish to accesskey - The key to the value you wish to accesspublic abstract List<Long> getLongList(Table table, String primaryKey, String value, String key)
table - The table you wish to accessprimaryKey - The primary key of the row you wish to accessvalue - The value of the primary key in the row you wish to accesskey - The key to the value you wish to accesspublic abstract List<String> getStringList(Table table, String primaryKey, String value, String key)
table - The table you wish to accessprimaryKey - The primary key of the row you wish to accessvalue - The value of the primary key in the row you wish to accesskey - The key to the value you wish to accesspublic abstract List<String> getEntireColumn(Table table, String key)
table - The table you wish to accesskey - The column you wish to receive values frompublic abstract List<String> getEntireRow(Table table, String primaryKey, String value)
table - The table you wish to accessprimaryKey - The primary value of the row you wish to accessvalue - The value of the primary key in the row you wish to accesspublic abstract List<String> getEntireTable(Table table)
valueSeparatortable - The table you wish to retrievepublic abstract void removeData(Table table, String key, String value)
table - The table you wish to editkey - The key you wish to test forvalue - The value required for a record to be deletedpublic abstract void removeAllData(Table table)
table - the table to truncateprotected abstract void dropTable(Table table)
table - The table you wish to dropCopyright © 2020. All rights reserved.