public final class WindowFrame
extends java.lang.Object
| Constructor and Description |
|---|
WindowFrame(WindowFrameUnits units,
WindowFrameBound starting,
WindowFrameBound following,
WindowFrameExclusion exclusion)
Creates new instance of window frame clause.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getEndIndex(Window over,
Session session,
java.util.ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow)
Returns end index for the specified frame, or default end index if frame
is null.
|
WindowFrameExclusion |
getExclusion()
Returns the exclusion clause.
|
WindowFrameBound |
getFollowing()
Returns the following clause.
|
java.lang.StringBuilder |
getSQL(java.lang.StringBuilder builder)
Append SQL representation to the specified builder.
|
int |
getStartIndex(Session session,
java.util.ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow)
Returns start index of this frame,
|
WindowFrameBound |
getStarting()
Returns the starting clause.
|
WindowFrameUnits |
getUnits()
Returns the units.
|
boolean |
isValid()
Checks validity of this frame.
|
boolean |
isVariableBounds()
Check if bounds of this frame has variable expressions.
|
java.util.Iterator<Value[]> |
iterator(Session session,
java.util.ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow,
boolean reverse)
Returns iterator.
|
static java.util.Iterator<Value[]> |
iterator(Window over,
Session session,
java.util.ArrayList<Value[]> orderedRows,
SortOrder sortOrder,
int currentRow,
boolean reverse)
Returns iterator for the specified frame, or default iterator if frame is
null.
|
public WindowFrame(WindowFrameUnits units, WindowFrameBound starting, WindowFrameBound following, WindowFrameExclusion exclusion)
units - unitsstarting - starting clausefollowing - following clauseexclusion - exclusion clausepublic static java.util.Iterator<Value[]> iterator(Window over, Session session, java.util.ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow, boolean reverse)
over - windowsession - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowreverse - whether iterator should iterate in reverse orderpublic static int getEndIndex(Window over, Session session, java.util.ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow)
over - windowsession - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowjava.lang.UnsupportedOperationException - if over is not null and its exclusion clause is not EXCLUDE
NO OTHERSpublic WindowFrameUnits getUnits()
public WindowFrameBound getStarting()
public WindowFrameBound getFollowing()
public WindowFrameExclusion getExclusion()
public boolean isValid()
public boolean isVariableBounds()
optimize(Session) invocation.public java.util.Iterator<Value[]> iterator(Session session, java.util.ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow, boolean reverse)
session - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowreverse - whether iterator should iterate in reverse orderpublic int getStartIndex(Session session, java.util.ArrayList<Value[]> orderedRows, SortOrder sortOrder, int currentRow)
session - the sessionorderedRows - ordered rowssortOrder - sort ordercurrentRow - index of the current rowjava.lang.UnsupportedOperationException - if exclusion clause is not EXCLUDE NO OTHERSpublic java.lang.StringBuilder getSQL(java.lang.StringBuilder builder)
builder - string builderExpression.getSQL(StringBuilder)