|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBRecord<RT> org.opengts.db.AccountRecord<RT> org.opengts.db.GroupRecord<DeviceGroup> org.opengts.db.tables.DeviceGroup
public class DeviceGroup
Nested Class Summary | |
---|---|
static class |
DeviceGroup.Key
|
Nested classes/interfaces inherited from class org.opengts.db.GroupRecord |
---|
GroupRecord.GroupKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.db.AccountRecord |
---|
AccountRecord.AccountKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.dbtools.DBRecord |
---|
DBRecord.DBChangeListener |
Field Summary | |
---|---|
static java.lang.String |
_TABLE_NAME
|
static java.lang.String |
DEVICE_GROUP_ALL
|
static java.lang.String |
DEVICE_GROUP_NONE
|
static java.lang.String |
FLD_allowNotify
|
static java.lang.String |
FLD_groupType
|
static java.lang.String |
FLD_notifyEmail
|
static java.lang.String |
FLD_workOrderID
|
static OrderedSet<java.lang.String> |
GROUP_LIST_ALL
|
static OrderedSet<java.lang.String> |
GROUP_LIST_EMPTY
|
static java.lang.String |
OPTCOLS_RuleNotification
|
static java.lang.String |
OPTCOLS_WorkOrderInfo
|
static DBField[] |
RuleNotification
|
static DBField[] |
WorkOrderInfo
|
Fields inherited from class org.opengts.db.GroupRecord |
---|
FLD_groupID |
Fields inherited from class org.opengts.db.AccountRecord |
---|
FLD_accountID, FLD_displayName, FLD_isActive, FLD_notes |
Fields inherited from class org.opengts.dbtools.DBRecord |
---|
errorDescription, excludedUpdateFields, FLD_creationMillis, FLD_creationTime, FLD_description, FLD_lastUpdateAccount, FLD_lastUpdateTime, FLD_lastUpdateUser, hasError, ID_SIZE, isValidating, lastSQLException, NOTIFY_GROUP, PSEUDO_FIELD_CHAR, tempProps |
Constructor Summary | |
---|---|
DeviceGroup()
|
|
DeviceGroup(DeviceGroup.Key key)
|
Method Summary | |
---|---|
protected static DBSelect |
_getDeviceListSelect(java.lang.String acctId,
java.lang.String groupId,
long limit)
|
void |
addDeviceToDeviceGroup(Device device)
|
void |
addDeviceToDeviceGroup(java.lang.String deviceID)
|
static void |
addDeviceToDeviceGroup(java.lang.String accountID,
java.lang.String groupID,
java.lang.String deviceID)
|
static long |
countOldEvents(Account account,
java.lang.String groupID,
long oldTimeSec,
boolean log)
Returns count of events in this DeviceGroup. Note: Will return -1 if EventData table is InnoDB. |
long |
countOldEvents(long oldTimeSec,
boolean log)
Returns count of events in this DeviceGroup. Note: Will return -1 if EventData table is InnoDB. |
static DeviceGroup |
createNewDeviceGroup(Account account,
java.lang.String groupID)
|
static long |
deleteOldEvents(Account account,
java.lang.String groupID,
long oldTimeSec,
boolean log)
Delete events prior to the specified time. Note: Will return -1 if EventData table is InnoDB. |
long |
deleteOldEvents(long oldTimeSec,
boolean log)
Delete events prior to the specified time. Note: Will return -1 if EventData table is InnoDB. |
static boolean |
exists(java.lang.String acctID,
java.lang.String groupID)
|
static boolean |
exists(java.lang.String acctID,
java.lang.String groupID,
java.lang.String deviceID)
|
boolean |
getAllowNotify()
Returns true if this DeviceGroup allows notifications |
boolean |
getAllowNotify(boolean checkAccount)
Returns true if this DeviceGroup allows notifications |
long |
getDeviceCount()
|
static DeviceGroup |
getDeviceGroup(Account account,
java.lang.String groupId)
|
static DeviceGroup |
getDeviceGroup(Account account,
java.lang.String groupId,
boolean createOK)
|
static java.lang.String |
GetDeviceGroupAllTitle(Account account,
java.util.Locale loc)
|
static OrderedSet<java.lang.String> |
getDeviceGroups(DBSelect<DeviceGroup> dsel,
boolean includeAll)
|
static OrderedSet<java.lang.String> |
getDeviceGroupsForAccount(java.lang.String acctId,
boolean includeAll)
|
static java.util.Collection<java.lang.String> |
getDeviceGroupsForDevice(java.lang.String acctId,
java.lang.String deviceId)
|
static java.util.Collection<java.lang.String> |
getDeviceGroupsForDevice(java.lang.String acctId,
java.lang.String deviceId,
boolean inclAll)
|
static OrderedSet<java.lang.String> |
getDeviceIDsForGroup(java.lang.String acctId,
java.lang.String groupId,
User userAuth,
boolean inclInactv)
|
static OrderedSet<java.lang.String> |
getDeviceIDsForGroup(java.lang.String acctId,
java.lang.String groupId,
User userAuth,
boolean inclInactv,
long limit)
|
OrderedSet<java.lang.String> |
getDevices(User userAuth,
boolean inclInactv)
|
static DBFactory<DeviceGroup> |
getFactory()
|
int |
getGroupType()
|
java.lang.String |
getMapLegend()
|
static int |
getMaximumNotifyEmailLength()
Gets the maximum Notify Email length |
java.lang.String |
getNotifyEmail()
Gets the Notification Email address |
static java.lang.String |
getTableDescription(java.util.Locale loc)
|
static java.lang.String[] |
GetTitles(java.util.Locale loc)
|
java.lang.String |
getWorkOrderID()
|
boolean |
isDeviceInDeviceGroup(Device device)
|
boolean |
isDeviceInDeviceGroup(java.lang.String deviceID)
|
static boolean |
isDeviceInDeviceGroup(java.lang.String acctID,
java.lang.String groupID,
java.lang.String deviceID)
|
static void |
main(java.lang.String[] argv)
|
void |
removeDeviceFromDeviceGroup(Device device)
|
void |
removeDeviceFromDeviceGroup(java.lang.String deviceID)
|
static void |
removeDeviceFromDeviceGroup(java.lang.String accountID,
java.lang.String groupID,
java.lang.String deviceID)
|
void |
setAllowNotify(boolean v)
Sets the "Allow Notification" state for this DeviceGroup |
void |
setCreationDefaultValues()
Override to set default values |
void |
setGroupType(int v)
|
void |
setMapLegend(java.lang.String legend)
|
void |
setNotifyEmail(java.lang.String v)
Sets the Notification Email address |
void |
setWorkOrderID(java.lang.String v)
|
static boolean |
supportsNotification()
Returns true if this DeviceGroup record supports the "allowNotify" field |
static java.lang.String |
TABLE_NAME()
|
java.lang.String |
toString()
Returns a String representation of the DBRecordKey for this DBRecord |
Methods inherited from class org.opengts.db.GroupRecord |
---|
getDeviceGroup, getGroupDescription, getGroupID, hasGroup, newField_groupID, newField_groupID, setDeviceGroup, setGroupID |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEVICE_GROUP_ALL
public static final java.lang.String DEVICE_GROUP_NONE
public static final OrderedSet<java.lang.String> GROUP_LIST_ALL
public static final OrderedSet<java.lang.String> GROUP_LIST_EMPTY
public static final java.lang.String OPTCOLS_WorkOrderInfo
public static final java.lang.String OPTCOLS_RuleNotification
public static final java.lang.String _TABLE_NAME
public static final java.lang.String FLD_groupType
public static final java.lang.String FLD_allowNotify
public static final java.lang.String FLD_notifyEmail
public static final DBField[] RuleNotification
public static final java.lang.String FLD_workOrderID
public static final DBField[] WorkOrderInfo
Constructor Detail |
---|
public DeviceGroup()
public DeviceGroup(DeviceGroup.Key key)
Method Detail |
---|
public static java.lang.String[] GetTitles(java.util.Locale loc)
public static java.lang.String GetDeviceGroupAllTitle(Account account, java.util.Locale loc)
public static java.lang.String TABLE_NAME()
public static DBFactory<DeviceGroup> getFactory()
public static java.lang.String getTableDescription(java.util.Locale loc)
public int getGroupType()
public void setGroupType(int v)
public static boolean supportsNotification()
public boolean getAllowNotify()
public void setAllowNotify(boolean v)
v
- The "Allow Notification" state for this DeviceGrouppublic boolean getAllowNotify(boolean checkAccount)
checkAccount
- True to also check Account
public java.lang.String getNotifyEmail()
public void setNotifyEmail(java.lang.String v)
v
- The Notification Email Addresspublic static int getMaximumNotifyEmailLength()
public java.lang.String getWorkOrderID()
public void setWorkOrderID(java.lang.String v)
public void setMapLegend(java.lang.String legend)
public java.lang.String getMapLegend()
public java.lang.String toString()
DBRecord
toString
in class DBRecord<DeviceGroup>
public void setCreationDefaultValues()
DBRecord
setCreationDefaultValues
in class DBRecord<DeviceGroup>
public boolean isDeviceInDeviceGroup(java.lang.String deviceID)
public boolean isDeviceInDeviceGroup(Device device)
public void addDeviceToDeviceGroup(java.lang.String deviceID) throws DBException
DBException
public void addDeviceToDeviceGroup(Device device) throws DBException
DBException
public void removeDeviceFromDeviceGroup(java.lang.String deviceID) throws DBException
DBException
public void removeDeviceFromDeviceGroup(Device device) throws DBException
DBException
public long countOldEvents(long oldTimeSec, boolean log) throws DBException
DBException
public static long countOldEvents(Account account, java.lang.String groupID, long oldTimeSec, boolean log) throws DBException
DBException
public long deleteOldEvents(long oldTimeSec, boolean log) throws DBException
oldTimeSec
- The timestamp before which events will be deletedlog
- True to display log
DBException
public static long deleteOldEvents(Account account, java.lang.String groupID, long oldTimeSec, boolean log) throws DBException
account
- The accountgroupID
- The group-idoldTimeSec
- The timestamp before which events will be deletedlog
- True to display log
DBException
public static boolean exists(java.lang.String acctID, java.lang.String groupID) throws DBException
DBException
public static boolean exists(java.lang.String acctID, java.lang.String groupID, java.lang.String deviceID) throws DBException
DBException
public static boolean isDeviceInDeviceGroup(java.lang.String acctID, java.lang.String groupID, java.lang.String deviceID)
public static void addDeviceToDeviceGroup(java.lang.String accountID, java.lang.String groupID, java.lang.String deviceID) throws DBException
DBException
public static void removeDeviceFromDeviceGroup(java.lang.String accountID, java.lang.String groupID, java.lang.String deviceID) throws DBException
DBException
public static DeviceGroup getDeviceGroup(Account account, java.lang.String groupId) throws DBException
DBException
public static DeviceGroup getDeviceGroup(Account account, java.lang.String groupId, boolean createOK) throws DBException
DBException
public static DeviceGroup createNewDeviceGroup(Account account, java.lang.String groupID) throws DBException
DBException
protected static DBSelect _getDeviceListSelect(java.lang.String acctId, java.lang.String groupId, long limit)
public long getDeviceCount()
public OrderedSet<java.lang.String> getDevices(User userAuth, boolean inclInactv) throws DBException
DBException
public static OrderedSet<java.lang.String> getDeviceIDsForGroup(java.lang.String acctId, java.lang.String groupId, User userAuth, boolean inclInactv) throws DBException
DBException
public static OrderedSet<java.lang.String> getDeviceIDsForGroup(java.lang.String acctId, java.lang.String groupId, User userAuth, boolean inclInactv, long limit) throws DBException
DBException
public static OrderedSet<java.lang.String> getDeviceGroupsForAccount(java.lang.String acctId, boolean includeAll) throws DBException
DBException
public static OrderedSet<java.lang.String> getDeviceGroups(DBSelect<DeviceGroup> dsel, boolean includeAll) throws DBException
DBException
public static java.util.Collection<java.lang.String> getDeviceGroupsForDevice(java.lang.String acctId, java.lang.String deviceId) throws DBException
DBException
public static java.util.Collection<java.lang.String> getDeviceGroupsForDevice(java.lang.String acctId, java.lang.String deviceId, boolean inclAll) throws DBException
DBException
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |