Examples of PathItem


Examples of org.boco.seamUtility.pathManagement.PathItem

    {
      // Non esiste ancora

      Stack<PathItem> path = new Stack<PathItem>();

      path.push(new PathItem(thisBeanName, label, id));

      conversation.set("path", path);
    }
    else
    {
      // Esiste

      Stack<PathItem> path = (Stack<PathItem>) conversation.get("path");

      if (path.contains(new PathItem(thisBeanName, label, null)))
      {
        PathItem item = path.peek();

        while (!path.peek().getBeanName().equals(thisBeanName))
        {
          path.pop();
        }

        path.pop();
        path.push(new PathItem(thisBeanName, label, id));
      }
      else
      {
        path.push(new PathItem(thisBeanName, label, id));
      }

      conversation.set("path", path);
    }
  }
View Full Code Here

Examples of org.boco.seamUtility.pathManagement.PathItem

    Stack<PathItem> path = (Stack<PathItem>) conversation.get("path");

    if (path == null)
      return;

    PathItem lastItem = path.peek();

    if (lastItem.getBeanName().equals(thisBeanName))
    {
      path.pop();
      conversation.set("path", path);
    }
  }
View Full Code Here

Examples of org.boco.seamUtility.pathManagement.PathItem

  public static PathItem getReferenceToMaster()
  {
    // Context session = Contexts.getSessionContext();
    Context conversation = Contexts.getConversationContext();
    Stack<PathItem> path = (Stack<PathItem>) conversation.get("path");
    PathItem ret;

    if ((path != null) && (path.size() >= 1))
    {
      /** Se la lunghezza del path è maggiore di 2 significa che il path è composto almeno da master -> detail **/
      /** Il riferimento al master è nell'ultimo elemento **/
      ret = path.get(path.size() - 1);
    }
    else
    {
      /** Il percorso contiene solo un detail e quindi non esiste un riferimento al master **/
      ret = new PathItem("", "", null);
    }

    return ret;
  }
View Full Code Here

Examples of org.boco.seamUtility.pathManagement.PathItem

  public static PathItem getPathReference(int pos)
  {
    // Context session = Contexts.getSessionContext();
    Context conversation = Contexts.getConversationContext();
    Stack<PathItem> path = (Stack<PathItem>) conversation.get("path");
    PathItem ret;

    if ((path != null) && (path.size() >= 1))
    {
      /** Se la lunghezza del path è maggiore di 2 significa che il path è composto almeno da master -> detail **/
      /** Il riferimento al master è nell'ultimo elemento **/
      ret = path.get(path.size() - 1 - pos);
    }
    else
    {
      /** Il percorso contiene solo un detail e quindi non esiste un riferimento al master **/
      ret = new PathItem("", "", null);
    }

    return ret;
  }
View Full Code Here

Examples of org.boco.seamUtility.pathManagement.PathItem

      default:
        qb.addOrderBy("o.surname asc");
    }


    PathItem myInfo = SeamUtility.getReferenceToMaster();
    log.debug("  query: "+qb.getQuery());
    long startTime = System.currentTimeMillis();

    entityManager.clear();
View Full Code Here

Examples of org.boco.seamUtility.pathManagement.PathItem

 
 
 
  public Boolean isDetailOf(String masterBeanName)
  {
    PathItem myInfo = SeamUtility.getReferenceToMaster();
   
    if (myInfo.getBeanName().equals(masterBeanName))
      return true;
   
    return false;
 
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.