Class SaleDM
data_management.SaleDM All Implemented Interfaces:
public class SaleDM
Author: |
TogetherSoft |
robustness: |
Entity |
subtitle: |
(The database) |
Field Summary |
private static final String[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
Constructor Summary |
SaleDM(DMServer dmServer)Constructor must be passed the Server instance. |
Method Summary |
|
getAll()This retrieves all of the cash sales in the database :=) |
|
|
|
getList()This represents the "shallow retrieve." |
|
insert(Object obj)I'd prefer it if this was protected... |
|
removeIllegalChars(String string)Helper function to strip chars from currency input widget. |
|
|
|
update(Object obj)I'd prefer it if this was protected, but it is part of the interface... |
Field Detail
columnNames
private static final String[] columnNames = new String[]
{
"ID",
"SaleTime",
"Subtotal",
"Tax"
}
insertableColumns
static final String[] insertableColumns = new String[]
{
"ID",
"SaleTime",
"Subtotal",
"Tax"
}
updatableColumns
static final String[] updatableColumns = new String[]
{
"SaleTime",
"Subtotal",
"Tax"
}
dmServer
dateFormat
SimpleDateFormat dateFormat = null
currencyFormat
NumberFormat currencyFormat = NumberFormat.getCurrencyInstance()
numberFormat
NumberFormat numberFormat
Constructor Detail
SaleDM
Constructor must be passed the Server instance.
Method Detail
insert
public void insert(Object obj)
throws SQLException
I'd prefer it if this was protected...
Specified by:
update
public void update(Object obj)
throws SQLException
I'd prefer it if this was protected, but it is part of the interface...
Specified by:
getList
public Vector getList()
throws SQLException
This represents the "shallow retrieve." That is, the ability to return
just the ID and Name of an object. Useful for browsing, or for pick
lists. (A technique to avoid a deep retrieve of all objects,
fully-formed, which could be quite expensive in terms of performance
and using potentially scarce DBMS resources.)
Specified by:
getAll
public Vector getAll()
throws SQLException
This retrieves all of the cash sales in the database :=)
note: |
someday, we'll add some date "range" clauses. |
Specified by:
save
public void save(Object obj)
throws SQLException
Specified by:
getData
Specified by:
Overrides:
removeIllegalChars
private String removeIllegalChars(String string)
Helper function to strip chars from currency input widget.