Examples of DBPropertiesBean


Examples of org.c3s.rpgplayer.db.beans.DBPropertiesBean

      if (modelJson != null) {
        List<Map<String, Object>> infos = (List<Map<String, Object>>)JSONUtils.fromJSON(modelJson, List.class);
        List<DBPropertiesBean> beans = new ArrayList<DBPropertiesBean>();
        boolean ret = false;
        for (Map<String, Object> info: infos) {
          DBPropertiesBean bean = mapper.mapFromRow(info, DBPropertiesBean.class);
          if ("update/".equals(pattern)) {
            if (bean.getPropertyId() == null) {
              // insert
              if (bean.getUniq() != null && bean.getName() != null) {
                DbAccess.propertiesAccess.insert(bean);
                ret = true;
              }
            } else {
              // update
              DbAccess.propertiesAccess.updateByPrimaryKey(bean, bean.getPropertyId());
              ret = true;
            }
          } else if (bean.getPropertyId() != null) {
            // delete
            DbAccess.propertiesAccess.deleteByPrimaryKey(bean.getPropertyId());
            ret = true;
          }
          if (ret) {
            beans.add(bean);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.