jpa.p1.sub
Class SubRecord

java.lang.Object
  |
  +--jpa.p1.sub.SubRecord

public class SubRecord
extends java.lang.Object

This class represents a single PlatformOne record. It is implemented by the JPA PlatformOne Subscription package, and is created in response to an invocation of the createRecord method in the SubDataset class.


Method Summary
 void cancel(SubRecordEvent event)
          This method cancels a watch on the record.
protected  void finalize()
           
 SubValue findAttr(char cAttr)
          This method finds the object representing the value of the specified attribute, and returns a reference to it.
 SubValue findValue(java.lang.String fieldName)
          This method finds the object representing the value of the specified field, and returns a reference to it.
 SubValue getAttr(int attr)
          This method returns a reference to the object representing an individual attribute.
 SubDataset getDataset()
          This method returns a reference to the dataset object to which this record belongs.
 java.lang.String getName()
          This method returns the record name.
 int getNumAttr()
          This method returns the number of attributes in the record.
 int getNumValue()
          This method returns the number of values in the record.
 SubSchema getSchema()
          This method returns a reference to the object representing the schema used by the object.
 int getState()
          This method returns the current state of the record.
 java.util.Date getTimestamp()
          This method returns the timestamp of the most recent update to the record.
 SubValue getValue(int value)
          This method returns a reference to the object representing an individual value.
 void watch(SubRecordEvent event)
          This method watches the record.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object

getName

public java.lang.String getName()
This method returns the record name.

watch

public void watch(SubRecordEvent event)
This method watches the record. The single argument is a reference to an object in the application that implements the SubRecordEvent interface. This is used to receive images, updates and state changes.

cancel

public void cancel(SubRecordEvent event)
This method cancels a watch on the record.

getDataset

public SubDataset getDataset()
This method returns a reference to the dataset object to which this record belongs.

getNumValue

public int getNumValue()
This method returns the number of values in the record.

getValue

public SubValue getValue(int value)
This method returns a reference to the object representing an individual value.

getNumAttr

public int getNumAttr()
This method returns the number of attributes in the record.

findValue

public SubValue findValue(java.lang.String fieldName)
This method finds the object representing the value of the specified field, and returns a reference to it.

getAttr

public SubValue getAttr(int attr)
This method returns a reference to the object representing an individual attribute.

findAttr

public SubValue findAttr(char cAttr)
This method finds the object representing the value of the specified attribute, and returns a reference to it. The following attributes are currently supported for locally published records:

  • U (user name)
  • H (host name)
  • A (host IP address)

  • getSchema

    public SubSchema getSchema()
    This method returns a reference to the object representing the schema used by the object. A null value indicates that the object is free-format, and does not used a schema.

    getState

    public int getState()
    This method returns the current state of the record. The following values are currently implemented:

  • RECORDSTATE_VALID
  • RECORDSTATE_OUTOFDATE
  • RECORDSTATE_NOTPERMITTED

  • getTimestamp

    public java.util.Date getTimestamp()
    This method returns the timestamp of the most recent update to the record.