com.avaje.ebean.meta
Class MetaQueryStatistic

java.lang.Object
  extended by com.avaje.ebean.meta.MetaQueryStatistic
All Implemented Interfaces:
Serializable

public class MetaQueryStatistic
extends Object

    
implements Serializable

    

Query execution statistics Meta data.

See Also:
Serialized Form

Constructor Summary
MetaQueryStatistic()
           
MetaQueryStatistic(boolean autofetchTuned, String beanType, int plan, String sql, int executionCount, int totalLoadedBeans, int totalTimeMicros, long collectionStart, long lastQueryTime)
          Create a MetaQueryStatistic.
 
Method Summary
 int getAvgLoadedBeans()
          Return the average number of bean loaded per query.
 int getAvgTimeMicros()
          Return the average query execution time in microseconds.
 String getBeanType()
          Return the bean type.
 long getCollectionStart()
          Return the time collection started.
 int getExecutionCount()
          Return the total number of queries executed.
 int getFinalQueryPlanHash()
          Return the queryPlanHash value.
 long getLastQueryTime()
          Return the time of the last query executed using this plan.
 int getOrigQueryPlanHash()
          Return the original query plan hash (calculated prior to autofetch tuning).
 String getSql()
          Return the sql executed.
 int getTotalLoadedBeans()
          Return the total number of beans loaded by the queries.
 int getTotalTimeMicros()
          Return the number of times this query was executed.
 boolean isAutofetchTuned()
          Return true if this query plan was built for Autofetch tuned queries.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaQueryStatistic

public MetaQueryStatistic()

MetaQueryStatistic

public MetaQueryStatistic(boolean autofetchTuned,
                          String beanType,
                          int plan,
                          String sql,
                          int executionCount,
                          int totalLoadedBeans,
                          int totalTimeMicros,
                          long collectionStart,
                          long lastQueryTime)
Create a MetaQueryStatistic.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

isAutofetchTuned

public boolean isAutofetchTuned()
Return true if this query plan was built for Autofetch tuned queries.


getOrigQueryPlanHash

public int getOrigQueryPlanHash()
Return the original query plan hash (calculated prior to autofetch tuning).

This will return 0 if there is no autofetch profiling or tuning on this query.


getFinalQueryPlanHash

public int getFinalQueryPlanHash()
Return the queryPlanHash value. This is unique for a given query plan.


getBeanType

public String getBeanType()
Return the bean type.


getSql

public String getSql()
Return the sql executed.


getExecutionCount

public int getExecutionCount()
Return the total number of queries executed.


getTotalLoadedBeans

public int getTotalLoadedBeans()
Return the total number of beans loaded by the queries.

This excludes background fetching.


getTotalTimeMicros

public int getTotalTimeMicros()
Return the number of times this query was executed.


getCollectionStart

public long getCollectionStart()
Return the time collection started.


getLastQueryTime

public long getLastQueryTime()
Return the time of the last query executed using this plan.


getAvgTimeMicros

public int getAvgTimeMicros()
Return the average query execution time in microseconds.

This excludes background fetching.


getAvgLoadedBeans

public int getAvgLoadedBeans()
Return the average number of bean loaded per query.

This excludes background fetching.



Copyright © 2010. All Rights Reserved.