public List findAll(Date begin, Date end) throws Exception {
String hql="from Salebill where saleDate bewteen ? and ?";
Object[] value={begin,end};
List list = this.getHibernateTemplate().find(hql, value);
return list;
}
List moreCats = this.getHibernateTemplate().find(
"from Cat as cat where " + "cat.name = 'Fritz' or cat.id = ? or cat.id = ?",
new Object[] { id1, id2 },
new Type[] { Hibernate.LONG, Hibernate.LONG }
);
public AuctionUser findUserByItemAndPrice(Integer itemId , Double price)
{
Object[] args = {itemId , price} ;
List l = getHibernateTemplate().find("from Bid as bid where bid.bidItem.id = ? and bid.bidPrice = ?",args);
if (l.size() >= 1)
{
Bid b = (Bid)l.get(0);
return b.getBidUser();
}
else
{
return null;
}
}
String hql="from Salebill where saleDate bewteen ? and ?";
Object[] value={begin,end};
List list = this.getHibernateTemplate().find(hql, value);
return list;
}
List moreCats = this.getHibernateTemplate().find(
"from Cat as cat where " + "cat.name = 'Fritz' or cat.id = ? or cat.id = ?",
new Object[] { id1, id2 },
new Type[] { Hibernate.LONG, Hibernate.LONG }
);
public AuctionUser findUserByItemAndPrice(Integer itemId , Double price)
{
Object[] args = {itemId , price} ;
List l = getHibernateTemplate().find("from Bid as bid where bid.bidItem.id = ? and bid.bidPrice = ?",args);
if (l.size() >= 1)
{
Bid b = (Bid)l.get(0);
return b.getBidUser();
}
else
{
return null;
}
}