org.opengts.dbtools
Class DBEdit

java.lang.Object
  extended by org.opengts.dbtools.DBEdit

public class DBEdit
extends java.lang.Object

DBEdit is used by a command-line tool to allow editing a table record.


Constructor Summary
DBEdit(DBRecord rcd)
          Constructor
DBEdit(DBRecordKey key)
          Constructor
 
Method Summary
protected  boolean _edit(boolean allFlds)
          Display edit session
 boolean edit()
          Display edit session
 boolean edit(boolean allFlds)
          Display edit session
 boolean editField(DBField fld)
          Edit the specified field
 void print(boolean allFlds)
          Displays editable fields to the console
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBEdit

public DBEdit(DBRecordKey key)
Constructor

Parameters:
key - The DBrecordKey to edit

DBEdit

public DBEdit(DBRecord rcd)
Constructor

Parameters:
rcd - The DBRecord to edit
Method Detail

print

public void print(boolean allFlds)
Displays editable fields to the console

Parameters:
allFlds - True to display all fields, false to show only editable fields

editField

public boolean editField(DBField fld)
                  throws java.io.IOException
Edit the specified field

Parameters:
fld - The field to edit
Returns:
True if the field was successfully edited
Throws:
java.io.IOException - if an I/O error occurs in input

edit

public boolean edit()
             throws java.io.IOException
Display edit session

Returns:
True if the edited record was saved
Throws:
java.io.IOException - if an I/O error occurs in input

edit

public boolean edit(boolean allFlds)
             throws java.io.IOException
Display edit session

Parameters:
allFlds - True to display/edit all fields, false to display/edit only editable fields
Returns:
True if the edited record was saved
Throws:
java.io.IOException - if an I/O error occurs in input

_edit

protected boolean _edit(boolean allFlds)
                 throws java.io.IOException
Display edit session

Parameters:
allFlds - True to display/edit all fields, false to display/edit only editable fields
Returns:
True if the edited record was saved
Throws:
java.io.IOException - if an I/O error occurs in input