package bank.server;
import imaginary.persist.PersistentSet;
import imaginary.persist.Transaction;
import java.util.Hashtable;
public class CustomerSetPeer extends imaginary.persist.DatabaseSetPeer {
public String getPersistentClass(Hashtable h) {
return "bank.server.Customer";
}
public String getSql(Hashtable h) {
if( h == null ) {
return "SELECT * from t_customer";
}
else {
int id = ((Integer)h.get("cust_id")).intValue();
return "SELECT * from t_customer WHERE cust_id = " + id;
}
}
}
|