
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, pojoallFields, 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, updateget, getAllFields, getTrueValue, getValue, setTrueValue, setValue, setValuespublic 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 - WaarpDatabaseSqlExceptionpublic DbConfiguration(String hostid) throws WaarpDatabaseException
hostid - WaarpDatabaseExceptionprotected String getTable()
getTable in class AbstractDbDataDao<Limit>protected AbstractDAO<Limit> getDao() throws DAOConnectionException
getDao in class AbstractDbDataDao<Limit>DAOConnectionExceptionprotected 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 - WaarpDatabaseSqlExceptionprotected void setFromJson(String field, com.fasterxml.jackson.databind.JsonNode value)
setFromJson in class AbstractDbDataDao<Limit>public static DbConfiguration[] getUpdatedPrepareStament() throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic 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
filterWaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbConfiguration getFromStatement(DbPreparedStatement statement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
public void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDataDaochangeUpdatedInfo in class AbstractDbDataDao<Limit>public void updateConfiguration()
public boolean isOwnConfiguration()
Copyright © 2009–2020 Waarp. All rights reserved.