Examples of DBTypesBean


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

        List<Map<String, Object>> infos = (List<Map<String, Object>>)JSONUtils.fromJSON(modelJson, List.class);
        List<DBTypesBean> beans = new ArrayList<DBTypesBean>();
        boolean ret = false;
        Map<String, List<String>> errors = null;
        for (Map<String, Object> info: infos) {
          DBTypesBean bean = mapper.mapFromRow(info, DBTypesBean.class);
          if (bean.getCreateDateLong() != null) {
            bean.setCreateDate(new Timestamp(bean.getCreateDateLong()));
          }
          if (emptyValidator.validate(bean) == null) {
            data = "[]";
          } else if ("update/".equals(pattern)) {
            if (bean.getTypeId() == null) {
              // insert
              if ((errors = validator.validate(bean)) == null) {
                DbAccess.typesAccess.insert(bean);
                ret = true;
              } else {
                break;
              }
            } else {
              if ((errors = validator.validate(bean)) == null) {
                // update
                DbAccess.typesAccess.updateByPrimaryKey(bean, bean.getTypeId());
                ret = true;
              } else {
                break;
              }
            }
          } else if (bean.getTypeId() != null) {
            // delete
            DbAccess.typesAccess.deleteByPrimaryKey(bean.getTypeId());
            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.