public class Constraint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<Constraint,Column> |
constraints
map of multiple constraints, will be created if needed
|
Constructor and Description |
---|
Constraint(java.lang.String operator)
Create a new constraint with the given operator
|
Modifier and Type | Method and Description |
---|---|
Constraint |
and(Column c,
Constraint constraint)
Add a subordinate 'AND' constraint to a column
|
java.util.HashMap<Constraint,Column> |
getConstraints()
Get a map of subordinate constraints
|
java.lang.Object |
getValue()
Get the constrained value or null if the constraint has no value
(it is on a column)
|
protected void |
goMultiple()
Change this constraint so that it can contain subordinate constraints
|
boolean |
isMultiple()
Return true if this constraint contains subordinate constraints
|
Constraint |
or(Column c,
Constraint constraint)
Add a subordinate 'OR' constraint to a column
|
Constraint |
setValue(java.lang.Object value)
Set the value being constrained
|
java.lang.String |
toString() |
protected java.util.LinkedHashMap<Constraint,Column> constraints
public Constraint(java.lang.String operator)
operator
- or SQL keywordpublic Constraint setValue(java.lang.Object value)
value
- The valuepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getValue()
public java.util.HashMap<Constraint,Column> getConstraints()
public Constraint and(Column c, Constraint constraint)
c
- the columnconstraint
- the constraintpublic Constraint or(Column c, Constraint constraint)
c
- the columnconstraint
- the constraintprotected void goMultiple()
public boolean isMultiple()
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona