All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.blueworld.lasso.LassoResponse

java.lang.Object
   |
   +----com.blueworld.lasso.LassoResponse

public class LassoResponse
extends Object
Response object for LassoProxy.

While not currently enforced, all public attributes should be treated as read-only.

Lasso responses are normally created by LassoProxy methods; you should never have any need to use a LassoResponse directly.

The toString() method displays the raw response string returned from Lasso. This can be useful for debugging.


Variable Index

BAD_DATA_SUPPLIED
BOOLEAN
CHAR
CONNECTION_INVALID
DATE_TIME
FLOAT
IMAGE
INTEGER
MEMORY_FULL
NO_SUCH_OBJECT
NOERROR
NONE
REQUIRED_FIELD_MISSING
SHORT_FLOAT
SHORT_INTEGER
TIMEOUT

LassoResponse(String)
Constructs a response given a response string.

fieldData(int, int)
Returns the value for the specified field in the specified record.
fieldIndex(String)
Returns the index of a field by name.
fieldName(int)
Returns the name of the specified field.
fieldNames()
Returns an array of field names for the layout and database.
fieldNullsOK(int)
Returns true if the field can be empty, false otherwise.
fieldRepeats(int)
Returns true if the specified field is a repeating field, false otherwise.
fieldType(int)
Returns the type of the specified field.
fieldValue(int, int, int)
Returns a particular value from the specified field.
fieldValueList(int)
Returns the value list attached to the specified field.
hasValueList(String)
Returns true if the specified field has a value list attached to it, false otherwise.
numFields()
Returns the number of fields on the target layout in the target database.
numFound()
Returns the number of records which were found as a result of the previously processed request.
numRecords()
Returns the number of records which were retrieve as a result of the previously processed request.
numTotal()
Returns the total number of records in the targeted database.
recordData(int)
Returns all the fields and their values.
recordID(int)
Returns the record ID of the record specified by index.
repeatSize(int)
Returns the maximum number of repeat values for the specified field.
resultCode()
Returns the result code generated by Lasso when it processed the request.
toString()
Returns the original response string used to create the LassoResponse object.

Variables

NONE
 public static final int NONE
CHAR
 public static final int CHAR
SHORT_INTEGER
 public static final int SHORT_INTEGER
INTEGER
 public static final int INTEGER
SHORT_FLOAT
 public static final int SHORT_FLOAT
FLOAT
 public static final int FLOAT
IMAGE
 public static final int IMAGE
DATE_TIME
 public static final int DATE_TIME
BOOLEAN
 public static final int BOOLEAN
NOERROR
 public static final int NOERROR
CONNECTION_INVALID
 public static final int CONNECTION_INVALID
TIMEOUT
 public static final int TIMEOUT
BAD_DATA_SUPPLIED
 public static final int BAD_DATA_SUPPLIED
REQUIRED_FIELD_MISSING
 public static final int REQUIRED_FIELD_MISSING
MEMORY_FULL
 public static final int MEMORY_FULL
NO_SUCH_OBJECT
 public static final int NO_SUCH_OBJECT

 o LassoResponse
 public LassoResponse()
Constructs a response given a response string.

This is used only by the LassoProxy class.
Do not call this method without a properly formatted response string.

recordData
 public final String[][] recordData()
Returns all the fields and their values.

fieldData
 public final String[] fieldData()
Returns the value for the specified field in the specified record.

fieldValue
 public final String fieldValue()
Returns a particular value from the specified field.

numFound
 public int numFound()
Returns the number of records which were found as a result of the previously processed request.

numRecords
 public int numRecords()
Returns the number of records which were retrieve as a result of the previously processed request.

numTotal
 public int numTotal()
Returns the total number of records in the targeted database.

recordID
 public int recordID()
Returns the record ID of the record specified by index.

Indices are zero based.

numFields
 public int numFields()
Returns the number of fields on the target layout in the target database.

fieldNames
 public String[] fieldNames()
Returns an array of field names for the layout and database.

fieldName
 public String fieldName()
Returns the name of the specified field.

fieldRepeats
 public boolean fieldRepeats()
Returns true if the specified field is a repeating field, false otherwise.

repeatSize
 public int repeatSize()
Returns the maximum number of repeat values for the specified field.

fieldNullsOK
 public boolean fieldNullsOK()
Returns true if the field can be empty, false otherwise.

fieldValueList
 public String[] fieldValueList()
Returns the value list attached to the specified field.

resultCode
 public int resultCode()
Returns the result code generated by Lasso when it processed the request.

Possible values and their explanations can be found in the LassoResponse.java source file.

fieldIndex
 public int fieldIndex() throws FieldNotFoundException
Returns the index of a field by name.

This index can be used to retrieve information about the field in any of the methods which require a field index.

hasValueList
 public boolean hasValueList()
Returns true if the specified field has a value list attached to it, false otherwise.

fieldType
 public int fieldType()
Returns the type of the specified field.

Possible values are:

LassoRequest.BOOLEAN
LassoRequest.CHAR
LassoRequest.SHORT_INTEGER
LassoRequest.INTEGER
LassoRequest.SHORT_FLOAT
LassoRequest.FLOAT
LassoRequest.IMAGE
LassoRequest.DATE_TIME

toString
 public String toString()
Returns the original response string used to create the LassoResponse object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index