public abstract class BufferImpl extends HandleChain implements Buffer
Converted business logic invokes these methods on DMO proxies via a
DMO-specific interface in the form <DMO interface>.Buf
.
Each such interface extends both a custom interface of DMO-specific getter
and setter methods, as well as the Buffer
interface, which defines
the API for these standard services.
Dynamic proxy classes for each DMO type extend this class, so that business logic can invoke these standard services directly as method calls on DMO proxy instances.
This class is intentionally package private, since it is not meant to be extended outside of this package (and within this package only by dynamic proxy class), nor instantiated directly.
This class implements BufferReference
in order to grant its
instance methods access to the RecordBuffer
object associated with
each instance of the DMO proxy class which extends this class. This access
is necessary for these methods to do their work. Even though buffer()
is a public method, external packages will not be able to invoke
this method (except through reflection). This is by design, as business
logic is not meant to have access to RecordBuffer
instances.
The default implementation of this method here throws an exception, as it
is never intended to be called, but it needs to be present in order for
this class to compile, since it is referenced by other methods. Each DMO
proxy class overrides this method to provide a working implementation.
Modifier and Type | Class and Description |
---|---|
private static class |
BufferImpl.FindMode
The mode for finding (first, last, unique) records in a dynamic call to a buffer handle.
|
Modifier and Type | Field and Description |
---|---|
private character |
admData
Corresponds to ADM-DATA attribute.
|
private boolean |
deleted
Flag indicating this buffer was deleted.
|
private boolean |
hasError
The ERROR property accessible through isError() and setError() methods.
|
private java.lang.String |
namespaceURI
The default NAMESPACE-URI attribute.
|
private static java.lang.String |
PERMANENT_TABLE
Special 'pointer' used in management of BUFFER resources.
|
private integer |
uniqueID
Corresponds to UNIQUE-ID attribute.
|
name, nextSibling, prevSibling
instProc
Modifier | Constructor and Description |
---|---|
protected |
BufferImpl()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
_ambiguous()
Indicate whether the last record retrieval attempt failed because the
query criteria was ambiguous.
|
boolean |
_available()
Indicate whether a backing data record currently is available.
|
boolean |
_currentChanged()
Checks if the record in the buffer has changed in database since the
last
FIND CURRENT or GET CURRENT . |
boolean |
_dynamic()
Conversion of DYNAMIC attribute.
|
private logical |
_find(java.lang.String predicate,
BufferImpl.FindMode mode,
LockType lock)
Execute a dynamic FIRST, LAST or UNIQUE find query.
|
private java.lang.String |
_getHibernatePropertyName(java.lang.String memberName)
Returns the hibernate name of a legacy field name.
|
boolean |
_locked()
Indicate whether the last record retrieval attempt was denied because
the target record was locked.
|
boolean |
_newlyCreated()
Indicate whether the buffer associated currently contains a record, and
whether that record is transient.
|
private int |
_numFields()
Getter of NUM-FIELDS attribute.
|
logical |
ambiguous()
Indicate whether the last record retrieval attempt failed because the
query criteria was ambiguous.
|
logical |
available()
Indicate whether a backing data record currently is available.
|
void |
average(java.lang.String column,
NumberType num)
Aggregate method which averages the values of a single column across rows in the table
backing this buffer.
|
void |
average(java.lang.String column,
NumberType num,
java.lang.String where)
Aggregate method which averages the values of a single column across rows in the table
backing this buffer.
|
void |
average(java.lang.String column,
NumberType num,
java.lang.String where,
java.lang.Object... args)
Aggregate method which averages the values of a single column across rows in the table
backing this buffer.
|
protected abstract RecordBuffer |
buffer()
Get the
RecordBuffer instance associated with this object. |
logical |
bufferCompare(Buffer buffer)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(Buffer buffer,
character mode)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(Buffer buffer,
character mode,
character except)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(Buffer srcBuffer,
character mode,
character except,
character pairs)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(Buffer buffer,
character mode,
character except,
character pairs,
logical noLobs)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(handle bufHandle)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(handle bufHandle,
character mode)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(handle bufHandle,
character mode,
character except)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(handle bufHandle,
character mode,
character except,
character pairs)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCompare(handle bufHandle,
character mode,
character except,
character pairs,
logical noLobs)
Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
|
logical |
bufferCopy(Buffer buffer)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(Buffer buffer,
character except)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(Buffer buffer,
character except,
character pairs)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(Buffer buffer,
character except,
character pairs,
logical noLobs)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(handle bufHandle)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(handle bufHandle,
character except)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(handle bufHandle,
character except,
character pairs)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCopy(handle bufHandle,
character except,
character pairs,
logical noLobs)
Conversion of BUFFER-COPY() method (KW_BUF_COPY).
|
logical |
bufferCreate()
Conversion of BUFFER-CREATE() method (KW_BUF_CREA).
|
handle |
bufferField(character fieldName)
Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
|
handle |
bufferField(int fieldNumber)
Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
|
handle |
bufferField(NumberType fieldNumber)
Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
|
handle |
bufferField(java.lang.String fieldName)
Implementation of BUFFER-FIELD() method (KW_BUF_FLD).
|
logical |
bufferRelease()
Conversion of BUFFER-RELEASE() method (KW_BUF_REL).
|
protected boolean |
checkExtentRange(int index,
int max)
Check whether an extent field index is within the valid range
0 ≤ index < max . |
void |
count(java.lang.String column,
NumberType num)
Aggregate method which counts the rows in the table backing this buffer.
|
void |
count(java.lang.String column,
NumberType num,
java.lang.String where)
Aggregate method which counts the rows in the table backing this buffer.
|
void |
count(java.lang.String column,
NumberType num,
java.lang.String where,
java.lang.Object... args)
Aggregate method which counts the rows in the table backing this buffer.
|
void |
create()
Create a new record in the buffer.
|
logical |
currentChanged()
Checks if the record in the buffer has changed in database since the
last
FIND CURRENT or GET CURRENT . |
handle |
currentIteration()
Conversion of CURRENT-ITERATION attribute (KW_CUR_ITER).
|
handle |
defaultBufferHandle()
Obtain the handle to the buffer that was created by default for the temporary table backing
this buffer.
|
void |
delete()
Perform actual delete of an resource.
|
void |
delete(java.lang.String where,
java.lang.Object... args)
Delete all records associated with this buffer, which match the criteria specified by the
given where clause.
|
logical |
deleteAll()
Bulk delete all records associated with the buffer.
|
logical |
deleteRecord()
Delete the record currently in the buffer, if any.
|
protected logical |
deleteRecord(boolean validated)
Delete the record currently in the buffer, if any.
|
logical |
deleteRecord(java.util.function.Supplier<logical> valexp,
java.lang.String valmsg)
Delete the record currently in the buffer, IF and ONLY IF the given validation expression
evaluates
true . |
logical |
deleteRecord(java.util.function.Supplier<logical> valexp,
java.util.function.Supplier<character> valmsg)
Delete the record currently in the buffer, IF and ONLY IF the given validation expression
evaluates
true . |
BaseDataType |
dereference(java.lang.String memberName)
Dereference a named member from this collection.
|
void |
dereference(java.lang.String memberName,
java.lang.Object value)
This overloaded method is used when the dereference is the left-side of an assignment.
|
void |
disableDumpTriggers()
Disable the triggers associated with the FIND event for the buffer's table.
|
void |
disableLoadTriggers(boolean allowReplication)
Disable the triggers associated with the CREATE, WRITE, DELETE and ASSIGN events for the
buffer's table.
|
(package private) java.lang.String |
doGetName()
Get the
NAME attribute as java string. |
(package private) void |
doSetName(java.lang.String name)
Set NAME attribute without any checks.
|
logical |
dynamic()
Conversion of DYNAMIC attribute.
|
logical |
findByRowID(rowid id)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
integer lock,
int nowait)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
LockType lockType)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
long lock)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
long lock,
long nowait)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
long lock,
NumberType nowait)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
NumberType lock)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
NumberType lock,
long nowait)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findByRowID(rowid id,
NumberType lock,
NumberType nowait)
Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
|
logical |
findFirst()
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
LockType lockType)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
long lock)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
long lock,
long nowait)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
long lock,
NumberType nowait)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
NumberType lock)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
NumberType lock,
long nowait)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findFirst(character predicate,
NumberType lock,
NumberType nowait)
Conversion of FIND-FIRST() method (KW_FIND_1ST).
|
logical |
findLast()
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
LockType lockType)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
long lock)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
long lock,
long nowait)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
long lock,
NumberType nowait)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
NumberType lock)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
NumberType lock,
long nowait)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findLast(character predicate,
NumberType lock,
NumberType nowait)
Conversion of FIND-LAST() method (KW_FIND_LST).
|
logical |
findUnique()
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
LockType lockType)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
long lock)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
long lock,
long nowait)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
long lock,
NumberType nowait)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
NumberType lock)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
NumberType lock,
long nowait)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
logical |
findUnique(character predicate,
NumberType lock,
NumberType nowait)
Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
|
private static LockType |
fromLockNowait(long lock,
long nowait)
Return LockType instance for the given internal lock and nowait with corresponding error
processing .
|
character |
getADMData()
Get the value of the ADM-DATA attribute.
|
character |
getDbName()
Returns the state of the DBNAME attribute
|
character |
getNamespaceURI()
Returns the value of the the NAMESPACE-URI attribute.
|
character |
getTable()
Returns the state of the TABLE attribute
|
integer |
getUniqueID()
Gets the the unique ID number associated to this object by the underlying system.
|
protected boolean |
hasNextSibling()
Check if this resource supports the NEXT-SIBLING attribute.
|
protected boolean |
hasPrevSibling()
Check if this resource supports the PREV-SIBLING attribute.
|
character |
indexInformation()
Conversion of INDEX-INFORMATION method.
|
character |
indexInformation(int indexNum)
Conversion of INDEX-INFORMATION method.
|
character |
indexInformation(NumberType indexNum)
Conversion of INDEX-INFORMATION method.
|
protected void |
interlink()
Interlinks the newly created HandleChain in the both chains.
|
logical |
isError()
Returns the state of the ERROR attribute
|
logical |
locked()
Indicate whether the last record retrieval attempt was denied because
the target record was locked.
|
void |
maximum(java.lang.String column,
NumberType num)
Aggregate method which finds the maximum value of a single column across rows in the table
backing this buffer.
|
void |
maximum(java.lang.String column,
NumberType num,
java.lang.String where)
Aggregate method which finds the maximum value of a single column across rows in the table
backing this buffer.
|
void |
maximum(java.lang.String column,
NumberType num,
java.lang.String where,
java.lang.Object... args)
Aggregate method which finds the maximum value of a single column across rows in the table
backing this buffer.
|
void |
minimum(java.lang.String column,
NumberType num)
Aggregate method which finds the minimum value of a single column across rows in the table
backing this buffer.
|
void |
minimum(java.lang.String column,
NumberType num,
java.lang.String where)
Aggregate method which finds the minimum value of a single column across rows in the table
backing this buffer.
|
void |
minimum(java.lang.String column,
NumberType num,
java.lang.String where,
java.lang.Object... args)
Aggregate method which finds the minimum value of a single column across rows in the table
backing this buffer.
|
logical |
newlyCreated()
Indicate whether the buffer associated currently contains a record, and
whether that record is transient.
|
integer |
numFields()
Conversion of NUM-FIELDS attribute (KW_NUM_FLD).
|
protected void |
outOfBoundsError(int index)
Record or throw an "array subscript out of range" error condition for the given subscript.
|
void |
rawCopyFrom(raw field)
Perform a RAW-TRANSFER operation from the given raw field into this buffer.
|
void |
rawCopyTo(Buffer buffer)
Perform a RAW-TRANSFER operation from this buffer to the given buffer.
|
void |
rawCopyTo(FieldReference field)
Perform a RAW-TRANSFER operation from this buffer to the given field, which should be of
type
raw . |
void |
rawCopyTo(raw field)
Perform a RAW-TRANSFER operation from this buffer to the given raw variable.
|
recid |
recordID()
Get the record ID of the current buffer's current record, if any.
|
void |
release()
Validate and release the record currently in the buffer, if any.
|
protected boolean |
resourceDelete()
Delete the resource.
|
rowid |
rowID()
Get the row ID of the current buffer's current record, if any.
|
void |
setADMData(character value)
Set the value of the ADM-DATA attribute.
|
void |
setADMData(java.lang.String value)
Set the value of the ADM-DATA attribute.
|
void |
setError(boolean value)
Setter for ERROR attribute.
|
void |
setError(logical value)
Setter for ERROR attribute.
|
void |
setNamespaceURI(character uri)
Setter for NAMESPACE-URI attribute.
|
void |
setNamespaceURI(java.lang.String uri)
Setter for NAMESPACE-URI attribute.
|
void |
sum(java.lang.String column,
NumberType num)
Aggregate method which sums the values of a single column across rows in the table
backing this buffer.
|
void |
sum(java.lang.String column,
NumberType num,
java.lang.String where)
Aggregate method which sums the values of a single column across rows in the table
backing this buffer.
|
void |
sum(java.lang.String column,
NumberType num,
java.lang.String where,
java.lang.Object... args)
Aggregate method which sums the values of a single column across rows in the table
backing this buffer.
|
handle |
tableHandle()
Conversion of TABLE-HANDLE attribute (KW_TAB_HAND).
|
boolean |
valid()
Reports if this object is valid for use.
|
void |
validate()
Validate the record currently in the buffer, if any.
|
private static boolean |
validate(java.util.function.Supplier<logical> valexp,
java.util.function.Supplier<character> valmsg)
Processes validation rules, error checking and any other user-defined constraint processing
that needs to be applied.
|
private static boolean |
verifyTransaction(RecordBuffer buffer)
Checks if transaction is active otherwise records or shows error message.
|
private static logical |
wrapFirst(FindQuery findQuery,
LockType lockType)
Worker static method for wrapping ErrorConditionException and reusing
in all P2JQuery.findFirst() implementations
|
private static logical |
wrapLast(FindQuery findQuery,
LockType lockType)
Worker static method for wrapping ErrorConditionException and reusing
in all P2JQuery.findLast() implementations
|
private static logical |
wrapUnique(FindQuery findQuery,
LockType lockType)
Worker static method for wrapping ErrorConditionException and reusing
in all P2JQuery.findUnique() implementations
|
firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameReadOnly, hasParent, hasPrivateData, isChained, lastResource, lastResource, name, name, name, readOnlyError, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, implicitDeletion, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
id, id, unknown
setCurrentIteration
readXml, readXml, readXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXml
getResourceType
private static final java.lang.String PERMANENT_TABLE
LegacyResource
, this type starts with an underscore.private final character admData
private final integer uniqueID
private boolean hasError
private java.lang.String namespaceURI
unknown
value.
TODO:
This attribute (NAMESPACE-URI) from CREATE TEMP-TABLE is not handled at all in the P2J
conversion so it completely removed in the generated code.
It should be stored in the buffer/table.
For the moment it is stored here so the getter/setter to partially work.private boolean deleted
protected BufferImpl()
private static logical wrapFirst(FindQuery findQuery, LockType lockType)
findQuery
- instance of FindQuerytrue
if FIND-FIRST() succeeds,
else false
.private static logical wrapLast(FindQuery findQuery, LockType lockType)
findQuery
- instance of FindQuerytrue
if FIND-LAST() succeeds,
else false
.private static logical wrapUnique(FindQuery findQuery, LockType lockType)
findQuery
- instance of FindQuerytrue
if FIND-UNIQUE() succeeds,
else false
.private static boolean verifyTransaction(RecordBuffer buffer)
buffer
- Record buffer.true
if a transaction is active else false
.protected abstract RecordBuffer buffer()
RecordBuffer
instance associated with this object.
This implementation exists only to satisfy the Java compiler. This
method is only meaningful when a proxy DMO class is created by RecordBuffer
, which will implement this method to return an instance
of RecordBuffer
associated with the proxy DMO instance.
java.lang.UnsupportedOperationException
- always.public boolean valid()
valid
in interface WrappedResource
deleted
flag. If a record buffer has been defined, it
is valid for use until is deleted.public handle defaultBufferHandle()
defaultBufferHandle
in interface BufferHandle
public recid recordID()
This method will return a 32-bit recid which represents the internal row ID of the given record. If the actual row ID (which is implemented as a wider integer) cannot fit due to overflow, an error condition will be raised.
recordID
in interface Buffer
dmo
, a recid
initialized as unknown value is returned.ErrorConditionException
- if the actual record ID is too wide to fit within a 32-bit
integer.public rowid rowID()
public logical available()
public boolean _available()
_available
in interface Buffer
true
if data is available, false
if
no record backs this buffer.public logical currentChanged()
FIND CURRENT
or GET CURRENT
.
P2J implementation of 4GL function CURRENT-CHANGED
.currentChanged
in interface Buffer
true
if the database record differs from the
value in memory buffer that was queried with the last
FIND
and false
otherwisepublic boolean _currentChanged()
FIND CURRENT
or GET CURRENT
.
P2J implementation of 4GL function CURRENT-CHANGED
._currentChanged
in interface Buffer
true
if the database record differs from the
value in memory buffer that was queried with the last
FIND
and false
otherwisepublic logical newlyCreated()
newlyCreated
in interface Buffer
true
if a record exists and is new, else
false
.public boolean _newlyCreated()
_newlyCreated
in interface Buffer
true
if a record exists and is new, else
false
.public logical locked()
public boolean _locked()
public logical ambiguous()
public boolean _ambiguous()
_ambiguous
in interface Buffer
true
if the query was ambiguous;
false
if the attempt succeeded, or if no attempt
has yet been made.public void rawCopyTo(raw field)
public void rawCopyTo(FieldReference field)
raw
. Serializes the record currently in the buffer into the specified
field.public void rawCopyTo(Buffer buffer)
public void rawCopyFrom(raw field)
rawCopyFrom
in interface Buffer
field
- A raw
field from which to copy the record into this buffer.public void create()
create
in interface Buffer
ErrorConditionException
- if there is an error retrieving the next available primary key
from the database or locking the record.public logical deleteRecord()
deleteRecord
in interface Buffer
true
if the delete was possible.ErrorConditionException
- if no record currently is loaded in the buffer, or if there is
an error deleting the current record from the database.public logical deleteRecord(java.util.function.Supplier<logical> valexp, java.lang.String valmsg)
true
.deleteRecord
in interface Buffer
valexp
- The validation expression to evaluate.valmsg
- The error message to display when validation fails.true
if validation succeeds, false
if it fails and no
exception is raised.ErrorConditionException
- If no record currently is loaded in the buffer, or if there is an error deleting
the current record from the database or if the validation expression fails.public logical deleteRecord(java.util.function.Supplier<logical> valexp, java.util.function.Supplier<character> valmsg)
true
.deleteRecord
in interface Buffer
valexp
- The validation expression to evaluate.valmsg
- The error message to display when validation fails.true
if validation succeeds, false
if it fails and no
exception is raised.ErrorConditionException
- If no record currently is loaded in the buffer, or if there is an error deleting
the current record from the database or if the validation expression fails.public void delete(java.lang.String where, java.lang.Object... args)
NOTE: the current implementation must not be invoked for a DMO which is backed by a permanent table; only temp-table bulk delete is supported at this time.
When this method returns:
available
returns
false
). This is because these buffers are used in a loop and the last
record is also deleted. P2J will detect these loops and convert it to the much
faster bulk delete. P4GL does not allow bulk delete using SQL
DELETE FROM ... WHERE
syntax.
delete
in interface Buffer
where
- An HQL where clause snippet which defines the restriction criteria to apply to the
delete. All references to properties in a DMO must be unqualified.args
- Query substitution parameters required by the where clause.ErrorConditionException
- if there is an error deleting the records.java.lang.UnsupportedOperationException
- if invoked on a buffer associated with a permanent table.public logical deleteAll()
When this method returns, the buffer is empty (Ie. available()
returns false
)
for both temp and permanent tables.
deleteAll
in interface Buffer
true
if the delete was possible.ErrorConditionException
- if an error occurs performing the bulk delete operation.public void average(java.lang.String column, NumberType num)
average
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.ErrorConditionException
- if an error occurs performing the aggregate operation.public void average(java.lang.String column, NumberType num, java.lang.String where)
average
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.ErrorConditionException
- if an error occurs performing the aggregate operation.public void average(java.lang.String column, NumberType num, java.lang.String where, java.lang.Object... args)
average
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.args
- Query substitution arguments.ErrorConditionException
- if an error occurs performing the aggregate operation.public void count(java.lang.String column, NumberType num)
count
in interface Buffer
column
- An expression indicating the name of the column to aggregate. May be the wildcard
character ("*").num
- Variable into which to store the aggregate result.ErrorConditionException
- if an error occurs performing the aggregate operation.public void count(java.lang.String column, NumberType num, java.lang.String where)
count
in interface Buffer
column
- An expression indicating the name of the column to aggregate. May be the wildcard
character ("*").num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.ErrorConditionException
- if an error occurs performing the aggregate operation.public void count(java.lang.String column, NumberType num, java.lang.String where, java.lang.Object... args)
count
in interface Buffer
column
- An expression indicating the name of the column to aggregate. May be the wildcard
character ("*").num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.args
- Query substitution arguments.ErrorConditionException
- if an error occurs performing the aggregate operation.public void minimum(java.lang.String column, NumberType num)
minimum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.ErrorConditionException
- if an error occurs performing the aggregate operation.public void minimum(java.lang.String column, NumberType num, java.lang.String where)
minimum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.ErrorConditionException
- if an error occurs performing the aggregate operation.public void minimum(java.lang.String column, NumberType num, java.lang.String where, java.lang.Object... args)
minimum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.args
- Query substitution arguments.ErrorConditionException
- if an error occurs performing the aggregate operation.public void maximum(java.lang.String column, NumberType num)
maximum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.ErrorConditionException
- if an error occurs performing the aggregate operation.public void maximum(java.lang.String column, NumberType num, java.lang.String where)
maximum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.ErrorConditionException
- if an error occurs performing the aggregate operation.public void maximum(java.lang.String column, NumberType num, java.lang.String where, java.lang.Object... args)
maximum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.args
- Query substitution arguments.ErrorConditionException
- if an error occurs performing the aggregate operation.public void sum(java.lang.String column, NumberType num)
sum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.ErrorConditionException
- if an error occurs performing the aggregate operation.public void sum(java.lang.String column, NumberType num, java.lang.String where)
sum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.ErrorConditionException
- if an error occurs performing the aggregate operation.public void sum(java.lang.String column, NumberType num, java.lang.String where, java.lang.Object... args)
sum
in interface Buffer
column
- An expression indicating the name of the column to aggregate.num
- Variable into which to store the aggregate result.where
- HQL where clause used to filter the records.args
- Query substitution arguments.ErrorConditionException
- if an error occurs performing the aggregate operation.public void release()
release
in interface Buffer
ErrorConditionException
- if the buffer fails validation.public void validate()
validate
in interface Buffer
ErrorConditionException
- if the buffer fails validation.public handle bufferField(int fieldNumber)
bufferField
in interface Buffer
fieldNumber
- field number. An INTEGER expression representing the sequence
number of the field in the buffer.public handle bufferField(java.lang.String fieldName)
bufferField
in interface Buffer
fieldName
- field name. A CHARACTER string expression representing the name
of the field in the buffer.public logical bufferCopy(Buffer buffer)
bufferCopy
in interface Buffer
buffer
- The source buffer to copy from.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(Buffer buffer, character except)
bufferCopy
in interface Buffer
buffer
- The source buffer to copy from.except
- A comma-separated list of fields that will be ignored in the copy process.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(Buffer buffer, character except, character pairs)
bufferCopy
in interface Buffer
buffer
- The source buffer to copy from.except
- A comma-separated list of fields that will be ignored in the copy process.pairs
- A comma-separated list of field-name pairs to be copied. Each pair must contain
one field name from the source and one field name from the target.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(Buffer buffer, character except, character pairs, logical noLobs)
bufferCopy
in interface Buffer
buffer
- The source buffer to copy from.except
- A comma-separated list of fields that will be ignored in the copy process.pairs
- A comma-separated list of field-name pairs to be copied. Each pair must contain
one field name from the source and one field name from the target.noLobs
- If TRUE
, BLOB and CLOB fields are ignored during the copy.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(handle bufHandle)
bufferCopy
in interface Buffer
bufHandle
- The handle of the source buffer to copy from.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(handle bufHandle, character except)
bufferCopy
in interface Buffer
bufHandle
- The handle of the source buffer to copy from.except
- A comma-separated list of fields that will be ignored in the copy process.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(handle bufHandle, character except, character pairs)
bufferCopy
in interface Buffer
bufHandle
- The handle of the source buffer to copy from.except
- A comma-separated list of fields that will be ignored in the copy process.pairs
- A comma-separated list of field-name pairs to be copied. Each pair must contain
one field name from the source and one field name from the target.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCopy(handle bufHandle, character except, character pairs, logical noLobs)
bufferCopy
in interface Buffer
bufHandle
- The handle of the source buffer to copy from.except
- A comma-separated list of fields that will be ignored in the copy process.pairs
- A comma-separated list of field-name pairs to be copied. Each pair must contain
one field name from the source and one field name from the target.noLobs
- If TRUE
, BLOB and CLOB fields are ignored during the copy.true
if BUFFER-COPY() succeeds, else false
.public logical bufferCompare(Buffer buffer)
bufferCompare
in interface Buffer
buffer
- Buffer with which to compare.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(Buffer buffer, character mode)
bufferCompare
in interface Buffer
buffer
- Buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(Buffer buffer, character mode, character except)
bufferCompare
in interface Buffer
buffer
- Buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.except
- A comma-separated list of fields that will be ignored in the compare process.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(Buffer srcBuffer, character mode, character except, character pairs)
bufferCompare
in interface Buffer
srcBuffer
- Buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.except
- A comma-separated list of fields that will be ignored in the compare process.pairs
- A comma-separated list of field-name pairs to be compared. Each pair must
contain one field name from the source and one field name from the target.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(Buffer buffer, character mode, character except, character pairs, logical noLobs)
bufferCompare
in interface Buffer
buffer
- Buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.except
- A comma-separated list of fields that will be ignored in the compare process.pairs
- A comma-separated list of field-name pairs to be compared. Each pair must
contain one field name from the source and one field name from the target.noLobs
- If TRUE
, BLOB and CLOB fields are ignored during the copy.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(handle bufHandle)
bufferCompare
in interface Buffer
bufHandle
- Handle of buffer with which to compare.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(handle bufHandle, character mode)
bufferCompare
in interface Buffer
bufHandle
- Handle of buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(handle bufHandle, character mode, character except)
bufferCompare
in interface Buffer
bufHandle
- Handle of buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.except
- A comma-separated list of fields that will be ignored in the compare process.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(handle bufHandle, character mode, character except, character pairs)
bufferCompare
in interface Buffer
bufHandle
- Handle of buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.except
- A comma-separated list of fields that will be ignored in the compare process.pairs
- A comma-separated list of field-name pairs to be compared. Each pair must
contain one field name from the source and one field name from the target.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCompare(handle bufHandle, character mode, character except, character pairs, logical noLobs)
bufferCompare
in interface Buffer
bufHandle
- Handle of buffer with which to compare.mode
- The text "binary" or "case-sensitive", to provide that type of comparison.except
- A comma-separated list of fields that will be ignored in the compare process.pairs
- A comma-separated list of field-name pairs to be compared. Each pair must
contain one field name from the source and one field name from the target.noLobs
- If TRUE
, BLOB and CLOB fields are ignored during the compare.true
if BUFFER-COMPARE() succeeds,
else false
.public logical bufferCreate()
bufferCreate
in interface Buffer
true
if successfulpublic logical bufferRelease()
bufferRelease
in interface Buffer
true
if BUFFER-RELEASE() succeeds,
else false
.public BaseDataType dereference(java.lang.String memberName)
dereference
in interface Dereferenceable
memberName
- The name of the member to be extracted.public void dereference(java.lang.String memberName, java.lang.Object value)
dereference
in interface Dereferenceable
memberName
- The name of the member to be extracted.value
- The new value that will be assigned to the extracted field.public logical findByRowID(rowid id)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.true
if it finds the record, else
false
.public logical findByRowID(rowid id, LockType lockType)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the desired record.lockType
- Lock typetrue
if it finds the record, else false
.public logical findByRowID(rowid id, long lock)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKtrue
if it finds the record, else
false
.ErrorConditionException
public logical findByRowID(rowid id, NumberType lock)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKtrue
if it finds the record, else
false
.ErrorConditionException
public logical findByRowID(rowid id, long lock, long nowait)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- NO-WAITtrue
if it finds the record, else
false
.ErrorConditionException
public logical findByRowID(rowid id, NumberType lock, long nowait)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- NO-WAITtrue
if it finds the record, else
false
.ErrorConditionException
public logical findByRowID(rowid id, long lock, NumberType nowait)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- NO-WAITtrue
if it finds the record, else
false
.ErrorConditionException
public logical findByRowID(rowid id, NumberType lock, NumberType nowait)
findByRowID
in interface Buffer
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- NO-WAITtrue
if it finds the record, else
false
.ErrorConditionException
public logical findByRowID(rowid id, integer lock, int nowait)
id
- An expression of type ROWID that represents the rowid of the
desired record.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- NO-WAITtrue
if it finds the record, else
false
.ErrorConditionException
public logical findFirst()
public logical findFirst(character predicate)
public logical findFirst(character predicate, LockType lockType)
public logical findFirst(character predicate, long lock)
public logical findFirst(character predicate, NumberType lock)
public logical findFirst(character predicate, long lock, long nowait)
findFirst
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-FIRST() succeeds, else false
.ErrorConditionException
public logical findFirst(character predicate, NumberType lock, long nowait)
findFirst
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-FIRST() succeeds, else false
.ErrorConditionException
public logical findFirst(character predicate, long lock, NumberType nowait)
findFirst
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-FIRST() succeeds, else false
.ErrorConditionException
public logical findFirst(character predicate, NumberType lock, NumberType nowait)
findFirst
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-FIRST() succeeds, else false
.ErrorConditionException
public logical findLast()
public logical findLast(character predicate)
public logical findLast(character predicate, LockType lockType)
public logical findLast(character predicate, long lock)
public logical findLast(character predicate, NumberType lock)
public logical findLast(character predicate, long lock, long nowait)
findLast
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-LAST() succeeds, else false
.ErrorConditionException
public logical findLast(character predicate, NumberType lock, long nowait)
findLast
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-LAST() succeeds, else false
.ErrorConditionException
public logical findLast(character predicate, long lock, NumberType nowait)
findLast
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-LAST() succeeds, else false
.ErrorConditionException
public logical findLast(character predicate, NumberType lock, NumberType nowait)
findLast
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-LAST() succeeds, else false
.ErrorConditionException
public logical findUnique()
findUnique
in interface Buffer
true
if FIND-UNIQUE() succeeds, else false
.public logical findUnique(character predicate)
findUnique
in interface Buffer
predicate
- Predicate expression for find.true
if FIND-UNIQUE() succeeds, else false
.public logical findUnique(character predicate, LockType lockType)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lockType
- Lock typetrue
if FIND-UNIQUE() succeeds, else false
.public logical findUnique(character predicate, long lock)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKtrue
if FIND-UNIQUE() succeeds, else false
.public logical findUnique(character predicate, NumberType lock)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKtrue
if FIND-UNIQUE() succeeds, else false
.public logical findUnique(character predicate, long lock, long nowait)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-UNIQUE() succeeds, else false
.ErrorConditionException
public logical findUnique(character predicate, NumberType lock, long nowait)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-UNIQUE() succeeds, else false
.ErrorConditionException
public logical findUnique(character predicate, long lock, NumberType nowait)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-UNIQUE() succeeds,
else false
.ErrorConditionException
public logical findUnique(character predicate, NumberType lock, NumberType nowait)
findUnique
in interface Buffer
predicate
- Predicate expression for find.lock
- SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCKnowait
- Integer value of one of the following: NO-WAIT, 0, or the Unknown value (?).true
if FIND-UNIQUE() succeeds,
else false
.ErrorConditionException
public integer numFields()
public void disableDumpTriggers()
disableDumpTriggers
in interface Buffer
public void disableLoadTriggers(boolean allowReplication)
disableLoadTriggers
in interface Buffer
allowReplication
- If true
then only CREATE, DELETE, ASSIGN and WRITE triggers are
disabled, and not REPLICATION-CREATE, REPLICATION-DELETE and REPLICATION-WRITE
triggers.public handle currentIteration()
currentIteration
in interface IterableResource
public logical isError()
public void setError(boolean value)
public void setError(logical value)
public character getDbName()
getDbName
in interface DatabaseInfo
public character getTable()
getTable
in interface DatabaseInfo
public handle tableHandle()
tableHandle
in interface Buffer
public character indexInformation()
indexInformation
in interface Buffer
indexInformation
in interface IndexInformation
public character indexInformation(int indexNum)
indexInformation
in interface Buffer
indexInformation
in interface IndexInformation
indexNum
- 1-based number of the index in the definition order.public character indexInformation(NumberType indexNum)
indexInformation
in interface Buffer
indexInformation
in interface IndexInformation
indexNum
- 1-based number of the index in the definition order.public boolean _dynamic()
true
if the buffer is dynamic._dynamic
in interface DynamicResource
true
if the buffer is dynamic.public logical dynamic()
true
if the buffer is dynamic.dynamic
in interface DynamicResource
true
if the buffer is dynamic.public character getADMData()
getADMData
in interface ADMData
public void setADMData(java.lang.String value)
setADMData
in interface ADMData
value
- The new value.public void setADMData(character value)
setADMData
in interface ADMData
value
- The new value.public integer getUniqueID()
getUniqueID
in interface UniqueID
public character getNamespaceURI()
getNamespaceURI
in interface NamespaceURI
public void setNamespaceURI(java.lang.String uri)
setNamespaceURI
in interface NamespaceURI
uri
- The new value of the NAMESPACE-URI attribute.public void setNamespaceURI(character uri)
setNamespaceURI
in interface NamespaceURI
uri
- The new value of the NAMESPACE-URI attribute.public void delete()
HandleChain.delete()
really disconnected it from the chain)delete
in interface Deletable
delete
in class HandleChain
public handle bufferField(NumberType fieldNumber)
bufferField
in interface Buffer
fieldNumber
- field number. An INTEGER expression representing the sequence
number of the field in the buffer.public handle bufferField(character fieldName)
bufferField
in interface Buffer
fieldName
- A CHARACTER string expression representing the name of the field in the buffer.void doSetName(java.lang.String name)
name
- Name to set.java.lang.String doGetName()
NAME
attribute as java string.NAME
attribute as a java string. null
if
NAME
is unknown
.protected boolean hasNextSibling()
true
. The chain is one-directional,
starting at SESSION:FIRST-BUFFER.
Only the dynamic()
buffers are stored in the chain. The method will return false for
static buffers.
hasNextSibling
in class HandleChain
true
only for dynamic buffers.protected boolean hasPrevSibling()
false
. The buffers chain is
one-directional, starting at SESSION:FIRST-BUFFER. There is no LAST-BUFFER attribute
associated with the SESSION handle.hasPrevSibling
in class HandleChain
false
.protected void interlink()
BUFFERs use special order: TEMP-TABLES (static and dynamic in the order they are added) first, then PERMANENT buffers at the end of the list.
interlink
in class HandleChain
protected boolean resourceDelete()
resourceDelete
in class HandleChain
true
if the resource was deleted.protected boolean checkExtentRange(int index, int max)
0 ≤ index < max
.
Raise an error if not, unless errors are silenced.
This method is meant to be called by DMO proxy objects which extend this class, from
within their indexed setter and getter methods which accept an int
value for the
element index.
index
- Zero-based extent field index to check.max
- Maximum number of elements in the extent field.true
if index
falls within the valid range,
false
if outside the range and errors are silenced.ErrorConditionException
- if index
is outside the valid range and errors are not silenced.protected void outOfBoundsError(int index)
index
- Zero-based subscript value.protected logical deleteRecord(boolean validated)
validated
- true
if there was validation and it passed. false
if
there was no validation.true
if the delete was possible.ErrorConditionException
- if no record currently is loaded in the buffer, or if there is
an error deleting the current record from the database.private static LockType fromLockNowait(long lock, long nowait) throws ErrorConditionException
lock
- Integer value.nowait
- Integer value.LockType
instance.ErrorConditionException
private static boolean validate(java.util.function.Supplier<logical> valexp, java.util.function.Supplier<character> valmsg) throws ErrorConditionException
valexp
- The validation expression to evaluate.valmsg
- The error message to display when validation fails.true
if the validation succeeded and the record can be deleted.ErrorConditionException
- On the failure of validation processing or other error checking.EndConditionException
- On the failure of validate expression evaluationprivate int _numFields()
private java.lang.String _getHibernatePropertyName(java.lang.String memberName)
memberName
- The legacy field name.private logical _find(java.lang.String predicate, BufferImpl.FindMode mode, LockType lock)
If the method fails, it does not raise an error but displays a message. To suppress it, the method should be called with NO-ERROR clause.
predicate
- Predicate expression for find that evaluates to the following syntax:
[ WHERE [ logical-expression ] ] [ USE-INDEX index-name ]
mode
- Search mode, one of FIRST, LAST or UNIQUE.lock
- Lock type. May additionally have no-wait flag set.true
if operation succeeds, else false
.