org.opengts.db.tables
Class DeviceGroup

java.lang.Object
  extended by org.opengts.dbtools.DBRecord<RT>
      extended by org.opengts.db.AccountRecord<RT>
          extended by org.opengts.db.GroupRecord<DeviceGroup>
              extended by org.opengts.db.tables.DeviceGroup

public class DeviceGroup
extends GroupRecord<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_groupType
           
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_WorkOrderInfo
           
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_lastUpdateTime, FLD_lastUpdateUser, hasError, ID_SIZE, isValidating, lastSQLException, NOTIFY_GROUP, PSEUDO_FIELD_CHAR
 
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 DeviceGroup createNewDeviceGroup(Account account, java.lang.String groupID)
           
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)
           
 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 GetDeviceGroupAll(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 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 setCreationDefaultValues()
          Override to set default values
 void setGroupType(int v)
           
 void setMapLegend(java.lang.String legend)
           
 void setWorkOrderID(java.lang.String v)
           
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 org.opengts.db.AccountRecord
createSystemAdminAccount, getAccount, getAccountDescription, getAccountID, getDisplayName, getFilteredID, getFilteredID, getIsActive, getNotes, getSystemAdminAccount, getSystemAdminAccountID, hasAccount, hasSystemAdminAccountID, isAccountManager, isActive, isSystemAdmin, isSystemAdmin, isSystemAdminAccountID, isValidID, newField_accountID, newField_accountID, newField_displayName, newField_displayName, newField_isActive, newField_isActive, newField_notes, newField_notes, setAccount, setDisplayName, setIsActive, setNotes, setRuntimeDefaultValues
 
Methods inherited from class org.opengts.dbtools.DBRecord
_getFactory, _reload, addChangedNotification, addExcludedUpdateFields, appendFieldValues, clearChanged, clearError, clearExcludedUpdateFields, clearLastCaughtSQLException, equals, excludeFieldFromUpdate, excludeFieldFromUpdate, fireChangeNotification, getCreationDateTime, getCreationMillis, getCreationTime, GetCurrentUser, getDefaultFieldValueKey, getDescription, getErrorDescription, getFactory, getFactory, getField, getFieldBoolean, getFieldDateTime, getFieldDouble, getFieldFloat, getFieldInt, getFieldLong, getFieldName, getFieldString, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getLastCaughtSQLException, getLastUpdateTime, getLastUpdateTime, getLastUpdateUser, getNextGroup, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getRecordCount, getRecordCount, getRecordCount, getRecordCount, getRecordCount, getRecordKey, getRecords, getRecords, getValue, getVirtual, hasChanged, hasError, hasField, hasFieldValue, insert, isLastCaughtSQLExceptionErrorCode, isOkToReload, isOkToSave, isValidating, isVirtual, lock, lockRead, lockWrite, newField_creationMillis, newField_creationTime, newField_creationTime, newField_description, newField_description, newField_lastUpdateTime, newField_lastUpdateUser, printXML, printXML, printXML, printXML, printXML, printXML, recordDidInsert, recordDidUpdate, recordWillInsert, recordWillUpdate, reload, reload, removeChangedNotification, save, select, select, select, setAllFieldValues, setAllFieldValues, setAllFieldValues, setAllFieldValues, setChanged, setChanged, setCreationMillis, setCreationTime, SetCurrentUser, setDescription, setError, setError, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setIgnoreInvalidFields, setLastCaughtSQLException, setLastUpdateTime, setLastUpdateUser, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setValidating, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVirtual, toXML, toXML, toXML, toXML, toXML, unlock, update, update, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEVICE_GROUP_ALL

public static final java.lang.String DEVICE_GROUP_ALL
See Also:
Constant Field Values

DEVICE_GROUP_NONE

public static final java.lang.String DEVICE_GROUP_NONE
See Also:
Constant Field Values

GROUP_LIST_ALL

public static final OrderedSet<java.lang.String> GROUP_LIST_ALL

GROUP_LIST_EMPTY

public static final OrderedSet<java.lang.String> GROUP_LIST_EMPTY

OPTCOLS_WorkOrderInfo

public static final java.lang.String OPTCOLS_WorkOrderInfo
See Also:
Constant Field Values

_TABLE_NAME

public static final java.lang.String _TABLE_NAME
See Also:
Constant Field Values

FLD_groupType

public static final java.lang.String FLD_groupType
See Also:
Constant Field Values

FLD_workOrderID

public static final java.lang.String FLD_workOrderID
See Also:
Constant Field Values

WorkOrderInfo

public static final DBField[] WorkOrderInfo
Constructor Detail

DeviceGroup

public DeviceGroup()

DeviceGroup

public DeviceGroup(DeviceGroup.Key key)
Method Detail

GetTitles

public static java.lang.String[] GetTitles(java.util.Locale loc)

GetDeviceGroupAll

public static java.lang.String GetDeviceGroupAll(java.util.Locale loc)

TABLE_NAME

public static java.lang.String TABLE_NAME()

getFactory

public static DBFactory<DeviceGroup> getFactory()

getTableDescription

public static java.lang.String getTableDescription(java.util.Locale loc)

getGroupType

public int getGroupType()

setGroupType

public void setGroupType(int v)

getWorkOrderID

public java.lang.String getWorkOrderID()

setWorkOrderID

public void setWorkOrderID(java.lang.String v)

setMapLegend

public void setMapLegend(java.lang.String legend)

getMapLegend

public java.lang.String getMapLegend()

toString

public java.lang.String toString()
Description copied from class: DBRecord
Returns a String representation of the DBRecordKey for this DBRecord

Overrides:
toString in class DBRecord<DeviceGroup>
Returns:
A String representation of the DBRecordKey for this DBRecord

setCreationDefaultValues

public void setCreationDefaultValues()
Description copied from class: DBRecord
Override to set default values

Overrides:
setCreationDefaultValues in class DBRecord<DeviceGroup>

isDeviceInDeviceGroup

public boolean isDeviceInDeviceGroup(java.lang.String deviceID)

isDeviceInDeviceGroup

public boolean isDeviceInDeviceGroup(Device device)

addDeviceToDeviceGroup

public void addDeviceToDeviceGroup(java.lang.String deviceID)
                            throws DBException
Throws:
DBException

addDeviceToDeviceGroup

public void addDeviceToDeviceGroup(Device device)
                            throws DBException
Throws:
DBException

removeDeviceFromDeviceGroup

public void removeDeviceFromDeviceGroup(java.lang.String deviceID)
                                 throws DBException
Throws:
DBException

removeDeviceFromDeviceGroup

public void removeDeviceFromDeviceGroup(Device device)
                                 throws DBException
Throws:
DBException

exists

public static boolean exists(java.lang.String acctID,
                             java.lang.String groupID)
                      throws DBException
Throws:
DBException

exists

public static boolean exists(java.lang.String acctID,
                             java.lang.String groupID,
                             java.lang.String deviceID)
                      throws DBException
Throws:
DBException

isDeviceInDeviceGroup

public static boolean isDeviceInDeviceGroup(java.lang.String acctID,
                                            java.lang.String groupID,
                                            java.lang.String deviceID)

addDeviceToDeviceGroup

public static void addDeviceToDeviceGroup(java.lang.String accountID,
                                          java.lang.String groupID,
                                          java.lang.String deviceID)
                                   throws DBException
Throws:
DBException

removeDeviceFromDeviceGroup

public static void removeDeviceFromDeviceGroup(java.lang.String accountID,
                                               java.lang.String groupID,
                                               java.lang.String deviceID)
                                        throws DBException
Throws:
DBException

getDeviceGroup

public static DeviceGroup getDeviceGroup(Account account,
                                         java.lang.String groupId)
                                  throws DBException
Throws:
DBException

getDeviceGroup

public static DeviceGroup getDeviceGroup(Account account,
                                         java.lang.String groupId,
                                         boolean createOK)
                                  throws DBException
Throws:
DBException

createNewDeviceGroup

public static DeviceGroup createNewDeviceGroup(Account account,
                                               java.lang.String groupID)
                                        throws DBException
Throws:
DBException

_getDeviceListSelect

protected static DBSelect _getDeviceListSelect(java.lang.String acctId,
                                               java.lang.String groupId,
                                               long limit)

getDeviceCount

public long getDeviceCount()

getDevices

public OrderedSet<java.lang.String> getDevices(User userAuth,
                                               boolean inclInactv)
                                        throws DBException
Throws:
DBException

getDeviceIDsForGroup

public static OrderedSet<java.lang.String> getDeviceIDsForGroup(java.lang.String acctId,
                                                                java.lang.String groupId,
                                                                User userAuth,
                                                                boolean inclInactv)
                                                         throws DBException
Throws:
DBException

getDeviceIDsForGroup

public static OrderedSet<java.lang.String> getDeviceIDsForGroup(java.lang.String acctId,
                                                                java.lang.String groupId,
                                                                User userAuth,
                                                                boolean inclInactv,
                                                                long limit)
                                                         throws DBException
Throws:
DBException

getDeviceGroupsForAccount

public static OrderedSet<java.lang.String> getDeviceGroupsForAccount(java.lang.String acctId,
                                                                     boolean includeAll)
                                                              throws DBException
Throws:
DBException

getDeviceGroups

public static OrderedSet<java.lang.String> getDeviceGroups(DBSelect<DeviceGroup> dsel,
                                                           boolean includeAll)
                                                    throws DBException
Throws:
DBException

getDeviceGroupsForDevice

public static java.util.Collection<java.lang.String> getDeviceGroupsForDevice(java.lang.String acctId,
                                                                              java.lang.String deviceId)
                                                                       throws DBException
Throws:
DBException

getDeviceGroupsForDevice

public static java.util.Collection<java.lang.String> getDeviceGroupsForDevice(java.lang.String acctId,
                                                                              java.lang.String deviceId,
                                                                              boolean inclAll)
                                                                       throws DBException
Throws:
DBException

main

public static void main(java.lang.String[] argv)