public class DbConfiguration extends AbstractDbDataDao<Limit>
Modifier and Type | Class and Description |
---|---|
static class |
DbConfiguration.Columns |
AbstractDbData.UpdatedInfo
Modifier and Type | Field and Description |
---|---|
static int[] |
dbTypes |
protected static String |
insertAllValues |
static int |
NBPRKEY |
protected static String |
selectAllFields |
static String |
table |
protected static String |
updateAllFields |
JSON_MODEL, pojo
allFields, dbSession, isSaved, otherFields, primaryKey
Constructor and Description |
---|
DbConfiguration(Limit limit) |
DbConfiguration(com.fasterxml.jackson.databind.node.ObjectNode source)
Constructor from Json
|
DbConfiguration(String hostid) |
DbConfiguration(String hostid,
long rg,
long wg,
long rs,
long ws,
long del) |
Modifier and Type | Method and Description |
---|---|
void |
changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
Change UpdatedInfo status
|
protected AbstractDAO<Limit> |
getDao() |
static DbPreparedStatement |
getFilterPrepareStament(DbSession session,
String hostid,
long limitBandwith) |
static DbConfiguration |
getFromStatement(DbPreparedStatement statement) |
protected String |
getPrimaryField() |
protected String |
getPrimaryKey() |
protected String |
getTable() |
static DbConfiguration[] |
getUpdatedPrepareStament() |
boolean |
isOwnConfiguration() |
void |
setFromJson(com.fasterxml.jackson.databind.node.ObjectNode node,
boolean ignorePrimaryKey)
Read json object into Array then setFromArray
|
protected void |
setFromJson(String field,
com.fasterxml.jackson.databind.JsonNode value) |
void |
updateConfiguration()
Update configuration according to new value of limits
|
asJson, delete, exist, getInsertAllValues, getJson, getSelectAllFields, getUpdateAllFields, getValues, getWherePrimaryKey, initObject, insert, select, setFromArray, setPrimaryKey, setToArray, toJson, update
get, getAllFields, getTrueValue, getValue, setTrueValue, setValue, setValues
public static final int[] dbTypes
public static final String table
public static final int NBPRKEY
protected static final String selectAllFields
protected static final String updateAllFields
protected static final String insertAllValues
public DbConfiguration(String hostid, long rg, long wg, long rs, long ws, long del)
hostid
- rg
- Read Global Limitwg
- Write Global Limitrs
- Read Session Limitws
- Write Session Limitdel
- Delay Limitpublic DbConfiguration(Limit limit)
public DbConfiguration(com.fasterxml.jackson.databind.node.ObjectNode source) throws WaarpDatabaseSqlException
source
- WaarpDatabaseSqlException
public DbConfiguration(String hostid) throws WaarpDatabaseException
hostid
- WaarpDatabaseException
protected String getTable()
getTable
in class AbstractDbDataDao<Limit>
protected AbstractDAO<Limit> getDao() throws DAOConnectionException
getDao
in class AbstractDbDataDao<Limit>
DAOConnectionException
protected String getPrimaryKey()
getPrimaryKey
in class AbstractDbDataDao<Limit>
protected String getPrimaryField()
getPrimaryField
in class AbstractDbDataDao<Limit>
public void setFromJson(com.fasterxml.jackson.databind.node.ObjectNode node, boolean ignorePrimaryKey) throws WaarpDatabaseSqlException
setFromJson
in class AbstractDbDataDao<Limit>
node
- ignorePrimaryKey
- WaarpDatabaseSqlException
protected void setFromJson(String field, com.fasterxml.jackson.databind.JsonNode value)
setFromJson
in class AbstractDbDataDao<Limit>
public static DbConfiguration[] getUpdatedPrepareStament() throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbPreparedStatement getFilterPrepareStament(DbSession session, String hostid, long limitBandwith) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session
- hostid
- limitBandwith
- 0 for no limit, > 0 for one limit, < 0 for
no
filterWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public static DbConfiguration getFromStatement(DbPreparedStatement statement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
public void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDataDao
changeUpdatedInfo
in class AbstractDbDataDao<Limit>
public void updateConfiguration()
public boolean isOwnConfiguration()
Copyright © 2009–2020 Waarp. All rights reserved.