1 23 package org.mdarad.framework.expr; 24 25 import java.io.Serializable ; 26 import java.util.Locale ; 27 28 36 public class Criterion implements Serializable { 37 38 43 public Criterion(Class entity, String property, OperatorType operator, Object value) { 44 this(entity, property, operator, value, null); 45 } 46 51 public Criterion(Class entity, String property, OperatorType operator, Object value, Locale locale) { 52 if (entity == null || property == null || operator == null) { 53 throw new IllegalArgumentException ("The entity, property or " + 54 "operator cannot be null"); 55 } 56 57 this.entity = entity; 58 this.property = property; 59 this.operator = operator; 60 this.value = value; 61 this.locale = locale; 62 } 63 64 68 private Class entity; 69 70 public Class getEntity() { 71 return entity; 72 } 73 74 public void setEntity(Class class1) { 75 entity = class1; 76 } 77 78 79 83 private String property; 84 85 public String getProperty() { 86 return property; 87 } 88 89 public void setProperty(String string) { 90 property = string; 91 } 92 93 94 98 private OperatorType operator; 99 100 public OperatorType getOperator() { 101 return operator; 102 } 103 104 public void setOperator(OperatorType string) { 105 operator = string; 106 } 107 108 112 private Object value; 113 114 public Object getValue() { 115 return value; 116 } 117 118 public void setValue(Object object) { 119 value = object; 120 } 121 122 125 private Locale locale; 126 127 public Locale getLocale() { 128 return locale; 129 } 130 131 public void setLocale(Locale locale) { 132 this.locale = locale; 133 } 134 135 } 136 | Popular Tags |