Package ru.curs.celesta.dbutils
Class MaterializedViewCursor
- java.lang.Object
-
- ru.curs.celesta.dbutils.CsqlBasicDataAccessor<CallContext>
-
- ru.curs.celesta.dbutils.BasicDataAccessor
-
- ru.curs.celesta.dbutils.BasicCursor
-
- ru.curs.celesta.dbutils.MaterializedViewCursor
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
LinecountCursor
public abstract class MaterializedViewCursor extends BasicCursor
Materialized view Cursor.- Since:
- 2017-07-06
- Author:
- ioann
-
-
Constructor Summary
Constructors Constructor Description MaterializedViewCursor(CallContext context)
MaterializedViewCursor(CallContext context, Set<String> fields)
MaterializedViewCursor(CallContext context, ColumnMeta<?>... columns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MaterializedViewCursor
create(MaterializedView view, CallContext callContext)
Creates a materialized view specific cursor.static MaterializedViewCursor
create(MaterializedView view, CallContext callContext, Set<String> fields)
Creates a materialized view specific cursor.void
getByValuesArray(Object... values)
Performs a search of a record by the key fields, throwing an exception if the record is not found.Object[]
getCurrentKeyValues()
Returns an array of field values of the primary key.MaterializedView
meta()
Returns materialized view description (meta information).boolean
tryGetByValuesArray(Object... values)
Tries to perform a search of a record by the key fields, returning a value whether the record was found or not.boolean
tryGetCurrent()
Retrieves a record from the database that corresponds to the fields of current primary key.-
Methods inherited from class ru.curs.celesta.dbutils.BasicCursor
asCSVLine, canDelete, canInsert, canModify, clear, clearBuffer, copyFieldsFrom, copyFiltersFrom, copyOrderFrom, count, descOrders, findSet, first, getBufferCopy, getComplexFilter, getCurrentValues, getOrderBy, getValue, isEquivalent, last, limit, navigate, navigate, next, nextInSet, orderBy, orderBy, orderBy, orderByColumnNames, position, previous, reset, setComplexFilter, setFilter, setFilter, setRange, setRange, setRange, setRange, setRange, setRange, setValue, tryFindSet, tryFirst, tryLast
-
Methods inherited from class ru.curs.celesta.dbutils.BasicDataAccessor
canRead
-
Methods inherited from class ru.curs.celesta.dbutils.CsqlBasicDataAccessor
callContext, close, isClosed
-
-
-
-
Constructor Detail
-
MaterializedViewCursor
public MaterializedViewCursor(CallContext context)
-
MaterializedViewCursor
public MaterializedViewCursor(CallContext context, ColumnMeta<?>... columns)
-
MaterializedViewCursor
public MaterializedViewCursor(CallContext context, Set<String> fields)
-
-
Method Detail
-
create
public static MaterializedViewCursor create(MaterializedView view, CallContext callContext)
Creates a materialized view specific cursor.- Parameters:
view
- Cursor related materialized viewcallContext
- Call context that is used for cursor creation- Returns:
-
create
public static MaterializedViewCursor create(MaterializedView view, CallContext callContext, Set<String> fields)
Creates a materialized view specific cursor.- Parameters:
view
- Cursor related materialized viewcallContext
- Call context that is used for cursor creationfields
- Fields the cursor should operate on- Returns:
-
meta
public MaterializedView meta()
Returns materialized view description (meta information).- Specified by:
meta
in classBasicCursor
- Returns:
-
getByValuesArray
public final void getByValuesArray(Object... values)
Performs a search of a record by the key fields, throwing an exception if the record is not found.- Parameters:
values
- values of the key fields
-
tryGetByValuesArray
public final boolean tryGetByValuesArray(Object... values)
Tries to perform a search of a record by the key fields, returning a value whether the record was found or not.- Parameters:
values
- values of the key fields- Returns:
true
if the record is found, otherwise -false
-
tryGetCurrent
public final boolean tryGetCurrent()
Retrieves a record from the database that corresponds to the fields of current primary key.- Returns:
true
if the record is retrieved, otherwise -false
-
getCurrentKeyValues
public Object[] getCurrentKeyValues()
Returns an array of field values of the primary key.- Returns:
-
-