private static class Persister.UpdateInfo
extends java.lang.Object
UPDATE
set of statements. The key part is formed by the type
and state
members,
while the sqlStrs
and paramsIdx
are the 'payload': the list of statements as
strings, respectively the indexes of the fields that are updated by respective statement.
As result objects of this class have two usages:
type
and state
are set (sqlStrs
and
paramsIdx
remain unset). This is enough to locate a record in the cache;
Modifier and Type | Field and Description |
---|---|
private int |
hash
The hash value.
|
private java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> |
paramsIdx
The indexes of properties that are used in the corresponding statement.
|
private java.util.Map<java.lang.Integer,java.lang.String> |
sqlStrs
The list of UPDATE statements.
|
private java.util.BitSet |
state
The set of properties that are updated by the statements.
|
private java.lang.Class<? extends BaseRecord> |
type
The DMO that is affected by the cached statements stored here.
|
Constructor and Description |
---|
UpdateInfo(java.lang.Class<? extends BaseRecord> type,
java.util.BitSet state)
The constructor only takes as parameters the data for key part.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(java.util.Map<java.lang.Integer,java.lang.String> sqlStrs,
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> paramsIdx)
Configures this object for usage.
|
boolean |
equals(java.lang.Object o)
Test for equality with another object
o . |
int |
hashCode()
Returns the pre-computed hash code.
|
private final java.lang.Class<? extends BaseRecord> type
private final java.util.BitSet state
private final int hash
private java.util.Map<java.lang.Integer,java.lang.String> sqlStrs
private java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> paramsIdx
public UpdateInfo(java.lang.Class<? extends BaseRecord> type, java.util.BitSet state)
type
- The Class
of the record to be processed.state
- The set of bits representing the properties altered that need to be updated.public boolean equals(java.lang.Object o)
o
.equals
in class java.lang.Object
o
- The object to test for equality.true
only when this
and o
represent the same logical
object.public int hashCode()
hashCode
in class java.lang.Object
public void configure(java.util.Map<java.lang.Integer,java.lang.String> sqlStrs, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> paramsIdx)
sqlStrs
- The SQL UPDATE statements, mapped by the extent.paramsIdx
- The indexes in the data
for each SQL positional parameter.