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
FieldsModifier and TypeFieldDescriptionprotected String[]The row keys, for single row.static final intstatic final intstatic final SerializableA database value we don't care about reading.protected intThe size of the allocated part ofvalues, for single rows.The row values. -
Constructor Summary
ConstructorsConstructorDescriptionRow(String tableName, Serializable id) Constructs an emptyRowfor the given table with the given id (may benull).Row(String tableName, Serializable id, Serializable[] array) Constructs a newRowfrom an array of values.Row(String tableName, Map<String, Serializable> map) Constructs a newRowfrom a map. -
Method Summary
Modifier and TypeMethodDescriptionclone()Gets a value from a key.getKeys()Gets the list of keys.Gets the list of values.booleanstatic voidprintValue(Serializable value, StringBuilder sb) voidput(String key, Serializable value) Puts a key/value.voidput(String key, Serializable value, Serializable[] oldvalues) Puts a key/value where the current or new value may be a delta.voidputNew(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
-