jreceiver.common.rec.driver
Class DeviceRec

java.lang.Object
  |
  +--jreceiver.common.rec.BaseRec
        |
        +--jreceiver.common.rec.driver.DeviceRec
All Implemented Interfaces:
Device, Hashable, Rec
Direct Known Subclasses:
DeviceStatusRec

public class DeviceRec
extends BaseRec
implements Device

A record from the Drivers table

Version:
$Revision: 1.2 $ $Date: 2002/07/20 00:49:53 $
Author:
Reed Esau

Field Summary
protected  java.lang.String address
           
protected  int device_id
           
protected  int driver_id
           
protected  long timestamp
           
 
Fields inherited from interface jreceiver.common.rec.driver.Device
HKEY_ADDRESS, HKEY_DEVICE_ID, HKEY_DRIVER_ID, HKEY_TIMESTAMP
 
Fields inherited from interface jreceiver.common.rec.Rec
HKEY_KEY, NO_LIMIT
 
Constructor Summary
DeviceRec()
          ctor - for use as bean
DeviceRec(java.util.Hashtable hash)
          ctor - construct from a hashtable, usually retrieved via XML-RPC
DeviceRec(int device_id, int driver_id, java.lang.String address, long timestamp)
          ctor - default
 
Method Summary
 java.lang.String getAddress()
          This address is a the network address by which to identify the receiver.
 int getDriverId()
          The driver with which the device is associated
 int getId()
          The driver with which the device is associated
 java.lang.Object getKey()
          return the Integer object that serves as this Rec's key.
 long getTimestamp()
          This is when the device was last updated
static java.util.Vector reconstitute(java.util.Vector vector)
          Reconstitute each DeviceRec object that appears as a hash in the list.
 void setKey(java.lang.Object new_key)
          assign the Number-derived, Key-derived or String that serves as this Rec's key.
 java.util.Hashtable toHash()
          Store the object as a hash suitable for transport over an XML-RPC connection or similar.
 java.lang.String toString()
          Returns a string representation of the event.
 
Methods inherited from class jreceiver.common.rec.BaseRec
dissolve, dissolveMap, find, find, find, find
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

device_id

protected int device_id

driver_id

protected int driver_id

address

protected java.lang.String address

timestamp

protected long timestamp
Constructor Detail

DeviceRec

public DeviceRec()
ctor - for use as bean

DeviceRec

public DeviceRec(int device_id,
                 int driver_id,
                 java.lang.String address,
                 long timestamp)
ctor - default

DeviceRec

public DeviceRec(java.util.Hashtable hash)
          throws RecException
ctor - construct from a hashtable, usually retrieved via XML-RPC
Parameters:
hash -  
Method Detail

toHash

public java.util.Hashtable toHash()
Store the object as a hash suitable for transport over an XML-RPC connection or similar.

Use DeviceRec(Hashtable) to transform the data back into an object of this type.

Specified by:
toHash in interface Hashable
Returns:
 

toString

public java.lang.String toString()
Returns a string representation of the event.

Specified by:
toString in interface Hashable
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getKey

public java.lang.Object getKey()
return the Integer object that serves as this Rec's key.
Specified by:
getKey in interface Rec

setKey

public void setKey(java.lang.Object new_key)
assign the Number-derived, Key-derived or String that serves as this Rec's key.
Specified by:
setKey in interface Rec

getId

public int getId()
The driver with which the device is associated
Specified by:
getId in interface Device

getDriverId

public int getDriverId()
The driver with which the device is associated
Specified by:
getDriverId in interface Device

getAddress

public java.lang.String getAddress()
This address is a the network address by which to identify the receiver. It can be a name or IP address.
Specified by:
getAddress in interface Device

getTimestamp

public long getTimestamp()
This is when the device was last updated
Specified by:
getTimestamp in interface Device

reconstitute

public static java.util.Vector reconstitute(java.util.Vector vector)
                                     throws RecException
Reconstitute each DeviceRec object that appears as a hash in the list.


Copyright © 2001-2002 Reed Esau, All Rights Reserved.