001 package railo.runtime.debug; 002 003 import railo.runtime.db.SQL; 004 import railo.runtime.type.Query; 005 006 /** 007 * 008 */ 009 public final class QueryEntryImpl implements QueryEntryPro { 010 011 private static final long serialVersionUID = 8655915268130645466L; 012 013 private final String src; 014 private final SQL sql; 015 private final long exe; 016 private final String name; 017 private final int recordcount; 018 private final String datasource; 019 private final Query qry; 020 private final long startTime; 021 022 /** 023 * constructor of the class 024 * @param recordcount 025 * @param query 026 * @param src 027 * @param exe 028 */ 029 public QueryEntryImpl(Query qry,String datasource, String name,SQL sql,int recordcount, String src, long exe) { 030 this.startTime=System.currentTimeMillis()-(exe/1000000); 031 this.datasource=datasource; 032 this.recordcount=recordcount; 033 this.name=name; 034 this.src=src; 035 this.sql=sql; 036 this.exe=exe; 037 this.qry=qry; 038 } 039 040 @Override 041 public Query getQry() { 042 return qry; 043 } 044 045 @Override 046 public int getExe() { 047 return (int)getExecutionTime(); 048 } 049 050 @Override 051 public long getExecutionTime() { 052 return exe; 053 } 054 055 056 @Override 057 public SQL getSQL() { 058 return sql; 059 } 060 @Override 061 public String getSrc() { 062 return src; 063 } 064 @Override 065 public String getName() { 066 return name; 067 } 068 @Override 069 public int getRecordcount() { 070 return recordcount; 071 } 072 @Override 073 public String getDatasource() { 074 return datasource; 075 } 076 077 // FUTURE add to interface 078 public long getStartTime() { 079 return startTime; 080 } 081 }