Package com.avaje.ebean.bean

Examples of com.avaje.ebean.bean.ObjectGraphNode


    SpiQuery<?> query = q.getQueryRequest().getQuery();
    String loadMode = query.getLoadMode();
    String loadDesc = query.getLoadDescription();
    String lazyLoadProp = query.getLazyLoadProperty();
    ObjectGraphNode node = query.getParentNode();
    String originKey;
    if (node == null || node.getOriginQueryPoint() == null) {
      originKey = null;
    } else {
      originKey = node.getOriginQueryPoint().getKey();
    }

    StringBuilder msg = new StringBuilder(200);
    msg.append("FindBean ");
    if (loadMode != null) {
View Full Code Here


    SpiQuery<?> query = q.getQueryRequest().getQuery();
    String loadMode = query.getLoadMode();
    String loadDesc = query.getLoadDescription();
    String lazyLoadProp = query.getLazyLoadProperty();
    ObjectGraphNode node = query.getParentNode();

    String originKey;
    if (node == null || node.getOriginQueryPoint() == null) {
      originKey = null;
    } else {
      originKey = node.getOriginQueryPoint().getKey();
    }

    StringBuilder msg = new StringBuilder(200);
    msg.append("FindMany ");
    if (loadMode != null) {
View Full Code Here

  public ObjectGraphNode setOrigin(CallStack callStack) {

    // create a 'origin' which links this query to the profiling information
    ObjectGraphOrigin o = new ObjectGraphOrigin(calculateOriginQueryHash(), callStack, beanType.getName());
    parentNode = new ObjectGraphNode(o, null);
    return parentNode;
  }
View Full Code Here

      }
      // customer.getContacts()
    }

    SpiQuery<?> sq = (SpiQuery<?>) q;
    ObjectGraphNode parentNode = sq.getParentNode();
    ObjectGraphOrigin origin = parentNode.getOriginQueryPoint();

    System.out.println("Origin:" + origin.getKey());

    // MetaAutoFetchStatistic metaAutoFetchStatistic =
    // ((DefaultOrmQuery<?>)q).getMetaAutoFetchStatistic();
View Full Code Here

  public void collectUsageInfo(NodeUsageCollector profile) {

      if (profile.isEmpty()){
          // no usage was collected
      } else {
        ObjectGraphNode node = profile.getNode();
   
        StatisticsNodeUsage nodeStats = getNodeStats(node.getPath());
        nodeStats.publish(profile);
      }
  }
View Full Code Here

    if (!useAutoFetch(query)) {
      // not using autoFetch for this query
      return false;
    }

    ObjectGraphNode parentAutoFetchNode = query.getParentNode();
    if (parentAutoFetchNode != null) {
      // This is a +lazy/+query query with profiling on.
      // We continue to collect the profiling information.
      query.setAutoFetchManager(this);
      return true;
    }

    // create a query point to identify the query
    CallStack stack = server.createCallStack();
    ObjectGraphNode origin = query.setOrigin(stack);

    // get current "tuned fetch" for this query point
    TunedQueryInfo tunedFetch = tunedQueryInfoMap.get(origin.getOriginQueryPoint().getKey());

    // get the number of times we have collected profiling information
    int profileCount = tunedFetch == null ? 0 : tunedFetch.getProfileCount();

    if (profiling) {
View Full Code Here

    }
  }

  public void profileBean(EntityBeanIntercept ebi, String prefix) {

    ObjectGraphNode node = request.getGraphContext().getObjectGraphNode(prefix);

    ebi.setNodeUsageCollector(new NodeUsageCollector(node, autoFetchManagerRef));
  }
View Full Code Here

    SpiQuery<?> query = request.getQuery();
    this.readOnly = query.isReadOnly();   
    this.excludeBeanCache = Boolean.FALSE.equals(query.isUseBeanCache());
    this.useAutofetchManager = query.getAutoFetchManager() != null;   
       
    ObjectGraphNode parentNode = query.getParentNode();
    if (parentNode != null){
      this.origin = parentNode.getOriginQueryPoint();
      this.relativePath = parentNode.getPath();
    } else {
      this.origin = null;
      this.relativePath = null;
    }
   
View Full Code Here

  }


  public ObjectGraphNode getObjectGraphNode(String path) {
 
    ObjectGraphNode node = nodePathMap.get(path);
    if (node == null){
      node = createObjectGraphNode(path);
      nodePathMap.put(path, node);
    }
   
View Full Code Here

        path = relativePath;
      } else {
        path = relativePath+"."+path;
      }
    }
    return new ObjectGraphNode(origin, path);   
  }
View Full Code Here

TOP

Related Classes of com.avaje.ebean.bean.ObjectGraphNode

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.