資源簡介
ssh整合的小型超市系統,實現進貨,用戶管理,出售等功能

代碼片段和文件信息
package?com.niit.dao.hibernate;
import?java.util.List;
import?org.apache.commons.logging.Log;
import?org.apache.commons.logging.LogFactory;
import?org.hibernate.LockMode;
import?org.springframework.context.ApplicationContext;
import?org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import?com.niit.dao1.IBillDAO;
import?com.niit.model.Bill;
/**
?*?A?data?access?object?(DAO)?providing?persistence?and?search?support?for?Bill
?*?entities.?Transaction?control?of?the?save()?update()?and?delete()?operations
?*?can?directly?support?Spring?container-managed?transactions?or?they?can?be
?*?augmented?to?handle?user-managed?Spring?transactions.?Each?of?these?methods
?*?provides?additional?information?for?how?to?configure?it?for?the?desired?type
?*?of?transaction?control.
?*?
?*?@see?com.niit.model.Bill
?*?@author?MyEclipse?Persistence?Tools
?*/
public?class?BillDAO?extends?HibernateDaoSupport?implements?IBillDAO
{
private?static?final?Log?log?=?LogFactory.getLog(BillDAO.class);
protected?void?initDao()
{
//?do?nothing
}
/*?(non-Javadoc)
?*?@see?com.niit.dao.hibernate.iBillDAO#save(com.niit.model.Bill)
?*/
public?void?save(Bill?transientInstance)
{
log.debug(“saving?Bill?instance“);
try
{
getHibernateTemplate().save(transientInstance);
log.debug(“save?successful“);
}?catch?(RuntimeException?re)
{
log.error(“save?failed“?re);
throw?re;
}
}
/*?(non-Javadoc)
?*?@see?com.niit.dao.hibernate.iBillDAO#delete(com.niit.model.Bill)
?*/
public?void?delete(Bill?persistentInstance)
{
log.debug(“deleting?Bill?instance“);
try
{
getHibernateTemplate().delete(persistentInstance);
log.debug(“delete?successful“);
}?catch?(RuntimeException?re)
{
log.error(“delete?failed“?re);
throw?re;
}
}
/*?(non-Javadoc)
?*?@see?com.niit.dao.hibernate.iBillDAO#findById(java.lang.Integer)
?*/
public?Bill?findById(java.lang.Integer?id)
{
log.debug(“getting?Bill?instance?with?id:?“?+?id);
try
{
Bill?instance?=?(Bill)?getHibernateTemplate().get(
“com.niit.model.Bill“?id);
return?instance;
}?catch?(RuntimeException?re)
{
log.error(“get?failed“?re);
throw?re;
}
}
/*?(non-Javadoc)
?*?@see?com.niit.dao.hibernate.iBillDAO#findByExample(com.niit.model.Bill)
?*/
public?List?findByExample(Bill?instance)
{
log.debug(“finding?Bill?instance?by?example“);
try
{
List?results?=?getHibernateTemplate().findByExample(instance);
log.debug(“find?by?example?successful?result?size:?“
+?results.size());
return?results;
}?catch?(RuntimeException?re)
{
log.error(“find?by?example?failed“?re);
throw?re;
}
}
/*?(non-Javadoc)
?*?@see?com.niit.dao.hibernate.iBillDAO#findByProperty(java.lang.String?java.lang.object)
?*/
public?List?findByProperty(String?propertyName?object?value)
{
log.debug(“finding?Bill?instance?with?property:?“?+?propertyName
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1580??2009-04-22?11:39??ssh整合的小型超市系統\.classpath
?????文件????????532??2009-04-22?13:39??ssh整合的小型超市系統\.myhibernatedata
?????文件????????306??2009-04-21?17:53??ssh整合的小型超市系統\.myme
?????文件????????255??2009-04-22?08:52??ssh整合的小型超市系統\.mystrutsdata
?????文件???????1910??2009-04-22?11:31??ssh整合的小型超市系統\.project
?????文件????????481??2009-04-21?17:54??ssh整合的小型超市系統\.springBeans
?????文件???????1510??2009-04-23?23:30??ssh整合的小型超市系統\WebRoot\addUser.jsp
?????文件???????1566??2009-04-24?11:24??ssh整合的小型超市系統\WebRoot\adminUpdateUser.jsp
?????文件????????359??2009-04-24?14:07??ssh整合的小型超市系統\WebRoot\bill.jsp
?????文件???????1538??2009-04-23?19:17??ssh整合的小型超市系統\WebRoot\changeInfo.jsp
?????文件????????373??2009-04-23?11:17??ssh整合的小型超市系統\WebRoot\deleteSuccess.jsp
?????文件????????841??2009-04-22?10:25??ssh整合的小型超市系統\WebRoot\fail.jsp
?????文件????????834??2009-04-21?17:52??ssh整合的小型超市系統\WebRoot\index.jsp
?????文件???????1648??2009-04-24?15:58??ssh整合的小型超市系統\WebRoot\login.jsp
?????文件???????1186??2009-04-23?14:16??ssh整合的小型超市系統\WebRoot\manageStock.jsp
?????文件????????248??2009-04-24?09:50??ssh整合的小型超市系統\WebRoot\ManageUser.jsp
?????文件????????973??2009-05-05?10:20??ssh整合的小型超市系統\WebRoot\sell.jsp
?????文件???????1434??2009-04-24?14:18??ssh整合的小型超市系統\WebRoot\sellingcom.jsp
?????文件???????1196??2009-04-24?13:49??ssh整合的小型超市系統\WebRoot\shopping.jsp
?????文件???????1095??2009-04-24?11:04??ssh整合的小型超市系統\WebRoot\ShowAllUser.jsp
?????文件????????827??2009-04-24?15:17??ssh整合的小型超市系統\WebRoot\showbill.jsp
?????文件???????2731??2009-04-23?08:38??ssh整合的小型超市系統\WebRoot\stock.jsp
?????文件????????774??2009-04-26?18:25??ssh整合的小型超市系統\WebRoot\success.jsp
?????文件???????2529??2009-04-23?15:18??ssh整合的小型超市系統\WebRoot\updateCommodity.jsp
?????文件????????341??2009-04-23?19:14??ssh整合的小型超市系統\WebRoot\updateUserSuccess.jsp
?????文件????????344??2009-04-24?12:31??ssh整合的小型超市系統\WebRoot\updateUserSuccess1.jsp
?????文件???????5664??2009-04-23?12:40??ssh整合的小型超市系統\WebRoot\WEB-INF\.struts-config.mex
?????文件???????7000??2009-04-24?15:20??ssh整合的小型超市系統\WebRoot\WEB-INF\applicationContext.xm
?????文件??????72809??2009-04-21?17:53??ssh整合的小型超市系統\WebRoot\WEB-INF\spring-form.tld
?????文件??????13507??2009-04-21?17:53??ssh整合的小型超市系統\WebRoot\WEB-INF\spring.tld
............此處省略144個文件信息
評論
共有 條評論