1 package com.daffodilwoods.daffodildb.server.sql99.common; 2 3 import com.daffodilwoods.daffodildb.server.datadictionarysystem.CharacteristicsConstants; 4 5 6 public class ExecutionPlanForBrowser implements java.io.Serializable { 7 8 private String displayName; 9 private String nameOfIterator; 10 private ExecutionPlanForBrowser[] childPlans; 11 private String condition; 12 private String order; 13 private String indexName; 14 private String defaultIndex = CharacteristicsConstants.systemFields[CharacteristicsConstants.rowId] + " ASC ," 15 + CharacteristicsConstants.systemFields[CharacteristicsConstants.transactionId] + " ASC , " 16 + CharacteristicsConstants.systemFields[CharacteristicsConstants.sessionId] + " ASC ,"; 17 18 public ExecutionPlanForBrowser() { 19 } 20 21 public ExecutionPlanForBrowser(String displayName0,String nameOfIterator0,ExecutionPlanForBrowser[] childPlans0,String condition0,String order0,String indexName0) { 22 displayName = displayName0; 23 nameOfIterator = nameOfIterator0; 24 childPlans = childPlans0; 25 condition = condition0; 26 order = order0; 27 indexName = indexName0; 28 } 29 30 public ExecutionPlanForBrowser[] getChildPlan() { 31 return childPlans; 32 } 33 34 public String getCondtion() { 35 return condition == null ? null : ("Condition : "+condition); 36 } 37 38 public String getOrder() { 39 return order == null ? null : ("Order : "+order); 40 } 41 42 public String getIndexName() { 43 if(indexName == null || indexName.trim().length() == 0) 44 return null ; 45 String indexName = this.indexName; 46 int ind = indexName.indexOf(defaultIndex); 47 if(ind >= 0){ 48 indexName = indexName.substring(0,ind).trim(); 49 indexName = indexName.length() == 0 ? "Default Index" : indexName; 50 } 51 return ("IndexName : "+indexName); 52 } 53 54 public void setCondtion(String condition0) { 55 condition = condition0; 56 } 57 58 public void setOrder(String order0) { 59 order = order0; 60 } 61 62 public void setIndexName(String indexName0) { 63 indexName = indexName0; 64 } 65 66 public void setChildPlan(ExecutionPlanForBrowser[] childPlans0) { 67 childPlans = childPlans0; 68 } 69 70 public void setName(String nameOfIterator0){ 71 nameOfIterator = nameOfIterator0; 72 } 73 74 public String toString(){ 75 return displayName; 76 } 77 78 public Object clone(){ 79 int length = childPlans == null ? 0 : childPlans.length; 80 ExecutionPlanForBrowser[] chp = length == 0 ? null : new ExecutionPlanForBrowser[length]; 81 for (int i = 0; i < length; i++) 82 chp[i] = (ExecutionPlanForBrowser)childPlans[i].clone(); 83 return new ExecutionPlanForBrowser(displayName,nameOfIterator,chp,condition,order,indexName); 84 } 85 90 } 91 | Popular Tags |