com.wrq.apptrieve.appconn
Class AppConnRecord

java.lang.Object
  extended by com.wrq.apptrieve.appconn.AppConnRecord
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AppConnModelRecord

public class AppConnRecord
extends java.lang.Object
implements java.io.Serializable

This class holds a single row of table data.

See Also:
AppConnRecordSet, AppConnTable.performTableProcedure(java.lang.String, java.lang.String, java.util.Map, java.util.Map, boolean, java.util.List, int), AppConnTable.executeSQLStatement(java.lang.String), Serialized Form

Field Summary
protected  java.util.ResourceBundle doEngBundle
          Internal use only.
protected  java.util.ResourceBundle doLocBundle
          Internal use only.
protected  com.wrq.apptrieve.agent.Row elements
          Internal use only.
static int RECORD_TYPE_MODEL
          Return value from getRecordType() when object is an AppConnModelRecord.
static int RECORD_TYPE_TABLE
          Return value from getRecordType() when object is an AppConnRecord.
protected  java.util.Locale recordLocale
          Internal use only.
protected  int recordType
          Internal use only.
 
Constructor Summary
AppConnRecord()
          Constructor for internal use only.
 
Method Summary
protected  void finalize()
           
 void fromXMLString(java.lang.String xmlString)
          Converts from an XML String to an AppConnRecord.
 java.lang.String get(java.lang.String elementName)
          Returns the value to for the specified element in this AppConnRecord.
 java.lang.String getByIndex(int index)
          Returns the value to for the specified element in this AppConnRecord.
 int getCount()
          Returns the number of elements in the record.
 java.util.List getElementNames()
          Returns a list of the element names in this record.
 java.util.Map getElements()
          Gets the elements in this object as key-value pairs in an object that implements the Map interface.
 java.util.List getElementValues()
          Returns a list of the values in this record.
 java.util.Locale getLocale()
          Gets the locale for the AppConnRecord.
 int getRecordType()
          Gets the type of record.
 void setLocale(java.util.Locale locale)
          Sets the locale for this AppConnRecord.
 java.lang.String toString()
          Converts AppConnRecord to a String.
 java.lang.String toXMLString()
          Converts AppConnRecord to an XML String.
 java.lang.String toXMLString(java.net.URL urlDTD)
          Converts AppConnRecord to an XML String.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

recordLocale

protected java.util.Locale recordLocale
Internal use only.


elements

protected com.wrq.apptrieve.agent.Row elements
Internal use only.


doEngBundle

protected java.util.ResourceBundle doEngBundle
Internal use only.


doLocBundle

protected java.util.ResourceBundle doLocBundle
Internal use only.


recordType

protected int recordType
Internal use only.


RECORD_TYPE_MODEL

public static final int RECORD_TYPE_MODEL
Return value from getRecordType() when object is an AppConnModelRecord.

See Also:
Constant Field Values

RECORD_TYPE_TABLE

public static final int RECORD_TYPE_TABLE
Return value from getRecordType() when object is an AppConnRecord.

See Also:
Constant Field Values
Constructor Detail

AppConnRecord

public AppConnRecord()
Constructor for internal use only.

Method Detail

finalize

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

fromXMLString

public void fromXMLString(java.lang.String xmlString)
                   throws ApptrieveException
Converts from an XML String to an AppConnRecord.

Example XML string for an AppConnRecord: <appconn><record><column name="LastName">Smith</column> </record></appconn>

Example XML string for an AppConnModelRecord: <appconn><modelrecord><column name="LastName">Smith</column> </modelrecord></appconn>

Parameters:
xmlString - The XML string to convert
Throws:
ApptrieveException - - if a conversion error occurs
See Also:
toXMLString()

get

public java.lang.String get(java.lang.String elementName)
                     throws AppConnException
Returns the value to for the specified element in this AppConnRecord.

Parameters:
elementName - java.lang.String - the name of an element in the AppConnRecord.
Returns:
java.lang.String the value of the element specified
Throws:
AppConnException - - if the requested element does not exist

getByIndex

public java.lang.String getByIndex(int index)
Returns the value to for the specified element in this AppConnRecord.

Parameters:
index - the index of an element in the AppConnRecord.
Returns:
java.lang.String - the value for the index specified

getCount

public int getCount()
Returns the number of elements in the record.

Returns:
int - the number of elements in the record.

getElements

public java.util.Map getElements()
Gets the elements in this object as key-value pairs in an object that implements the Map interface.

Returns:
java.util.Map - each item in the Map is a String object that is the value of an element in the AppConnRecord

getElementNames

public java.util.List getElementNames()
Returns a list of the element names in this record.

Returns:
java.util.List - a list containing String objects, for each element name

getElementValues

public java.util.List getElementValues()
Returns a list of the values in this record.

Returns:
java.util.List - a list containing String objects, one for each element value

getLocale

public java.util.Locale getLocale()
Gets the locale for the AppConnRecord.

Returns:
Locale - the current locale.
See Also:
setLocale(java.util.Locale)

getRecordType

public int getRecordType()
Gets the type of record.

Returns:
int - the type of this record

setLocale

public void setLocale(java.util.Locale locale)
               throws AppConnException
Sets the locale for this AppConnRecord.

Parameters:
locale - Locale - the Locale to use in the AppConnRecord.
Throws:
AppConnException - - if a parameter error occurs
See Also:
getLocale()

toString

public java.lang.String toString()
Converts AppConnRecord to a String.

Note: This method requires that xercesImpl.jar and xmlParserAPIs.jar are present in the classpath. The JRE supplied with VHI supplies these added jars in the lib/endorsed directory, but they are not present by default.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

toXMLString

public java.lang.String toXMLString()
                             throws ApptrieveException
Converts AppConnRecord to an XML String.

Example XML output: <appconn><modelrecord><attribute name="LastName">Smith</attribute> </modelrecord></appconn>

Note: This method requires that xercesImpl.jar and xmlParserAPIs.jar are present in the classpath. The JRE supplied with VHI supplies these added jars in the lib/endorsed directory, but they are not present by default.

Returns:
java.lang.String
Throws:
ApptrieveException - - if a conversion error occurs
See Also:
fromXMLString(java.lang.String)

toXMLString

public java.lang.String toXMLString(java.net.URL urlDTD)
                             throws ApptrieveException
Converts AppConnRecord to an XML String.

Note: This method requires that xercesImpl.jar and xmlParserAPIs.jar are present in the classpath. The JRE supplied with VHI supplies these added jars in the lib/endorsed directory, but they are not present by default.

Parameters:
urlDTD - URL - the URL for the DTD to use during conversion
Returns:
java.lang.String
Throws:
ApptrieveException - - if a conversion error occurs
See Also:
fromXMLString(java.lang.String)