|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.jmessage.Message jsim.jmessage.Result
public class Result
The Result class is a JSIM message type representing the query result returned by the DBAgent. It may contain a simple message indicating if the query is successful or not. Or it may encapsulate a Java ResultSet object. In the former case, the action type would be "Information". In the latter case, the action type would be either "Sequence number" or "Normal result".
Field Summary |
---|
Fields inherited from class jsim.jmessage.Message |
---|
actionType |
Constructor Summary | |
---|---|
Result(java.lang.String actionType,
java.sql.ResultSet rs)
Constructs a Result instance by action type and a ResultSet object. |
|
Result(java.lang.String actionType,
java.lang.String info)
Constructs a Result instance by action type and information. |
Method Summary | |
---|---|
int |
getColumnCount()
Returns the number of columns. |
java.lang.String[] |
getColumnLabels()
Returns the number of rows. |
java.lang.String |
getInfo()
Returns the information/message. |
int |
getRowCount()
Returns the number of rows. |
java.lang.Object[][] |
getValue()
Returns the value array. |
void |
print()
Prints out the information or query result for debugging purposes. |
void |
readObject(java.io.ObjectInputStream in)
Meets the Java serialization requirements. |
java.lang.String |
toString()
Returns an XML fragment representing this instance of Result. |
void |
writeObject(java.io.ObjectOutputStream out)
Meets the Java serialization requirements. |
Methods inherited from class jsim.jmessage.Message |
---|
getActionType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Result(java.lang.String actionType, java.lang.String info)
actionType
- The type of resultinfo
- The messagepublic Result(java.lang.String actionType, java.sql.ResultSet rs) throws java.sql.SQLException
actionType
- The result typers
- The ResultSet object
java.sql.SQLException
Method Detail |
---|
public int getColumnCount()
public int getRowCount()
public java.lang.String[] getColumnLabels()
public java.lang.Object[][] getValue()
public java.lang.String getInfo()
public void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
out
- The ObjectOutputStream
java.io.IOException
public void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- The ObjectInputStream
java.io.IOException,
- java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |