|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wrq.apptrieve.appconn.AppConnRecordSet
public class AppConnRecordSet
An AppConnRecordSet contains data and metadata from a recordset or table. If an
AppConnRecordSet is returned from AppConnModel.fetchRecords(int, java.util.List, java.lang.String)
, then it contains
AppConnModelRecord
records. If the AppconnRecordSet is return from AppConnTable.performTableProcedure(java.lang.String, java.lang.String, java.util.Map, java.util.Map, boolean, java.util.List, int)
or AppConnTable.executeSQLStatement(java.lang.String)
, then it contains AppConnRecord
records.
Constructor Summary | |
---|---|
AppConnRecordSet()
Constructor for internal use only. |
Method Summary | |
---|---|
void |
fromXMLString(java.lang.String xmlString)
Converts from an XML String to an AppConnRecordSet. |
AppConnRecord |
get(int recordNumber)
Gets a record of the record set. |
int |
getCount()
Gets the number of records in the record set. |
AppConnMetaData |
getElementMetaDataByIndex(int elementIndex)
Returns the metadata object for a indexed element in the record set. |
AppConnMetaData |
getElementMetaDataByName(java.lang.String elementName)
Returns the metadata object for a named element in the record set. |
java.util.List |
getElementsMetaData()
Returns the metadata for all elements in the record set. |
java.util.Locale |
getLocale()
Gets the locale for the AppConnRecordSet. |
int |
getNumElements()
Gets the number of elements in a record of the record set. |
java.util.List |
getRecords()
Gets all of the records in the record set. |
int |
getRecordType()
Gets the type of records store in this record set object. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this AppConnRecordSet. |
java.lang.String |
toString()
Converts AppConnRecordSet to a string. |
java.lang.String |
toXMLString()
Converts AppConnRecordSet to an XML string. |
java.lang.String |
toXMLString(java.net.URL urlDTD)
Converts AppConnRecordSet to an XML string, according to a specified DTD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AppConnRecordSet()
Method Detail |
---|
public void fromXMLString(java.lang.String xmlString) throws ApptrieveException
Example XML string: <appconn><recordset><record> <column name="LastName">Smith</column></record><recordset></appconn>
xmlString
- java.lang.String - The XML string to convert
ApptrieveException
- - if a conversion error occurstoXMLString()
public AppConnRecord get(int recordNumber)
recordNumber
- int - The 0-based record number to get
List.get(int)
public int getCount()
public java.util.List getElementsMetaData()
FieldMetaData
or ColumnMetaData
depending on the type of records
contained in the record set.public AppConnMetaData getElementMetaDataByIndex(int elementIndex)
elementIndex
- int - The 0-based index of the element
FieldMetaData
or ColumnMetaData
object
depending on the type of records contained in the record set.public AppConnMetaData getElementMetaDataByName(java.lang.String elementName)
elementName
- String - The name of the element (field or column)
FieldMetaData
or ColumnMetaData
object
depending on the type of records contained in the record set.public java.util.Locale getLocale()
setLocale(java.util.Locale)
public int getNumElements()
These are the columns or fields of the record, depending upon the type of records stored in the recordset.
public java.util.List getRecords()
The returned object is an object that implements the java.util.List interface. Each element of the list is a record of the record set, AppConnRecord objects if the record was generated from an AppConnTable interface method or AppConnModelRecord objects if the record set was generated from an AppConnModel interface method.
public int getRecordType()
public void setLocale(java.util.Locale locale) throws ApptrieveException
locale
- Locale - the Locale to use in the AppConnRecordSet.
ApptrieveException
- - if locale is nullgetLocale()
public java.lang.String toString()
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.
toString
in class java.lang.Object
public java.lang.String toXMLString() throws ApptrieveException
ApptrieveException
- - if a conversion error occursfromXMLString(java.lang.String)
public java.lang.String toXMLString(java.net.URL urlDTD) throws ApptrieveException
Example XML output: <appconn><recordset><record> <attribute name="LastName">Smith</attribute></record><recordset></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.
urlDTD
- a DTD URL that will be embedded in the generated XML string
ApptrieveException
- - if a conversion error occurstoXMLString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |