1 package com.calipso.reportgenerator.common; 2 3 import com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType; 4 import com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType; 5 6 import java.io.Serializable ; 7 8 9 12 13 public class QueryDimension implements Serializable { 14 15 private String name; 16 private int index; 17 private DimensionDefinitionLocationType location; 18 private int locationOrder; 19 private DimensionDefinitionOrderType order; 20 private boolean groups; 21 private String rankMetricName; 22 23 24 32 public QueryDimension(String name, int index, DimensionDefinitionLocationType location, DimensionDefinitionOrderType order, int locationOrder, boolean groups, String rankMetricName) { 33 this.name = name; 34 this.index = index; 35 this.location = location; 36 this.order = order; 37 this.rankMetricName = rankMetricName; 38 this.locationOrder = locationOrder; 39 this.groups = groups; 40 } 41 42 46 public String getName() { 47 return name; 48 } 49 50 54 public int getIndex() { 55 return index; 56 } 57 58 62 public DimensionDefinitionLocationType getLocation() { 63 return location; 64 } 65 66 70 public DimensionDefinitionOrderType getOrder() { 71 if (order == null){ 72 return DimensionDefinitionOrderType.A; 73 } 74 return order; 75 } 76 77 81 public void setLocation(DimensionDefinitionLocationType location) { 82 this.location = location; 83 } 84 85 89 public void setOrder(DimensionDefinitionOrderType order) { 90 this.order = order; 91 } 92 93 97 public int getLocationOrder() { 98 return locationOrder; 99 } 100 101 105 public void setLocationOrder(int locationOrder) { 106 this.locationOrder = locationOrder; 107 } 108 109 116 public void setProperties(DimensionDefinitionLocationType location, DimensionDefinitionOrderType order, int locationOrder, String rankMetricName) { 117 if (location != null) { 118 this.location = location; 119 } 120 if (order != null) { 121 this.order = order; 122 } 123 if (locationOrder >= 0) { 124 this.locationOrder = locationOrder; 125 } 126 if (rankMetricName != null){ 127 this.rankMetricName = rankMetricName; 128 } 129 } 130 131 public boolean getGroups() { 132 return groups; 133 } 134 135 public void setGroups(boolean groups) { 136 this.groups = groups; 137 } 138 139 public String getRankMetricName() { 140 return rankMetricName; 141 } 142 143 public void setRankMetricName(String rankMetricName) { 144 this.rankMetricName = rankMetricName; 145 } 146 147 } 148 | Popular Tags |