Exemplo n.º 1
0
 @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);
   }
 }
Exemplo n.º 2
0
 @Override
 public void add(JbAssets jbAssets) {
   TjbAssets t = new TjbAssets();
   BeanUtils.copyProperties(jbAssets, t);
   t.setId(UUID.randomUUID().toString());
   // t.setCreatedatetime(new Date());
   jbAssetsDao.save(t);
 }
Exemplo n.º 3
0
 @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;
 }
Exemplo n.º 4
0
 @Override
 public void delete(String id) {
   jbAssetsDao.delete(jbAssetsDao.get(TjbAssets.class, id));
 }