1 package com.tonbeller.wcf.param; 2 3 7 public class SessionParam implements Cloneable { 8 9 String displayName; 10 String displayValue; 11 String name; 12 SqlExpr sqlExpr; 13 String mdxValue; 14 String textValue; 15 16 19 public String getTextValue() { 20 return textValue; 21 } 22 23 26 public void setTextValue(String textValue) { 27 this.textValue = textValue; 28 } 29 30 35 public String getMdxValue() { 36 return mdxValue; 37 } 38 39 44 public void setMdxValue(String mdxValue) { 45 this.mdxValue = mdxValue; 46 } 47 48 public SqlExpr getSqlExpr() { 49 return sqlExpr; 50 } 51 52 public void setSqlExpr(SqlExpr sqlExpr) { 53 this.sqlExpr = sqlExpr; 54 } 55 56 59 public Object getSqlValue() { 60 if (sqlExpr == null) 61 return null; 62 if (!(sqlExpr instanceof SqlEqualExpr)) 63 throw new IllegalStateException ("SqlEqualExpr required"); 64 return ((SqlEqualExpr)sqlExpr).getSqlValue(); 65 } 66 67 70 public void setSqlValue(Object sqlValue) { 71 SqlEqualExpr expr = new SqlEqualExpr(); 72 expr.setSqlValue(sqlValue); 73 setSqlExpr(expr); 74 } 75 76 80 public String getDisplayName() { 81 return displayName; 82 } 83 84 88 public void setDisplayName(String displayName) { 89 this.displayName = displayName; 90 } 91 92 96 public String getDisplayValue() { 97 return displayValue; 98 } 99 100 104 public void setDisplayValue(String displayValue) { 105 this.displayValue = displayValue; 106 } 107 108 112 public String getName() { 113 return name; 114 } 115 116 120 public void setName(String name) { 121 this.name = name; 122 } 123 124 public Object clone() throws CloneNotSupportedException { 125 SessionParam p = (SessionParam) super.clone(); 126 SqlExpr x = (SqlExpr) sqlExpr.clone(); 127 p.setSqlExpr(x); 128 return p; 129 } 130 131 } 132 | Popular Tags |