Methods Summary |
---|
public void | addTableModelListener(javax.swing.event.TableModelListener listener)
|
public void | billCreditCard(oreilly.hcj.bankdata.Customer customer)demo method.
if (customer == null) {
throw new NullPointerException();
}
System.err.println(customer);
|
public void | doOrderProcessing()demo method.
|
public java.lang.Class | getColumnClass(int column)
return null;
|
public int | getColumnCount()
return 0;
|
public java.lang.String | getColumnName(int column)
return null;
|
public int | getRowCount()
return 0;
|
public java.lang.String | getSomeProperty()Getter for the property someProperty.
return someProperty;
|
public java.lang.Object | getValueAt(int row, int column)
return null;
|
public boolean | isCellEditable(int row, int column)
return false;
|
public int | loadData(java.sql.Connection conn, java.lang.String sql)Gets data from the the database and caches it for the table model.
int result = 0;
Statement stmt = null;
ResultSet rs = null;
Object[] record = null;
this.data = new ArrayList();
try {
this.sql = sql;
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
int idx = 0;
int columnCount = rs.getMetaData()
.getColumnCount();
while (rs.next()) {
record = new Object[columnCount];
for (idx = 0; idx < columnCount; idx++) {
record[idx] = rs.getObject(idx);
}
data.add(record);
}
} finally {
if (rs != null) {
rs.close();
}
if (stmt != null) {
stmt.close();
}
}
return result;
|
public int | loadData2(java.sql.Connection conn, java.lang.String sql)Gets data from the the database and caches it for the table model.
int result = 0;
Statement stmt = null;
ResultSet rs = null;
Object[] record = null;
ArrayList temp = new ArrayList();
try {
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
int idx = 0;
int columnCount = rs.getMetaData()
.getColumnCount();
while (rs.next()) {
record = new Object[columnCount];
for (idx = 0; idx < columnCount; idx++) {
record[idx] = rs.getObject(idx);
}
temp.add(record);
}
} finally {
if (rs != null) {
rs.close();
}
if (stmt != null) {
stmt.close();
}
}
this.data = temp;
this.sql = sql;
return result;
|
public void | processOrder(java.lang.Object order, oreilly.hcj.bankdata.Customer customer)Processes an order.
this.processedOrders.add(order);
doOrderProcessing();
billCreditCard(customer);
|
public void | refresh(java.sql.Connection conn)Refreshes the data in the model using the existing SQL.
loadData(conn, this.sql);
|
public void | removeTableModelListener(javax.swing.event.TableModelListener arg0)
|
public void | setSomeProperty(java.lang.String someProperty)Setter for the property someProperty.
final String oldSomeProperty = this.someProperty;
this.someProperty = someProperty;
propertyChangeSupport.firePropertyChange("someProperty", oldSomeProperty,
someProperty);
|
public void | setSomeProperty2(java.lang.String someProperty)Setter for the property someProperty.
final String oldSomeProperty = this.someProperty;
this.someProperty = someProperty;
try {
propertyChangeSupport.firePropertyChange("someProperty", oldSomeProperty,
someProperty);
} catch (final Exception ex) {
LOGGER.error("Exception in Listener", ex);
}
|
public void | setValueAt(java.lang.Object value, int row, int column)
|