1 21 22 package org.apache.derby.iapi.sql.dictionary; 23 24 import org.apache.derby.catalog.Statistics; 25 import org.apache.derby.catalog.UUID; 26 27 import org.apache.derby.iapi.sql.dictionary.DataDictionary; 28 import java.sql.Timestamp ; 29 30 34 public class StatisticsDescriptor extends TupleDescriptor 35 { 36 private UUID statID; private UUID statRefID; private UUID statTableID; private Timestamp statUpdateTime; 41 44 private String statType; 45 private boolean statValid = true; private Statistics statStat; private int statColumnCount; 49 public StatisticsDescriptor(DataDictionary dd, 50 UUID newUUID, 51 UUID objectUUID, 52 UUID tableUUID, 53 String type, 54 Statistics stat, 55 int colCount) 56 { 57 super (dd); 58 this.statID = newUUID; 59 this.statRefID = objectUUID; 60 this.statTableID = tableUUID; 61 this.statUpdateTime = new Timestamp (System.currentTimeMillis()); 62 this.statType = "I"; this.statStat = stat; 64 this.statColumnCount = colCount; 65 } 66 67 public UUID getUUID() 68 { 69 return statID; 70 } 71 72 73 public UUID getTableUUID() { return statTableID;} 74 public UUID getReferenceID() { return statRefID; } 75 public Timestamp getUpdateTimestamp() { return statUpdateTime; } 76 public String getStatType() { return statType; } 77 public boolean isValid() { return statValid; } 78 public Statistics getStatistic() { return statStat; } 79 public int getColumnCount() { return statColumnCount; } 80 81 public String toString() 82 { 83 return "statistics: table=" + getTableUUID().toString() + 84 ",conglomerate=" + getReferenceID() + 85 ",colCount=" + getColumnCount() + 86 ",stat=" + getStatistic(); 87 } 88 } 89 90 91 92 93 | Popular Tags |