package com.springbook;
import org.springframework.orm.hibernate.support.HibernateDaoSupport;
import java.util.List;
public class RentABikeAccounts extends HibernateDaoSupport implements Accounts {
public List getTxs() {
return getHibernateTemplate().find("from MonetaryTransaction");
}
public MonetaryTransaction getTx(int id) {
return (MonetaryTransaction)getHibernateTemplate().
load(MonetaryTransaction.class, new Integer(id));
}
public void addTx(MonetaryTransaction tx) {
getHibernateTemplate().saveOrUpdate(tx);
}
}
|