Package org.beangle.ems.dictionary.model

Examples of org.beangle.ems.dictionary.model.CodeMeta


  protected String getEntityName() {
    return CodeMeta.class.getName();
  }

  public String save() {
    CodeMeta meta = populateEntity(CodeMeta.class, "codeMeta");
    boolean error = false;
    if (entityDao.duplicate(CodeMeta.class, meta.getId(), "name", meta.getName())) {
      error = true;
      addFlashErrorNow("基础代码名称不能重复");
    }
    if (entityDao.duplicate(CodeMeta.class, meta.getId(), "title", meta.getTitle())) {
      error = true;
      addFlashErrorNow("基础代码标题不能重复");
    }
    if (entityDao.duplicate(CodeMeta.class, meta.getId(), "className", meta.getClassName())) {
      error = true;
      addFlashErrorNow("基础代码实体类不能重复");
    }

    if (!error) {
View Full Code Here


   */
  public String search() {
    Collection<?> datas = entityDao.search(this.getQueryBuilder());
    put("baseCodes", datas);
    put("shortName", getShortName());
    CodeMeta CodeMeta = (CodeMeta) entityDao.get(CodeMeta.class, "className", getEntityName()).iterator()
        .next();
    put("CodeMeta", CodeMeta);
    return forward();
  }
View Full Code Here

      List<MultiEntityExporter.Metadata> metadatas = CollectUtils.newArrayList();
      context.put("metadatas", metadatas);
      String[] keyArray = StringUtils.split(keys, ',');
      String[] titleArray = StringUtils.split(titles, ',');
      for (String codeName : codeNames) {
        CodeMeta CodeMeta = entityDao.get(CodeMeta.class, "className", codeName).get(0);
        OqlBuilder b = OqlBuilder.hql("from " + codeName
            + " as basecode order by basecode.updatedAt desc,basecode.code");
        datas.add(entityDao.search(b));
        metadatas.add(new MultiEntityExporter.Metadata(CodeMeta.getName(), keyArray, titleArray));
      }
      context.put("items", datas);
    } else {
      Collection list = getExportDatas();
      context.put("items", list);
View Full Code Here

    if (markup != null) {
      if (markup.equals("true")) {
        Long[] CodeMetaIds = StrUtils.transformToLong(StrUtils.split(get("CodeMetaId")));
        if (CodeMetaIds.length > 0) {
          for (int i = 0; i < CodeMetaIds.length; i++) {
            CodeMeta CodeMeta = entityDao.get(CodeMeta.class, CodeMetaIds[i]);
            list.add(CodeMeta);
          }
        } else {
          list = entityDao.getAll(CodeMeta.class);
        }
View Full Code Here

   */
  public String search() {
    Collection<?> datas = entityDao.search(this.getQueryBuilder());
    put("baseCodes", datas);
    put("shortName", getShortName());
    CodeMeta CodeMeta = (CodeMeta) entityDao.get(CodeMeta.class, "className", getEntityName()).iterator()
        .next();
    put("CodeMeta", CodeMeta);
    return forward();
  }
View Full Code Here

      List<MultiEntityExporter.Metadata> metadatas = CollectUtils.newArrayList();
      context.put("metadatas", metadatas);
      String[] keyArray = StringUtils.split(keys, ',');
      String[] titleArray = StringUtils.split(titles, ',');
      for (String codeName : codeNames) {
        CodeMeta CodeMeta = entityDao.get(CodeMeta.class, "className", codeName).get(0);
        OqlBuilder b = OqlBuilder.hql("from " + codeName
            + " as basecode order by basecode.updatedAt desc,basecode.code");
        datas.add(entityDao.search(b));
        metadatas.add(new MultiEntityExporter.Metadata(CodeMeta.getName(), keyArray, titleArray));
      }
      context.put("items", datas);
    } else {
      Collection list = getExportDatas();
      context.put("items", list);
View Full Code Here

    if (markup != null) {
      if (markup.equals("true")) {
        Long[] CodeMetaIds = StrUtils.transformToLong(StrUtils.split(get("CodeMetaId")));
        if (CodeMetaIds.length > 0) {
          for (int i = 0; i < CodeMetaIds.length; i++) {
            CodeMeta CodeMeta = entityDao.get(CodeMeta.class, CodeMetaIds[i]);
            list.add(CodeMeta);
          }
        } else {
          list = entityDao.getAll(CodeMeta.class);
        }
View Full Code Here

  protected String getEntityName() {
    return CodeMeta.class.getName();
  }

  public String save() {
    CodeMeta meta = populateEntity(CodeMeta.class, "codeMeta");
    boolean error = false;
    if (entityDao.duplicate(CodeMeta.class, meta.getId(), "name", meta.getName())) {
      error = true;
      addFlashErrorNow("基础代码名称不能重复");
    }
    if (entityDao.duplicate(CodeMeta.class, meta.getId(), "title", meta.getTitle())) {
      error = true;
      addFlashErrorNow("基础代码标题不能重复");
    }
    if (entityDao.duplicate(CodeMeta.class, meta.getId(), "className", meta.getClassName())) {
      error = true;
      addFlashErrorNow("基础代码实体类不能重复");
    }

    if (!error) {
View Full Code Here

TOP

Related Classes of org.beangle.ems.dictionary.model.CodeMeta

Copyright © 2018 www.massapicom. 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.