public class Result extends Object
Unlike an exception, an Result can be used to reflect a much more detailed set of information back to a calling routine. It is especially useful for interfaces that involve interaction with a user. When used in conjunction with the ResultSet class, this class can be used to send back several error or warning indications based on a single call to a routine.
ResultSet| Modifier and Type | Field and Description |
|---|---|
static int |
CAT_COMMS
Indicates that the response is related to communications.
|
static int |
CAT_DATABASE
Indicates that the response is related to the database.
|
static int |
CAT_OPERATIONAL
Indicates that the response is related to an operation.
|
static int |
CAT_SECURITY
Indicates that the response is related to security.
|
static int |
CAT_SOFTWARE
Indicates that the response is related to software.
|
static int |
ERROR
Indicates that a definite error has occurred; proceed at your own risk!
|
static int |
FATAL
Indicates that the error is so serious that you should cease whatever
operation you're performing.
|
static int |
INFO
Indicates that the result is merely informational; nothing serious.
|
static int |
NONE
Indicates that no severity information has been set.
|
static int |
WARNING
Indicates that a problem was encountered but it's just a warning.
|
| Constructor and Description |
|---|
Result(Result r)
Creates a new RResult container from an existing one.
|
| Modifier and Type | Method and Description |
|---|---|
String |
attrName()
Returns the attribute name.
|
void |
attrName(String s)
Sets the attribute name.
|
int |
category()
Returns the category.
|
void |
category(int c)
Sets the category.
|
String |
fileName()
Returns the file name.
|
void |
fileName(String s)
Sets the file name.
|
int |
lineNumber()
Returns the line number.
|
void |
lineNumber(int i)
Sets the line number.
|
String |
message()
Returns the message text.
|
void |
message(String s)
Sets the message text.
|
ArrayList<StringBuffer> |
moreMessages()
Returns the additional message text as an ArrayList of StringBuffers.
|
void |
moreMessages(String s)
Adds additional message text to the result.
|
int |
nearLineNumber()
Returns the approximate line number.
|
void |
nearLineNumber(int i)
Sets the approximate line number.
|
void |
reset()
Resets the result to contain no information.
|
void |
reset(int sev,
String txt)
Resets the result to the specified severity with the specified text.
|
int |
severity()
Returns the severity.
|
void |
severity(int s)
Sets the severity.
|
String |
toString()
Returns the result as a nicely formatted string.
|
int |
uniqueID()
Returns the unique message identifier.
|
void |
uniqueID(int i)
Sets the unique message identifier.
|
public static final int NONE
public static final int INFO
public static final int WARNING
public static final int ERROR
public static final int FATAL
public static final int CAT_SOFTWARE
public static final int CAT_SECURITY
public static final int CAT_DATABASE
public static final int CAT_COMMS
public static final int CAT_OPERATIONAL
public Result(Result r)
public void reset()
public void reset(int sev,
String txt)
public int severity()
public int category()
public void severity(int s)
public void category(int c)
public String message()
public void message(String s)
public ArrayList<StringBuffer> moreMessages()
public void moreMessages(String s)
public String fileName()
public void fileName(String s)
public int lineNumber()
public void lineNumber(int i)
public int nearLineNumber()
public void nearLineNumber(int i)
public String attrName()
public void attrName(String s)
public int uniqueID()
public void uniqueID(int i)
Copyright © 2023. All rights reserved.