public abstract class Cursor extends BasicCursor implements InFilterSupport
| Constructor and Description |
|---|
Cursor(CallContext context) |
Cursor(CallContext context,
ColumnMeta<?>... columns) |
Cursor(CallContext context,
Set<String> fields) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Resets filters, sorting and fully cleans the buffer.
|
static Cursor |
create(Table table,
CallContext callContext)
Creates a table specific cursor.
|
static Cursor |
create(Table table,
CallContext callContext,
Set<String> fields)
Creates a table specific cursor.
|
void |
delete()
Deletes current record.
|
void |
deleteAll()
Deletes all records that were caught by current filter.
|
void |
get(Object... values)
Performs a search of a record by key fields, throwing an exception if
the record is not found.
|
Object[] |
getCurrentKeyValues()
Returns an array of field values of the primary key.
|
In |
getIn() |
int |
getMaxStrLen(ColumnMeta<String> column)
Returns maximal length of the text field .
|
int |
getMaxStrLen(String name)
Deprecated.
|
int |
getRecversion()
Returns version of the record.
|
Cursor |
getXRec()
Returns a copy of the buffer containing values that were received by the
last read from the database.
|
void |
init()
Resets all fields of the buffer except for the key ones.
|
void |
insert()
Performs cursor insert into the DB.
|
Table |
meta()
Returns table description (meta information).
|
FieldsLookup |
setIn(BasicCursor otherCursor) |
void |
setRecversion(int v)
Sets version of the record.
|
boolean |
tryGet(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.
|
boolean |
tryInsert()
Tries to perform cursor insert into the DB.
|
boolean |
tryUpdate()
Tries to perform an update of the cursor content in the DB.
|
void |
update()
Performs an update of the cursor content in the DB, throwing an exception
in case if a record with such key fields is not found.
|
asCSVLine, canDelete, canInsert, canModify, 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, tryLastcanReadcallContext, close, isClosedpublic Cursor(CallContext context)
public Cursor(CallContext context, ColumnMeta<?>... columns)
public Cursor(CallContext context, Set<String> fields)
public static Cursor create(Table table, CallContext callContext)
table - Cursor related tablecallContext - Call context that is used for cursor creationpublic static Cursor create(Table table, CallContext callContext, Set<String> fields)
table - Cursor related tablecallContext - Call context that is used for cursor creationfields - Fields the cursor should operate onpublic final void insert()
public final boolean tryInsert()
TRUE if inserted successfully, otherwise - FALSE.public final void update()
public final boolean tryUpdate()
TRUE if updated successfully, otherwise - FALSE.public final void delete()
public final void deleteAll()
public final void get(Object... values)
values - values of the key fieldspublic final boolean tryGet(Object... values)
values - values of the key fieldstrue if the record is found, otherwise - falsepublic final boolean tryGetCurrent()
true if the record is retrieved, otherwise - falsepublic final void setRecversion(int v)
v - new version.public final int getRecversion()
@Deprecated public final int getMaxStrLen(String name)
name - name of the text fieldpublic final int getMaxStrLen(ColumnMeta<String> column)
column - the text fieldpublic final void init()
public final Table meta()
meta in class BasicCursorpublic final void clear()
BasicCursorclear in class BasicCursorpublic final Cursor getXRec()
public FieldsLookup setIn(BasicCursor otherCursor)
setIn in interface InFilterSupportpublic In getIn()
getIn in interface InFilterSupportpublic final Object[] getCurrentKeyValues()
Copyright © 2021 CURS. All rights reserved.