001package com.avaje.ebean.meta;
002
003import com.avaje.ebean.bean.ObjectGraphNode;
004
005/**
006 * Holds a query 'origin' point and count for the number of queries executed for
007 * this 'origin'.
008 * <p>
009 * This basically points to the bit of original code and query that results in
010 * this query directly or via lazy loading.
011 * </p>
012 * 
013 * @see MetaQueryPlanStatistic
014 * @see MetaInfoManager#collectQueryPlanStatistics(boolean)
015 */
016public interface MetaQueryPlanOriginCount {
017
018  /**
019   * The 'origin' and path which this query belongs to.
020   * <p>
021   * For lazy loading queries this points to the original query and associated
022   * navigation path that resulted in this query being executed.
023   * </p>
024   */
025  ObjectGraphNode getObjectGraphNode();
026
027  /**
028   * The number of times a query was fired for this node since the counter was
029   * last reset.
030   */
031  long getCount();
032
033}