com.ibm.connector2.hod.screenable
Class J2HODScreenableRecord

java.lang.Object
  |
  +--com.ibm.connector2.hod.screenable.J2HODScreenableRecord
All Implemented Interfaces:
java.lang.Cloneable, com.ibm.connector2.screen.IScreenable, javax.resource.cci.Record, java.io.Serializable

public class J2HODScreenableRecord
extends java.lang.Object
implements com.ibm.connector2.screen.IScreenable, javax.resource.cci.Record

This class represents a record of a screen. It implements Screenable interface which is the main difference from J2HODScreenRecord. This class is to be used with new CAB tooling which supports Screenable interface. This class should not be mixed with J2HODScreenRecord when passing as parameters in execute() method. User must call beginBuild() to starting building a screen record then call buildField() methods to build fields for this screen record. To end the building process of this screen record, endBuild() method must be called. The following attributes information are available:

Name Type Default Value Description
recordName String J2HODScreenableRecord Record name of this screen
description String "Screenable Record for HOD J2C" Description of this screen record
screenId String "" ID of this screen
depth int 24 Depth of screen (number of rows)
width int 80 Width of screen (number of columns)
screenSize int Size of this screen 24*80 (depth*width)
fieldCount int Total current number of fields in this screen record 0
fullRefresh boolean Determines whether to build a screen with full-refresh or just update existing fields false
fields Vector A vector containing fields of this screen record
screenInfo J2HODScreenInfo see J2HODScreenInfo for its associated default attribute values

See Also:
Serialized Form

Constructor Summary
J2HODScreenableRecord()
          Constructs an instance of J2HODScreenableRecord with default attribute values
 
Method Summary
 void beginBuild(com.ibm.connector2.screen.IScreenInfo scrInfo, boolean fullRefresh)
          Indicate a start of a field build process, by providing information about a screen.
 void buildField(com.ibm.connector2.screen.IFieldData fieldData, com.ibm.connector2.screen.IFieldAttrInfo fieldAttrs, com.ibm.connector2.screen.ITextAttrInfo textAttrs)
          Adds a field to screen record.
 java.lang.Object clone()
          Clones current screen record.
 void endBuild()
          Indicate an end of the field build process.
 boolean equals(java.lang.Object obj)
          Compares two objects for equality.
 J2HODFieldRecord getField(int index)
          Returns a field record at specified index number
 J2HODFieldRecord getField(java.lang.String name)
          Returns a field record with specified name
 int getFieldCount()
          Returns a number of total field count
 java.util.Iterator getFields()
          Returns an iterator for fields contained in screen record.
 java.util.Iterator getModifiedFields()
          Returns an iterator for modified fields in screen record.
 java.lang.String getRecordName()
          Gets a screen record name.
 java.lang.String getRecordShortDescription()
          Gets a short screen record description.
 int getScreenDepth()
          Returns screen depth number
 java.lang.String getScreenId()
          Returns screen record ID.
 J2HODScreenInfo getScreenInfo()
          Returns a ScreenInfo instance that is passed in when beginBuild was called
 int getScreenWidth()
          Returns screen width number
 int hashCode()
          Generates a hash code for receiver.
 void setRecordName(java.lang.String name)
          Sets a screen record name.
 void setRecordShortDescription(java.lang.String desc)
          Sets a short description of a screen record.
 void setScreenId(java.lang.String val)
          Set screen ID.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J2HODScreenableRecord

public J2HODScreenableRecord()
Constructs an instance of J2HODScreenableRecord with default attribute values
Method Detail

beginBuild

public void beginBuild(com.ibm.connector2.screen.IScreenInfo scrInfo,
                       boolean fullRefresh)
Indicate a start of a field build process, by providing information about a screen. fullRefresh indicates that the resource adapter will provide all the information about the screen so a record should clear appropriate information as it will be fully refreshed. [A part of Screenable interface]
Specified by:
beginBuild in interface com.ibm.connector2.screen.IScreenable
Parameters:
scrInfo - com.ibm.connector2.screen.IScreenInfo - screen information
fullRefresh - boolean - do a full refresh or just update existing fields

buildField

public void buildField(com.ibm.connector2.screen.IFieldData fieldData,
                       com.ibm.connector2.screen.IFieldAttrInfo fieldAttrs,
                       com.ibm.connector2.screen.ITextAttrInfo textAttrs)
                throws com.ibm.connector2.screen.ScreenException
Adds a field to screen record. [A part of Screenable interface]
Specified by:
buildField in interface com.ibm.connector2.screen.IScreenable
Parameters:
iFieldData - com.ibm.connector2.screen.IFieldData - field data
iFieldAttrInfo - com.ibm.connector2.screen.IFieldAttrInfo - field attributes
iTextAttrInfo - com.ibm.connector2.screen.ITextAttrInfo - field text attributes
Throws:
com.ibm.connector2.screen.ScreenException - - generic screenable record exception

endBuild

public void endBuild()
Indicate an end of the field build process. [A part of Screenable interface]
Specified by:
endBuild in interface com.ibm.connector2.screen.IScreenable

getScreenId

public java.lang.String getScreenId()
Returns screen record ID. [A part of Screenable interface]
Specified by:
getScreenId in interface com.ibm.connector2.screen.IScreenable
Returns:
String

setScreenId

public void setScreenId(java.lang.String val)
Set screen ID. [A part of Screenable interface]
Specified by:
setScreenId in interface com.ibm.connector2.screen.IScreenable
Parameters:
val - String - screen ID
Returns:
String

getFields

public java.util.Iterator getFields()
Returns an iterator for fields contained in screen record. [A part of Screenable interface]
Specified by:
getFields in interface com.ibm.connector2.screen.IScreenable
Returns:
java.util.Iterator

getModifiedFields

public java.util.Iterator getModifiedFields()
Returns an iterator for modified fields in screen record. [A part of Screenable interface]
Specified by:
getModifiedFields in interface com.ibm.connector2.screen.IScreenable
Returns:
java.util.Iterator

clone

public java.lang.Object clone()
Clones current screen record.
Specified by:
clone in interface javax.resource.cci.Record
Returns:
java.lang.Object - newly cloned J2HODScreenRecord

equals

public boolean equals(java.lang.Object obj)
Compares two objects for equality. Returns a boolean which indicates whether this object is equivalent to the specified object. This method is used when an object is stored in a hashtable.
Specified by:
equals in interface javax.resource.cci.Record
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object - an Object to compare with
Returns:
boolean - true if comparing objects are equal; false otherwise.

getRecordName

public java.lang.String getRecordName()
Gets a screen record name.
Specified by:
getRecordName in interface javax.resource.cci.Record
Returns:
String

getRecordShortDescription

public java.lang.String getRecordShortDescription()
Gets a short screen record description.
Specified by:
getRecordShortDescription in interface javax.resource.cci.Record
Returns:
String

hashCode

public int hashCode()
Generates a hash code for receiver. This method is supported primarily for hash tables, such as those provided in java.util.
Specified by:
hashCode in interface javax.resource.cci.Record
Overrides:
hashCode in class java.lang.Object
Returns:
int - an integer hash code

setRecordName

public void setRecordName(java.lang.String name)
Sets a screen record name.
Specified by:
setRecordName in interface javax.resource.cci.Record
Parameters:
name - String - recordName

setRecordShortDescription

public void setRecordShortDescription(java.lang.String desc)
Sets a short description of a screen record.
Specified by:
setRecordShortDescription in interface javax.resource.cci.Record
Parameters:
desc - String - description

getField

public J2HODFieldRecord getField(int index)
                          throws com.ibm.connector2.screen.ScreenException
Returns a field record at specified index number
Parameters:
index - int - field record vector index (must be greater than 1)
Returns:
J2HODFieldRecord
Throws:
com.ibm.connector2.screen.ScreenException -  

getField

public J2HODFieldRecord getField(java.lang.String name)
                          throws com.ibm.connector2.screen.ScreenException
Returns a field record with specified name
Parameters:
name - java.lang.String
Returns:
com.ibm.connector2.screen.IFieldRecord
Throws:
com.ibm.connector2.screen.ScreenException -  

getFieldCount

public int getFieldCount()
Returns a number of total field count
Returns:
int

getScreenDepth

public int getScreenDepth()
Returns screen depth number
Returns:
int

getScreenWidth

public int getScreenWidth()
Returns screen width number
Returns:
int

getScreenInfo

public J2HODScreenInfo getScreenInfo()
Returns a ScreenInfo instance that is passed in when beginBuild was called
Returns:
J2HODScreenInfo
See Also:
J2HODScreenInfo