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 |
static DbConfiguration.Columns[] |
indexes |
protected static String |
selectAllFields |
static String |
table |
JSON_MODEL, pojo, SHOULD_NOT_BE_CALLED
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 void |
checkValues() |
protected AbstractDAO<Limit> |
getDao(boolean isCacheable) |
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, validateLength, validateLength
getAllFields, getTrueValue, setTrueValue, setValues
public static final int[] dbTypes
public static final String table
protected static final String selectAllFields
public static final DbConfiguration.Columns[] indexes
public DbConfiguration(String hostid, long rg, long wg, long rs, long ws, long del) throws WaarpDatabaseSqlException
hostid
- rg
- Read Global Limitwg
- Write Global Limitrs
- Read Session Limitws
- Write Session Limitdel
- Delay LimitWaarpDatabaseSqlException
public 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 final String getTable()
getTable
in class AbstractDbDataDao<Limit>
protected final AbstractDAO<Limit> getDao(boolean isCacheable) throws DAOConnectionException
getDao
in class AbstractDbDataDao<Limit>
DAOConnectionException
protected final String getPrimaryKey()
getPrimaryKey
in class AbstractDbDataDao<Limit>
protected final String getPrimaryField()
getPrimaryField
in class AbstractDbDataDao<Limit>
protected final void checkValues() throws WaarpDatabaseSqlException
checkValues
in class AbstractDbDataDao<Limit>
WaarpDatabaseSqlException
public final void setFromJson(com.fasterxml.jackson.databind.node.ObjectNode node, boolean ignorePrimaryKey) throws WaarpDatabaseSqlException
setFromJson
in class AbstractDbDataDao<Limit>
node
- ignorePrimaryKey
- WaarpDatabaseSqlException
protected final void setFromJson(String field, com.fasterxml.jackson.databind.JsonNode value)
setFromJson
in class AbstractDbDataDao<Limit>
public static DbConfiguration[] getUpdatedPrepareStament() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionException
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 final void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDataDao
changeUpdatedInfo
in class AbstractDbDataDao<Limit>
public final void updateConfiguration()
public final boolean isOwnConfiguration()
Copyright © 2009–2022 Waarp. All rights reserved.