public final class Row extends RowId implements Serializable, Cloneable
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.
Modifier and Type | Field and Description |
---|---|
protected String[] |
keys
The row keys, for single row.
|
static int |
MAX_ARRAY |
static int |
MAX_STRING |
static Serializable |
OPAQUE
A database value we don't care about reading.
|
protected int |
size
The size of the allocated part of
values , for single rows. |
Serializable[] |
values
The row values.
|
Constructor and Description |
---|
Row(String tableName,
Map<String,Serializable> map)
Constructs a new
Row from a map. |
Row(String tableName,
Serializable id)
Constructs an empty
Row for the given table with the given id (may be null ). |
Row(String tableName,
Serializable id,
Serializable[] array)
Constructs a new
Row from an array of values. |
Modifier and Type | Method and Description |
---|---|
Row |
clone() |
Serializable |
get(String key)
Gets a value from a key.
|
List<String> |
getKeys()
Gets the list of keys.
|
List<Serializable> |
getValues()
Gets the list of values.
|
boolean |
isCollection() |
static void |
printValue(Serializable value,
StringBuilder buf) |
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.
|
String |
toString() |
public static final Serializable OPAQUE
public Serializable[] values
public static final int MAX_STRING
public static final int MAX_ARRAY
public Row(String tableName, Serializable id)
Row
for the given table with the given id (may be null
).public Row(String tableName, Map<String,Serializable> map)
Row
from a map.map
- the initial data to usepublic Row(String tableName, Serializable id, Serializable[] array)
Row
from an array of values.array
- the initial data to usepublic boolean isCollection()
public void put(String key, Serializable value)
key
- the keyvalue
- the valuepublic void put(String key, Serializable value, Serializable[] oldvalues)
key
- the keyvalue
- the valueoldvalues
- the old valuespublic void putNew(String key, Serializable value)
key
- the keyvalue
- the valuepublic Serializable get(String key)
key
- the keypublic List<Serializable> getValues()
public static void printValue(Serializable value, StringBuilder buf)
Copyright © 2017 Nuxeo. All rights reserved.