| 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 org.kuali.rice.core.api.CoreConstants; |
| 19 | |
import org.w3c.dom.Element; |
| 20 | |
|
| 21 | |
import javax.xml.bind.annotation.XmlAccessType; |
| 22 | |
import javax.xml.bind.annotation.XmlAccessorType; |
| 23 | |
import javax.xml.bind.annotation.XmlAnyElement; |
| 24 | |
import javax.xml.bind.annotation.XmlAttribute; |
| 25 | |
import javax.xml.bind.annotation.XmlElement; |
| 26 | |
import javax.xml.bind.annotation.XmlElements; |
| 27 | |
import javax.xml.bind.annotation.XmlRootElement; |
| 28 | |
import javax.xml.bind.annotation.XmlType; |
| 29 | |
import java.util.Collection; |
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | 24 | @XmlRootElement(name = LessThanPredicate.Constants.ROOT_ELEMENT_NAME) |
| 41 | |
@XmlAccessorType(XmlAccessType.NONE) |
| 42 | |
@XmlType(name = LessThanPredicate.Constants.TYPE_NAME, propOrder = { |
| 43 | |
CriteriaSupportUtils.PropertyConstants.VALUE, |
| 44 | |
CoreConstants.CommonElements.FUTURE_ELEMENTS |
| 45 | |
}) |
| 46 | |
public final class LessThanPredicate extends AbstractPredicate implements SingleValuedPredicate { |
| 47 | |
|
| 48 | |
private static final long serialVersionUID = 2576163857285296720L; |
| 49 | |
|
| 50 | |
@XmlAttribute(name = CriteriaSupportUtils.PropertyConstants.PROPERTY_PATH) |
| 51 | |
private final String propertyPath; |
| 52 | |
|
| 53 | |
@XmlElements(value = { |
| 54 | |
@XmlElement(name = CriteriaDecimalValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDecimalValue.class, required = true), |
| 55 | |
@XmlElement(name = CriteriaIntegerValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaIntegerValue.class, required = true), |
| 56 | |
@XmlElement(name = CriteriaDateTimeValue.Constants.ROOT_ELEMENT_NAME, type = CriteriaDateTimeValue.class, required = true) |
| 57 | |
}) |
| 58 | |
private final CriteriaValue<?> value; |
| 59 | |
|
| 60 | 10 | @SuppressWarnings("unused") |
| 61 | |
@XmlAnyElement |
| 62 | |
private final Collection<Element> _futureElements = null; |
| 63 | |
|
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
@SuppressWarnings("unused") |
| 68 | 4 | private LessThanPredicate() { |
| 69 | 4 | this.propertyPath = null; |
| 70 | 4 | this.value = null; |
| 71 | 4 | } |
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | |
|
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
|
| 82 | |
|
| 83 | |
|
| 84 | |
|
| 85 | |
|
| 86 | |
|
| 87 | |
|
| 88 | |
|
| 89 | 6 | LessThanPredicate(String propertyPath, CriteriaValue<?> value) { |
| 90 | 6 | CriteriaSupportUtils.validateValuedConstruction(getClass(), propertyPath, value); |
| 91 | 5 | this.propertyPath = propertyPath; |
| 92 | 5 | this.value = value; |
| 93 | 5 | } |
| 94 | |
|
| 95 | |
@Override |
| 96 | |
public String getPropertyPath() { |
| 97 | 1 | return propertyPath; |
| 98 | |
} |
| 99 | |
|
| 100 | |
@Override |
| 101 | |
public CriteriaValue<?> getValue() { |
| 102 | 2 | return value; |
| 103 | |
} |
| 104 | |
|
| 105 | |
|
| 106 | |
|
| 107 | |
|
| 108 | 0 | static class Constants { |
| 109 | |
final static String ROOT_ELEMENT_NAME = "lessThan"; |
| 110 | |
final static String TYPE_NAME = "LessThanType"; |
| 111 | |
} |
| 112 | |
|
| 113 | |
} |