|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.mdm.index.query.AttributesData
The AttributesData class provides access to the data returned from a generated SQL query through the value object assembler methods (such as those in the classes that implement the ResultObjectAssembler interface). AttributesData is a wrapper for the java.sql.ResultSet class, and is passed by the QueryResultSet class to the result object assembler so the assembler can retrieve the data from the JDBC result set.
| Constructor Summary | |
(package private) |
AttributesData(java.sql.ResultSet res,
java.lang.String[] attributes,
int relativeIndex)
Creates a new instance of the AttributesData class. |
| Method Summary | |
java.lang.Object |
get(int index)
Retrieves the information an attribute returned by the Query Manager at the specified position (the ith index). |
java.lang.Object |
get(java.lang.String name)
Retrieves the information for an attribute returned by the Query Manager using the name of the attribute. |
java.lang.String[] |
getAttributeNames()
Retrieves the attribute names in the current instance of the AttributesData class, calling ResultSet methods to retrieve the data. |
(package private) void |
setAttributeNames(java.lang.String[] attributeNames)
Sets the attribute names in the current instance of the AttributesData class. |
int |
size()
Retrieves a count of the attribute names in the current instance of the AttributesData class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
AttributesData(java.sql.ResultSet res,
java.lang.String[] attributes,
int relativeIndex)
res - The JDBC results of a SQL query.attributes - The attributes of the JDBC results set.relativeIndex - The position of the attributes data object.
| Method Detail |
public java.lang.Object get(int index)
throws java.sql.SQLException
index - The index of the attribute value.
Object - The corresponding object for the ith
index.
java.sql.SQLException - Thrown if an error occurs while retrieving the attribute
data.
public java.lang.Object get(java.lang.String name)
throws java.sql.SQLException
name - The name of the attribute to retrieve.
Object - The data corresponding to the attribute name.
java.sql.SQLException - Thrown if an error occurs while retrieving the attribute
data.public java.lang.String[] getAttributeNames()
String[] - An array of attribute names.
void setAttributeNames(java.lang.String[] attributeNames)
attributeNames - A list of attribute names.
void - None.
public int size()
int - The number of attribute names.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Sun Microsystems, Inc.