Examples of leafProperty()


Examples of com.github.dactiv.orm.annotation.TreeEntity.leafProperty()

    if (treeEntity != null) {
      E parent = ReflectionUtils.invokeGetterMethod(entity,treeEntity.parentProperty());
      // 如果对象父类不为null,将父类的leaf设置成true,表示父类下存在子节点
      if (parent != null) {
        Object value = ConvertUtils.convertToObject(treeEntity.leafValue(), treeEntity.leafClass());
        ReflectionUtils.invokeSetterMethod(parent,treeEntity.leafProperty(), value);
      }
    }

    return Boolean.TRUE;
  }
View Full Code Here

Examples of com.github.dactiv.orm.annotation.TreeEntity.leafProperty()

    if (treeEntity != null) {
      //from {0} tree where tree.{1} = {2} and (select count(c) from {0} c where c.{3}.{4} = r.{4}) = {5}
      String hql = MessageFormat.format(treeEntity.refreshHql(),
          persistentContext.getEntityName(),
          treeEntity.leafProperty(),
          treeEntity.leafValue(),
          treeEntity.parentProperty(),
          persistentContext.getIdName(),
          treeEntity.unleafValue());
     
View Full Code Here

Examples of com.github.dactiv.orm.annotation.TreeEntity.leafProperty()

     
      List<E> list = persistentContext.getEntityManager().createQuery(hql).getResultList();

      for (E e : list) {
        Object value = ConvertUtils.convertToObject(treeEntity.unleafValue(), treeEntity.leafClass());
        ReflectionUtils.invokeSetterMethod(e,treeEntity.leafProperty(), value);
        persistentContext.save(e);
      }
    }

  }
View Full Code Here

Examples of com.github.dactiv.orm.annotation.TreeEntity.leafProperty()

    if (treeEntity != null) {
      E parent = ReflectionUtils.invokeGetterMethod(entity,treeEntity.parentProperty());
      // 如果对象父类不为null,将父类的leaf设置成true,表示父类下存在子节点
      if (parent != null) {
        Object value = ConvertUtils.convertToObject(treeEntity.leafValue(), treeEntity.leafClass());
        ReflectionUtils.invokeSetterMethod(parent,treeEntity.leafProperty(), value);
      }
    }

    return Boolean.TRUE;
  }
View Full Code Here

Examples of com.github.dactiv.orm.annotation.TreeEntity.leafProperty()

    if (treeEntity != null) {
      //from {0} tree where tree.{1} = {2} and (select count(c) from {0} c where c.{3}.{4} = r.{4}) = {5}
      String hql = MessageFormat.format(treeEntity.refreshHql(),
          persistentContext.getEntityName(),
          treeEntity.leafProperty(),
          treeEntity.leafValue(),
          treeEntity.parentProperty(),
          persistentContext.getIdName(),
          treeEntity.unleafValue());
     
View Full Code Here

Examples of com.github.dactiv.orm.annotation.TreeEntity.leafProperty()

     
      List<E> list = persistentContext.findByQuery(hql);

      for (E e : list) {
        Object value = ConvertUtils.convertToObject(treeEntity.unleafValue(), treeEntity.leafClass());
        ReflectionUtils.invokeSetterMethod(e,treeEntity.leafProperty(), value);
        persistentContext.merge(e);
      }
    }

  }
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.