com.irisel.oms.guiom.tablemodel
Class InstanceSetTableModelFactory

java.lang.Object
  extended by com.irisel.oms.guiom.tablemodel.InstanceSetTableModelFactory

public final class InstanceSetTableModelFactory
extends java.lang.Object


Method Summary
 InstanceSetTableModel createTableModel(InstanceSet rs)
          Creates a table model by using the given InstanceSet.
 InstanceSetTableModel generateDefaultTableModel(InstanceSet is)
          Generates a TableModel that gets its contents filled from a InstanceSet.
static InstanceSetTableModelFactory getInstance()
          Returns the singleton instance of the factory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTableModel

public InstanceSetTableModel createTableModel(InstanceSet rs)
                                       throws GuiException
Creates a table model by using the given InstanceSet.

Parameters:
rs - the result set.
Returns:
a closeable table model.
Throws:
GuiException

generateDefaultTableModel

public InstanceSetTableModel generateDefaultTableModel(InstanceSet is)
                                                throws GuiException
Generates a TableModel that gets its contents filled from a InstanceSet. The column names of the InstanceSet will form the column names of the table model.

Hint: To customize the names of the columns, use the SQL column aliasing (done with SELECT nativecolumnname AS "JavaColumnName" FROM ....

Parameters:
rs - the result set.
Returns:
a closeable table model.
Throws:
GuiException

getInstance

public static InstanceSetTableModelFactory getInstance()
Returns the singleton instance of the factory.

Returns:
an instance of this factory.