Package org.nuxeo.ecm.core.storage.sql
Class Row
java.lang.Object
org.nuxeo.ecm.core.storage.sql.RowId
org.nuxeo.ecm.core.storage.sql.Row
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<RowId>
The data of a single row in a table (keys/values form a map), or of multiple rows with the same id (values is an
array of Serializable).
The id of the row is distinguished internally from other columns. For fragments corresponding to created data, the initial id is a temporary one, and it will be changed after database insert.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String[]
The row keys, for single row.static final int
static final int
static final Serializable
A database value we don't care about reading.protected int
The size of the allocated part ofvalues
, for single rows.The row values. -
Constructor Summary
ConstructorDescriptionRow
(String tableName, Serializable id) Constructs an emptyRow
for the given table with the given id (may benull
).Row
(String tableName, Serializable id, Serializable[] array) Constructs a newRow
from an array of values.Row
(String tableName, Map<String, Serializable> map) Constructs a newRow
from a map. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Gets a value from a key.getKeys()
Gets the list of keys.Gets the list of values.boolean
static void
printValue
(Serializable value, StringBuilder sb) void
put
(String key, Serializable value) Puts a key/value.void
put
(String key, Serializable value, Serializable[] oldvalues) Puts a key/value where the current or new value may be a delta.void
putNew
(String key, Serializable value) Puts a key/value, assuming the key is not already there.toString()
-
Field Details
-
OPAQUE
A database value we don't care about reading. When present in a fragment, it won't be written, but any other value will be. -
keys
The row keys, for single row. -
values
The row values. -
size
protected int sizeThe size of the allocated part ofvalues
, for single rows. -
MAX_STRING
public static final int MAX_STRING- See Also:
-
MAX_ARRAY
public static final int MAX_ARRAY- See Also:
-
-
Constructor Details
-
Method Details
-
clone
-
isCollection
public boolean isCollection() -
put
Puts a key/value. Does not deal with deltas.- Parameters:
key
- the keyvalue
- the value
-
put
Puts a key/value where the current or new value may be a delta. To resolve a delta, the oldvalues (in-database state) must be consulted.- Parameters:
key
- the keyvalue
- the valueoldvalues
- the old values
-
putNew
Puts a key/value, assuming the key is not already there.- Parameters:
key
- the keyvalue
- the value
-
get
Gets a value from a key.- Parameters:
key
- the key- Returns:
- the value
-
getKeys
Gets the list of keys. The id is not included. -
getValues
Gets the list of values. The id is not included. -
toString
-
printValue
-