照葫芦画票吧
public String getTotalInfo(final long bid)
{
return (String)this.getHibernateTemplate().execute(new HibernateCallback(){
public Object doInHibernate(Session session)
throws HibernateException, SQLException {
// TODO Auto-generated method stub
CallableStatement cs=session.connection().prepareCall("{call bidcross(?,?)}");
cs.setLong(1, bid);
cs.registerOutParameter(2, Types.VARCHAR);
cs.execute();
return cs.getString(2);
}
});
}