COALESCE expression returns null if all its arguments evaluate
to null, and the value of the first non-null argument otherwise.
The return type is the type returned by the arguments if they are all of the same type, otherwise it is undetermined.
coalesce_expression::= COALESCE(scalar_expression {, scalar_expression}+)CoalesceExpression
| Modifier and Type | Field and Description |
|---|---|
| private List | items
The state objects representing the scalar expressions. |
| public static final String | STATE_OBJECTS_LIST
Notifies the content of the state object list has changed. |
| Access | Constructor and Description |
|---|---|
| public | CoalesceExpressionStateObject(StateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | CoalesceExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, List<StateObject> nullThe list of items)StateObjects representing the encapsulated
expressionsCreates a new |
| public | CoalesceExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, StateObject... nullThe list of items)StateObjects representing the encapsulated
expressionsCreates a new |
| public | CoalesceExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, String... nullThe list of expression to parse into their items)StateObjectCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(StateObjectVisitor
The visitor)visitor to visit this objectImplements org. StateObject by the given visitor.
|
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public <S extends StateObject> S | addItem(S
The child item)StateObject to become a child of this one
return The given itemImplements org. StateObject as a child of this one.
|
| public void | addItems(List<? extends StateObject>
The items)StateObjects to become children of this oneImplements org. StateObjects as children of this one.
|
| public void | addListChangeListener(String
The name of the list for which the listener will be notified when the content
of the list has changed listName, IListChangeListener<StateObject> The listener to be notified upon changes listener)Implements org. IListChangeListener for the specified list.
|
| protected boolean | Returns: true if both have equivalent children; false otherwiseThe stateObject)StateObject to compare its children to this one's childrenDetermines whether the children of this |
| public boolean | canMoveDown(StateObject
The item)StateObject that could potentially be moved downImplements org. StateObject can be moved down by one position in the
list owned by its parent.
|
| public boolean | canMoveUp(StateObject
The item)StateObject that could potentially be moved upImplements org. StateObject can be moved up by one position in the list
owned by its parent.
|
| public CoalesceExpression | getExpression()
Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public String | getIdentifier()
Implements abstract org. AbstractSingleEncapsulatedExpressionStateObject.
|
| public StateObject | getItem(int
The position of the index)StateObject to retrieveImplements org. StateObject at the given positions from the list
|
| public boolean | hasItems()
Implements org. StateObject has any children.
|
| protected void | initialize()
Overrides org. |
| public boolean | isEquivalent(StateObject
The stateObject)StateObject to compare its content to this oneOverrides org. Implements org. StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.
|
| public ListIterable | items()
Implements org. ListIterable over the children.
|
| public int | itemsSize()
Implements org. |
| public StateObject | moveDown(StateObject
The item)StateObject to move down in the listImplements org. StateObject down by one position in the list owned by its parent.
|
| public StateObject | moveUp(StateObject
The item)StateObject to move up in the listImplements org. StateObject up by one position in the list owned by its parent.
|
| public void | parseItem(String
The portion of the query representing a single encapsulated expression jpqlFragment)Parses the given JPQL fragment, which represents a single encapsulated expression, and creates
the |
| protected void | parseItemInternal(String...
The list of expression to parse into their items)StateObjectParses the given list of JPQL fragments, which represents each of the encapsulated expressions,
and creates the |
| public void | parseItems(ListIterator<String>
The portion of the query representing a single encapsulated expression items)Parses the given JPQL fragments, which represent individual expression, and creates the
|
| public void | parseItems(String...
The portion of the query representing a single encapsulated expression items)Parses the given JPQL fragments, which represent individual expression, and creates the
|
| public void | removeItem(StateObject
The child item)StateObject to not longer be a childImplements org. StateObject from the list of children.
|
| public void | removeItems(Collection<StateObject>
The items)StateObjects to remove from this oneImplements org. StateObject from the list of children.
|
| public void | removeListChangeListener(String
The name of the list for which the listener was registered listName, IListChangeListener<StateObject> The listener to unregister listener)Implements org. IListChangeListener that was registered for the specified list.
|
| public void | setExpression(CoalesceExpression
The expression)parsed object representing a CASE
expressionKeeps a reference of the |
| protected void | toTextEncapsulatedExpression(Appendable
The writer used to print out the string representation of the encapsulated
information writer)Implements abstract org. true string representation of a JPQL query but should be used for
debugging purposes.
|
| items | back to summary |
|---|---|
| private List<StateObject> items The state objects representing the scalar expressions. | |
| STATE_OBJECTS_LIST | back to summary |
|---|---|
| public static final String STATE_OBJECTS_LIST Notifies the content of the state object list has changed. | |
| CoalesceExpressionStateObject | back to summary |
|---|---|
| public CoalesceExpressionStateObject(StateObject parent) Creates a new
| |
| CoalesceExpressionStateObject | back to summary |
|---|---|
| public CoalesceExpressionStateObject(StateObject parent, List<StateObject> items) Creates a new
| |
| CoalesceExpressionStateObject | back to summary |
|---|---|
| public CoalesceExpressionStateObject(StateObject parent, StateObject... items) Creates a new
| |
| CoalesceExpressionStateObject | back to summary |
|---|---|
| public CoalesceExpressionStateObject(StateObject parent, String... items) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| addChildren | back to summary |
|---|---|
| protected void addChildren(List<StateObject> children) Overrides org. Doc from org. Adds the children of this
| |
| addItem | back to summary |
|---|---|
| public <S extends StateObject> S addItem(S item) Implements org. Doc from org. Adds the given
| |
| addItems | back to summary |
|---|---|
| public void addItems(List<? extends StateObject> items) Implements org. Doc from org. Adds the given list of
| |
| addListChangeListener | back to summary |
|---|---|
| public void addListChangeListener(String listName, IListChangeListener<StateObject> listener) Implements org. Doc from org. Registers the given
| |
| areChildrenEquivalent | back to summary |
|---|---|
| protected boolean areChildrenEquivalent(CoalesceExpressionStateObject stateObject) Determines whether the children of this
| |
| canMoveDown | back to summary |
|---|---|
| public boolean canMoveDown(StateObject item) Implements org. Doc from org. Determines whether the given
| |
| canMoveUp | back to summary |
|---|---|
| public boolean canMoveUp(StateObject item) Implements org. Doc from org. Determines whether the given
| |
| getExpression | back to summary |
|---|---|
| public CoalesceExpression getExpression() Implements org. Doc from org. Returns the actual parsed object if this
| |
| getIdentifier | back to summary |
|---|---|
| public String getIdentifier() Implements abstract org. Returns the JPQL identifier of the expression represented by this | |
| getItem | back to summary |
|---|---|
| public StateObject getItem(int index) Implements org. Doc from org. Returns the
| |
| hasItems | back to summary |
|---|---|
| public boolean hasItems() Implements org. Doc from org. Determines whether this
| |
| initialize | back to summary |
|---|---|
| protected void initialize() Overrides org. Doc from org. Initializes this state object.
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Overrides org. Implements org. Doc from org. Determines whether the given
| |
| items | back to summary |
|---|---|
| public ListIterable Implements org. Doc from org. Returns an
| |
| itemsSize | back to summary |
|---|---|
| public int itemsSize() Implements org. Doc from org. Returns the number of children this list holder has.
| |
| moveDown | back to summary |
|---|---|
| public StateObject moveDown(StateObject item) Implements org. Doc from org. Moves the given
| |
| moveUp | back to summary |
|---|---|
| public StateObject moveUp(StateObject item) Implements org. Doc from org. Moves the given
| |
| parseItem | back to summary |
|---|---|
| public void parseItem(String jpqlFragment) Parses the given JPQL fragment, which represents a single encapsulated expression, and creates
the
| |
| parseItemInternal | back to summary |
|---|---|
| protected void parseItemInternal(String... items) Parses the given list of JPQL fragments, which represents each of the encapsulated expressions,
and creates the
| |
| parseItems | back to summary |
|---|---|
| public void parseItems(ListIterator<String> items) Parses the given JPQL fragments, which represent individual expression, and creates the
| |
| parseItems | back to summary |
|---|---|
| public void parseItems(String... items) Parses the given JPQL fragments, which represent individual expression, and creates the
| |
| removeItem | back to summary |
|---|---|
| public void removeItem(StateObject item) Implements org. Doc from org. Removes the given
| |
| removeItems | back to summary |
|---|---|
| public void removeItems(Collection<StateObject> items) Implements org. Doc from org. Removes the given
| |
| removeListChangeListener | back to summary |
|---|---|
| public void removeListChangeListener(String listName, IListChangeListener<StateObject> listener) Implements org. Doc from org. Unregisters the given
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(CoalesceExpression expression) Keeps a reference of the
| |
| toTextEncapsulatedExpression | back to summary |
|---|---|
| protected void toTextEncapsulatedExpression(Appendable writer) throws IOException Implements abstract org. Prints out a string representation of this encapsulated information, which should not be used
to define a
| |