javatools.db.util
Class TableStructureCatcher

java.lang.Object
  |
  +--javatools.util.ScriptCatcher
        |
        +--javatools.db.util.TableStructureCatcher

public class TableStructureCatcher
extends ScriptCatcher

Retrieves a table's structure.


Constructor Summary
TableStructureCatcher()
          Creates new TableStructureCatcher
 
Method Summary
 java.lang.Object[] getDefaultValues()
          Returns the default values array.
 int[] getDisplaySize()
          Returns the display sizes array.
 java.lang.String[] getNames()
          Returns the names array.
 int[] getTypes()
          Returns the types array.
 void loadScript(java.lang.String fileName)
          Loads a script file to get info for a table.
 void saveScript(java.lang.String fileName)
          Saves collected values into a script file.
 void setArrays(java.lang.String[] pNames, int[] pTypes, int[] pDisplaySize, java.lang.Object[] pDefaultValues)
          Sets the references for the arrays of DbFixedAbstractTable objects.
 
Methods inherited from class javatools.util.ScriptCatcher
addCommand, clear, constructCommands, getCommandList, getCommands, getCommandText, getCommentdelimiter, getDivideCommandChar, getNumCommands, getRemoveFormat, getStringDelimiterChar, iterator, removeComments, removeSpaces, setCommandText, setCommentDelimiter, setDivideCommandChar, setNumCommands, setRemoveFormat, setStringDelimiterChar, textFile2String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableStructureCatcher

public TableStructureCatcher()
Creates new TableStructureCatcher

Method Detail

setArrays

public void setArrays(java.lang.String[] pNames,
                      int[] pTypes,
                      int[] pDisplaySize,
                      java.lang.Object[] pDefaultValues)
Sets the references for the arrays of DbFixedAbstractTable objects.

Parameters:
pNames - The array of names.
pTypes - The array of types.
pDisplaySize - The array of display sizes.
pDefaultValues - The array of default values.

getNames

public java.lang.String[] getNames()
Returns the names array.

Returns:
The names array.

getTypes

public int[] getTypes()
Returns the types array.

Returns:
The types array.

getDisplaySize

public int[] getDisplaySize()
Returns the display sizes array.

Returns:
The display sizes array.

getDefaultValues

public java.lang.Object[] getDefaultValues()
Returns the default values array.

Returns:
The default values array.

saveScript

public void saveScript(java.lang.String fileName)
                throws java.io.IOException
Saves collected values into a script file.

Overrides:
saveScript in class ScriptCatcher
Parameters:
fileName - The filename.
Throws:
java.io.IOException - If something goes wrong.

loadScript

public void loadScript(java.lang.String fileName)
                throws java.io.FileNotFoundException
Loads a script file to get info for a table.

Overrides:
loadScript in class ScriptCatcher
Parameters:
fileName - The file name of the file to load.
Throws:
java.io.FileNotFoundException - If something goes wrong.