| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.core.api.criteria; |
| 17 | |
|
| 18 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 19 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 20 | |
import javax.xml.bind.annotation.XmlAttribute; |
| 21 | |
import javax.xml.bind.annotation.XmlElement; |
| 22 | |
import javax.xml.bind.annotation.XmlElements; |
| 23 | |
import javax.xml.bind.annotation.XmlRootElement; |
| 24 | |
import javax.xml.bind.annotation.XmlType; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | 18 | @XmlRootElement(name = EqualExpression.Constants.ROOT_ELEMENT_NAME) |
| 40 | |
@XmlAccessorType(XmlAccessType.NONE) |
| 41 | |
@XmlType(name = EqualExpression.Constants.TYPE_NAME) |
| 42 | |
public final class EqualExpression extends AbstractExpression implements ValuedExpression { |
| 43 | |
|
| 44 | |
private static final long serialVersionUID = 7159459561133496549L; |
| 45 | |
|
| 46 | |
@XmlAttribute(name = CriteriaSupportUtils.PropertyConstants.PROPERTY_PATH) |
| 47 | |
private final String propertyPath; |
| 48 | |
@XmlElements(value = { |
| 49 | |
@XmlElement(name = CriteriaStringValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaStringValue.class, required = true), |
| 50 | |
@XmlElement(name = CriteriaDateTimeValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDateTimeValue.class, required = true), |
| 51 | |
@XmlElement(name = CriteriaDecimalValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDecimalValue.class, required = true), |
| 52 | |
@XmlElement(name = CriteriaIntegerValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaIntegerValue.class, required = true) |
| 53 | |
}) |
| 54 | |
private final CriteriaValue<?> value; |
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
@SuppressWarnings("unused") |
| 60 | 18 | private EqualExpression() { |
| 61 | 18 | this.propertyPath = null; |
| 62 | 18 | this.value = null; |
| 63 | 18 | } |
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
|
| 70 | |
|
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | |
|
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
|
| 82 | 28 | EqualExpression(String propertyPath, CriteriaValue<?> value) { |
| 83 | 28 | CriteriaSupportUtils.validateValuedExpressionConstruction(getClass(), propertyPath, value); |
| 84 | 26 | this.propertyPath = propertyPath; |
| 85 | 26 | this.value = value; |
| 86 | 26 | } |
| 87 | |
|
| 88 | |
@Override |
| 89 | |
public String getPropertyPath() { |
| 90 | 6 | return propertyPath; |
| 91 | |
} |
| 92 | |
|
| 93 | |
@Override |
| 94 | |
public CriteriaValue<?> getValue() { |
| 95 | 6 | return value; |
| 96 | |
} |
| 97 | |
|
| 98 | |
|
| 99 | |
|
| 100 | |
|
| 101 | 0 | static class Constants { |
| 102 | |
final static String ROOT_ELEMENT_NAME = "equal"; |
| 103 | |
final static String TYPE_NAME = "EqualType"; |
| 104 | |
} |
| 105 | |
|
| 106 | |
} |