@Override public void edit(JbAssets jbAssets) { TjbAssets t = jbAssetsDao.get(TjbAssets.class, jbAssets.getId()); if (t != null) { MyBeanUtils.copyProperties(jbAssets, t, new String[] {"id", "createdatetime"}, true); } }
@Override public JbAssets get(String id) { Map<String, Object> params = new HashMap<String, Object>(); params.put("id", id); TjbAssets t = jbAssetsDao.get("from TjbAssets t where t.id = :id", params); JbAssets o = new JbAssets(); BeanUtils.copyProperties(t, o); return o; }
@Override public void delete(String id) { jbAssetsDao.delete(jbAssetsDao.get(TjbAssets.class, id)); }