Package org.openbravo.model.ad.utility

Examples of org.openbravo.model.ad.utility.TreeNode


        repairReferences.add(bob);
      }
    }
    for (BaseOBObject objectToRepair : repairReferences) {
      if (objectToRepair instanceof TreeNode) {
        final TreeNode tn = (TreeNode) objectToRepair;
        final Entity entity = ModelProvider.getInstance().getEntityFromTreeType(
            tn.getTree().getTypeArea());
        if (entity == null) {
          if (ir.getWarningMessages() == null) {
            ir.setWarningMessages("Imported tree nodes belong to a tree with a tree type "
                + tn.getTree().getTypeArea() + " which is not related to any entity.");
          } else {
            ir.setWarningMessages(ir.getWarningMessages()
                + "\nImported tree nodes belong to a tree with a tree type "
                + tn.getTree().getTypeArea() + " which is not related to any entity.");
          }
          continue;
        }
      }
      for (Property p : PrimitiveReferenceHandler.getInstance().getPrimitiveReferences(
View Full Code Here


   * @throws OBException
   *           if no Entity can be found
   */
  public Entity getPrimitiveReferencedEntity(BaseOBObject obObject, Property property) {
    if (property.getEntity().getName().equals(TreeNode.ENTITY_NAME)) {
      final TreeNode treeNode = (TreeNode) obObject;
      final Entity entity = ModelProvider.getInstance().getEntityFromTreeType(
          treeNode.getTree().getTypeArea());
      if (entity == null) {
        throw new OBException("No entity found for treetype " + treeNode.getTree().getTypeArea());
      }
      return entity;
    }
    if (property.getEntity().getName().equals(Alert.ENTITY_NAME)) {
      final Alert alert = (Alert) obObject;
View Full Code Here

TOP

Related Classes of org.openbravo.model.ad.utility.TreeNode

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.