
public class DbHostConfiguration extends AbstractDbDataDao<Business>
| Modifier and Type | Class and Description |
|---|---|
static class |
DbHostConfiguration.Columns |
static class |
DbHostConfiguration.OtherFields |
AbstractDbData.UpdatedInfo| Modifier and Type | Field and Description |
|---|---|
static XmlDecl[] |
configAliasDecls
Structure of the Configuration file
|
static XmlDecl[] |
configRoleDecls
Structure of the Configuration file
|
static int[] |
dbTypes |
static DbHostConfiguration.Columns[] |
indexes |
protected static String |
selectAllFields |
static String |
table |
static String |
XML_ALIAS
Alias
|
static String |
XML_ALIASES |
static String |
XML_ALIASID
Alias Id
|
static String |
XML_BUSINESS |
static String |
XML_BUSINESSID
Check version in protocol
|
static String |
XML_REALID
Main ID in alias
|
static String |
XML_ROLE
Role Main entry
|
static String |
XML_ROLEID
ID in role
|
static String |
XML_ROLES |
static String |
XML_ROLESET
Role set
|
JSON_MODEL, pojo, SHOULD_NOT_BE_CALLEDallFields, dbSession, isSaved, otherFields, primaryKey| Constructor and Description |
|---|
DbHostConfiguration(Business business) |
DbHostConfiguration(com.fasterxml.jackson.databind.node.ObjectNode source)
Constructor from Json
|
DbHostConfiguration(String hostid) |
DbHostConfiguration(String hostid,
String business,
String roles,
String aliases,
String others) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
Change UpdatedInfo status
|
protected void |
checkValues() |
String |
getAliases() |
String |
getBusiness() |
protected AbstractDAO<Business> |
getDao(boolean isCacheable) |
static DbPreparedStatement |
getFilterPrepareStament(DbSession session,
String hostid,
String business,
String role,
String alias,
String other) |
static DbHostConfiguration |
getFromStatement(DbPreparedStatement preparedStatement)
For instance from Commander when getting updated information
|
String |
getHostid() |
org.joda.time.DateTime |
getLastDateTimeMonitoring() |
static org.joda.time.DateTime |
getLastDateTimeMonitoring(String hostid) |
org.dom4j.Element |
getOtherElement() |
String |
getOthers() |
protected String |
getPrimaryField() |
protected String |
getPrimaryKey() |
String |
getRoles() |
protected String |
getTable() |
static DbHostConfiguration[] |
getUpdatedPrepareStament() |
static String |
getVersionDb(String hostid) |
protected void |
initObject()
To setup primaryKey, otherFields, allFields.
|
boolean |
isOwnConfiguration() |
boolean |
isSeeAllId(String id) |
void |
setAliases(String aliases) |
void |
setBusiness(String business) |
protected void |
setFromJson(String field,
com.fasterxml.jackson.databind.JsonNode value) |
void |
setOtherElement(org.dom4j.Element element) |
void |
setOthers(String others) |
void |
setRoles(String roles) |
boolean |
updateAlias(Configuration config,
String newalias,
boolean purged)
update Alias with possible purge and new or added content, and updating
in
memory information
|
boolean |
updateBusiness(Configuration config,
String newbusiness,
boolean purged)
update Business with possible purge and new or added content, and
updating
in memory information
|
void |
updateConfiguration()
Update configuration according to new values
|
void |
updateFromConfiguration(Configuration configuration)
Update the DbHostConfiguration from Configuration
|
static void |
updateHostConfiguration(Configuration config,
DbHostConfiguration hostConfiguration) |
void |
updateLastDateTimeMonitoring(org.joda.time.DateTime lastDateTime)
Update the last DateTime for Monitoring for this HostId
|
static void |
updateLastDateTimeMonitoring(String hostid,
org.joda.time.DateTime lastDateTime)
Update the last DateTime for Monitoring for this HostId
|
boolean |
updateRoles(Configuration config,
String newroles,
boolean purged)
update Roles with possible purge and new or added content, and updating
in
memory information
|
static String |
updateVersionDb(String hostid,
String version)
Update the version for this HostId
|
asJson, delete, exist, getInsertAllValues, getJson, getSelectAllFields, getUpdateAllFields, getValues, getWherePrimaryKey, insert, select, setFromArray, setFromJson, setPrimaryKey, setToArray, toJson, update, validateLength, validateLengthgetAllFields, getTrueValue, setTrueValue, setValuespublic static final int[] dbTypes
public static final DbHostConfiguration.Columns[] indexes
public static final String table
public static final String XML_ALIASES
public static final String XML_ROLES
public static final String XML_BUSINESS
public static final String XML_ALIASID
public static final String XML_REALID
public static final String XML_ALIAS
public static final String XML_ROLESET
public static final String XML_ROLEID
public static final String XML_ROLE
public static final String XML_BUSINESSID
public static final XmlDecl[] configRoleDecls
public static final XmlDecl[] configAliasDecls
protected static final String selectAllFields
public DbHostConfiguration(String hostid, String business, String roles, String aliases, String others) throws WaarpDatabaseSqlException
hostid - business - Business configurationroles - Roles configurationaliases - Aliases configurationothers - Other configurationWaarpDatabaseSqlExceptionpublic DbHostConfiguration(Business business)
public DbHostConfiguration(com.fasterxml.jackson.databind.node.ObjectNode source)
throws WaarpDatabaseSqlException
source - WaarpDatabaseSqlExceptionpublic DbHostConfiguration(String hostid) throws WaarpDatabaseException
hostid - WaarpDatabaseExceptionprotected final void initObject()
AbstractDbDatainitObject in class AbstractDbDataDao<Business>protected final String getTable()
getTable in class AbstractDbDataDao<Business>protected final AbstractDAO<Business> getDao(boolean isCacheable) throws DAOConnectionException
getDao in class AbstractDbDataDao<Business>DAOConnectionExceptionprotected final String getPrimaryKey()
getPrimaryKey in class AbstractDbDataDao<Business>protected final String getPrimaryField()
getPrimaryField in class AbstractDbDataDao<Business>protected final void checkValues()
throws WaarpDatabaseSqlException
checkValues in class AbstractDbDataDao<Business>WaarpDatabaseSqlExceptionpublic final String getHostid()
public final String getBusiness()
public final void setBusiness(String business)
business - the business to setpublic final String getRoles()
public final void setRoles(String roles)
roles - the roles to setpublic final String getAliases()
public final void setAliases(String aliases)
aliases - the aliases to setpublic final String getOthers()
public final void setOthers(String others)
others - the others to setpublic final org.dom4j.Element getOtherElement()
public final void setOtherElement(org.dom4j.Element element)
element - the element to set as XML string to other partprotected final void setFromJson(String field, com.fasterxml.jackson.databind.JsonNode value)
setFromJson in class AbstractDbDataDao<Business>public static DbHostConfiguration getFromStatement(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbHostConfiguration[] getUpdatedPrepareStament() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbPreparedStatement getFilterPrepareStament(DbSession session, String hostid, String business, String role, String alias, String other) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - hostid - business - role - alias - other - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDataDaochangeUpdatedInfo in class AbstractDbDataDao<Business>public final void updateConfiguration()
public final boolean isOwnConfiguration()
public final boolean updateBusiness(Configuration config, String newbusiness, boolean purged)
config - newbusiness - purged - public final void updateFromConfiguration(Configuration configuration)
configuration - public final boolean updateAlias(Configuration config, String newalias, boolean purged)
config - newalias - purged - public final boolean updateRoles(Configuration config, String newroles, boolean purged)
config - newroles - purged - public static void updateHostConfiguration(Configuration config, DbHostConfiguration hostConfiguration)
public static String getVersionDb(String hostid)
hostid - public final boolean isSeeAllId(String id)
public static String updateVersionDb(String hostid, String version)
hostid - version - public final org.joda.time.DateTime getLastDateTimeMonitoring()
public final void updateLastDateTimeMonitoring(org.joda.time.DateTime lastDateTime)
lastDateTime - public static org.joda.time.DateTime getLastDateTimeMonitoring(String hostid)
hostid - public static void updateLastDateTimeMonitoring(String hostid, org.joda.time.DateTime lastDateTime)
hostid - lastDateTime - Copyright © 2009–2022 Waarp. All rights reserved.