T
- The type of object being processed.public class UpdateRecordsRequest<T> extends Object
GPUdb.updateRecords(UpdateRecordsRequest)
.
newValuesMaps
. There is also an optional 'upsert' capability where if a particular
predicate doesn't match any existing record, then a new record can be inserted.
options
.
The Raw version of this method can be used to specify the encoding scheme of the request.Modifier and Type | Class and Description |
---|---|
static class |
UpdateRecordsRequest.Options
Optional parameters.
|
Constructor and Description |
---|
UpdateRecordsRequest()
Constructs an UpdateRecordsRequest object with default parameters.
|
UpdateRecordsRequest(String tableName,
List<String> expressions,
List<Map<String,String>> newValuesMaps,
List<T> data,
Map<String,String> options)
Constructs an UpdateRecordsRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<T> |
getData()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<String> |
getExpressions()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
List<Map<String,String>> |
getNewValuesMaps()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
Map<String,String> |
getOptions()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
String |
getTableName()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
int |
hashCode()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
UpdateRecordsRequest<T> |
setData(List<T> data)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
UpdateRecordsRequest<T> |
setExpressions(List<String> expressions)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
UpdateRecordsRequest<T> |
setNewValuesMaps(List<Map<String,String>> newValuesMaps)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
UpdateRecordsRequest<T> |
setOptions(Map<String,String> options)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
UpdateRecordsRequest<T> |
setTableName(String tableName)
The Raw version of this method can be used to specify the encoding scheme of the request.
|
String |
toString()
The Raw version of this method can be used to specify the encoding scheme of the request.
|
public UpdateRecordsRequest()
public UpdateRecordsRequest(String tableName, List<String> expressions, List<Map<String,String>> newValuesMaps, List<T> data, Map<String,String> options)
tableName
- Table to be updated. Must be a currently existing table and not a collection or view.expressions
- A list of the actual predicates, one for each update; format should follow the guidelines here
.newValuesMaps
- List of new values for the matching records. Each element is a map with (key, value) pairs where the
keys are the names of the columns whose values are to be updated; the values are the new values. The
number of elements in the list should match the length of expressions
.data
- An *optional* list of new binary-avro encoded records to insert, one for each update. If one of expressions
does not yield a matching record to be updated, then the corresponding element from this list will
be added to the table.options
- Optional parameters.
expressions
.
GPUdb.insertRecords(InsertRecordsRequest)
. Values: true,
false.
GPUdb.insertRecords(InsertRecordsRequest)
or GPUdb.getRecordsFromCollection(Object, GetRecordsFromCollectionRequest)
).
public String getTableName()
public UpdateRecordsRequest<T> setTableName(String tableName)
tableName
- Table to be updated. Must be a currently existing table and not a collection or view.this
to mimic the builder pattern.public List<String> getExpressions()
here
.public UpdateRecordsRequest<T> setExpressions(List<String> expressions)
expressions
- A list of the actual predicates, one for each update; format should follow the guidelines here
.this
to mimic the builder pattern.public List<Map<String,String>> getNewValuesMaps()
expressions
.public UpdateRecordsRequest<T> setNewValuesMaps(List<Map<String,String>> newValuesMaps)
newValuesMaps
- List of new values for the matching records. Each element is a map with (key, value) pairs where the
keys are the names of the columns whose values are to be updated; the values are the new values. The
number of elements in the list should match the length of expressions
.this
to mimic the builder pattern.public List<T> getData()
expressions
does not yield a matching record to be updated, then the corresponding element from this list will be added to the
table.public UpdateRecordsRequest<T> setData(List<T> data)
data
- An *optional* list of new binary-avro encoded records to insert, one for each update. If one of expressions
does not yield a matching record to be updated, then the corresponding element from this list will
be added to the table.this
to mimic the builder pattern.public Map<String,String> getOptions()
expressions
.
GPUdb.insertRecords(InsertRecordsRequest)
. Values: true, false.
GPUdb.insertRecords(InsertRecordsRequest)
or GPUdb.getRecordsFromCollection(Object,
GetRecordsFromCollectionRequest)
).
public UpdateRecordsRequest<T> setOptions(Map<String,String> options)
options
- Optional parameters.
expressions
.
GPUdb.insertRecords(InsertRecordsRequest)
. Values: true,
false.
GPUdb.insertRecords(InsertRecordsRequest)
or GPUdb.getRecordsFromCollection(Object, GetRecordsFromCollectionRequest)
).
this
to mimic the builder pattern.public boolean equals(Object obj)
public String toString()
Copyright © 2016. All rights reserved.