public class Constant extends Object implements Expression, Comparable<Constant>
LanguageObject.Util| Modifier and Type | Field and Description |
|---|---|
static Comparator<Object> |
COMPARATOR |
static Constant |
NULL_CONSTANT |
| Constructor and Description |
|---|
Constant(Object value)
Construct a constant with a value, which may be null.
|
Constant(Object value,
Class<?> type)
Construct a typed constant.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
Object |
clone()
Return a shallow copy of this object - value is NOT cloned!
|
int |
compareTo(Constant o) |
boolean |
equals(Object obj)
Compare this constant to another constant for equality.
|
Class<?> |
getType()
Get type of constant, if known
|
Object |
getValue()
Get value of constant
|
int |
hashCode()
Define hash code to be that of the underlying object to make it stable.
|
boolean |
isBindEligible() |
boolean |
isMultiValued() |
boolean |
isNull()
Return true if the constant is null.
|
void |
setBindEligible(boolean bindEligible) |
void |
setMultiValued(List<?> value) |
void |
setType(Class<?> type)
TODO: remove me when a null type is supported
|
String |
toString()
Return a String representation of this object using SQLStringVisitor.
|
public static final Constant NULL_CONSTANT
public static final Comparator<Object> COMPARATOR
public Constant(Object value, Class<?> type)
value - Constant value, may be nulltype - Type for the constant, should never be nullpublic Constant(Object value)
value - Constant value, may be nullpublic Class<?> getType()
getType in interface Expressionpublic void setType(Class<?> type)
type - public Object getValue()
public boolean isNull()
public void setMultiValued(List<?> value)
public boolean isMultiValued()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObjectacceptVisitor in interface LanguageObjectvisitor - Visitor being usedpublic boolean equals(Object obj)
public int hashCode()
public Object clone()
clone in interface LanguageObjectclone in class Objectpublic String toString()
public int compareTo(Constant o)
compareTo in interface Comparable<Constant>public boolean isBindEligible()
public void setBindEligible(boolean bindEligible)
Copyright © 2018 JBoss by Red Hat. All rights reserved.