<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>html模板</title>
</head>
<body>
<h1>${title}</h1>
<p>${date}</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>html模板</title>
</head>
<body>
<h1>新闻标题</h1>
<p>Thu Nov 29 20:45:38 CST 2007</p>
</body>
</html>

public class $!...{domainName}ServiceImpl implements I$!...{domainName}Service...{

private I$!...{domainName}DAO $!...{domain}Dao;

public void set#upperCase($!...{domain})Dao(I$!...{domainName}DAO $!...{domain}Dao)...{
this.$!...{domain}Dao=$!...{domain}Dao;
}

public Long add$!...{domainName}($!...{domainName} $!...{domain}) ...{ 
this.$!...{domain}Dao.save($!...{domain});
if ($!...{domain} != null && $!...{domain}.get$!...{id}() != null) ...{
return $!...{domain}.get$!...{id}();
}
return null;
}

public $!...{domainName} get$!...{domainName}(Long id) ...{
$!...{domainName} $!...{domain} = this.$!...{domain}Dao.get(id);
return $!...{domain};
}

public boolean del$!...{domainName}(Long id) ...{ 
$!...{domainName} $!...{domain} = this.get$!...{domainName}(id);
if ($!...{domain} != null) ...{
this.$!...{domain}Dao.remove(id);
return true;
}
return false;
}

public boolean batchDel$!...{domainName}s(List<Serializable> $!...{domain}Ids) ...{

for (Serializable id : $!...{domain}Ids) ...{
del$!...{domainName}((Long) id);
}
return true;
}

public IPageList get$!...{domainName}By(IQueryObject queryObject) ...{ 
return QueryUtil.query(queryObject, $!...{domainName}.class,this.$!...{domain}Dao);
}

public boolean update$!...{domainName}(Long id, $!...{domainName} $!...{domain}) ...{
if (id != null) ...{
$!...{domain}.set$!...{id}(id);
} else ...{
return false;
}
this.$!...{domain}Dao.update($!...{domain});
return true;
}
}

public class OrdersServiceImpl implements IOrdersService ...{
private IOrdersDAO ordersDao;

public void setOrdersDao(IOrdersDAO ordersDao) ...{
this.ordersDao = ordersDao;
}

public Long addOrders(Orders orders) ...{
this.ordersDao.save(orders);
if (orders != null && orders.getId() != null) ...{
return orders.getId();
}
return null;
}

public Orders getOrders(Long id) ...{
Orders orders = this.ordersDao.get(id);
if (orders != null) ...{
return orders;
}
return null;
}

public boolean delOrders(Long id) ...{
Orders orders = this.getOrders(id);
if (orders != null) ...{
this.ordersDao.remove(id);
return true;
}
return false;
}

public boolean batchDelOrderss(List<Serializable> ordersIds) ...{

for (Serializable id : ordersIds) ...{
delOrders((Long) id);
}
return true;
}

public boolean removeOrders(Long id) ...{
Orders orders = this.getOrders(id);
if (orders != null) ...{
this.ordersDao.remove(id);
return true;
}
return false;
}

public boolean batchRemoveOrderses(List<Serializable> ordersIds) ...{

for (Serializable id : ordersIds) ...{
delOrders((Long) id);
}
return true;
}

public boolean recoverOrders(Long id) ...{
if (id == null) ...{
return false;
}
Orders obj = this.getOrders(id);
if (obj == null) ...{
return false;
}
obj.revert();
return true;
}

public boolean batchRecoverOrderses(List<Serializable> ids) ...{
for (Serializable id : ids) ...{
recoverOrders((Long) id);
}
return true;
}

public IPageList getOrdersBy(IQueryObject queryObject) ...{
return QueryUtil.query(queryObject, Orders.class, this.ordersDao);
}

public boolean updateOrders(Long id, Orders orders) ...{
if (id != null) ...{
orders.setId(id);
} else ...{
return false;
}
this.ordersDao.update(orders);
return true;
}
}
1851




被折叠的 条评论
为什么被折叠?



