JavaXT
|
|
Record ClassUsed to represent a record returned from a SQL query
ConstructorsThere are no public constructors.Public MethodsgetFields( ) returns Field[] Used to retrieve the an array of fields in the current record. getField( String name ) returns Field Returns a specific field in the array of fields. Returns null if the field name is not found. getField( int i ) returns Field Returns a specific field in the array of fields. Returns null if the index is out of range. get( String fieldName ) returns Value Returns the Value associated with a given field. Note the if the field doesn't exist in the result set, the method will return still return a Value. You can use the isNull() method on the Value to determine whether the value is null. get( int i ) returns Value Returns the Value associated with a given field. Note the if the field doesn't exist in the result set, the method will return still return a Value. You can use the isNull() method on the Value to determine whether the value is null. isDirty( ) returns boolean Returns true if any of the fields have been modified. You can find which field has been modified using the Field.isDirty() method. Example:
if (record.isDirty()){ for (javaxt.sql.Field field : record.getFields()){ if (field.isDirty()){ String val = field.getValue().toString(); System.out.println(field.getName() + ": " + val); } } } |