GetItemRequest
instead.@Deprecated public class GetItemRequest extends AmazonWebServiceRequest implements Serializable
GetItem operation
.
Retrieves a set of Attributes for an item that matches the primary key.
The GetItem
operation provides an eventually-consistent read by default. If eventually-consistent reads are not acceptable for your
application, use ConsistentRead
. Although this operation might take longer than a standard read, it always returns the last updated
value.
NOOP
Constructor and Description |
---|
GetItemRequest()
Deprecated.
Default constructor for a new GetItemRequest object.
|
GetItemRequest(String tableName,
Key key)
Deprecated.
Constructs a new GetItemRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Deprecated.
|
List<String> |
getAttributesToGet()
Deprecated.
List of
Attribute names. |
Boolean |
getConsistentRead()
Deprecated.
If set to
true , then a consistent read is issued. |
Key |
getKey()
Deprecated.
The primary key that uniquely identifies each item in a table.
|
String |
getTableName()
Deprecated.
The name of the table in which you want to get an item.
|
int |
hashCode()
Deprecated.
|
Boolean |
isConsistentRead()
Deprecated.
If set to
true , then a consistent read is issued. |
void |
setAttributesToGet(Collection<String> attributesToGet)
Deprecated.
List of
Attribute names. |
void |
setConsistentRead(Boolean consistentRead)
Deprecated.
If set to
true , then a consistent read is issued. |
void |
setKey(Key key)
Deprecated.
The primary key that uniquely identifies each item in a table.
|
void |
setTableName(String tableName)
Deprecated.
The name of the table in which you want to get an item.
|
String |
toString()
Deprecated.
Returns a string representation of this object; useful for testing and
debugging.
|
GetItemRequest |
withAttributesToGet(Collection<String> attributesToGet)
Deprecated.
List of
Attribute names. |
GetItemRequest |
withAttributesToGet(String... attributesToGet)
Deprecated.
List of
Attribute names. |
GetItemRequest |
withConsistentRead(Boolean consistentRead)
Deprecated.
If set to
true , then a consistent read is issued. |
GetItemRequest |
withKey(Key key)
Deprecated.
The primary key that uniquely identifies each item in a table.
|
GetItemRequest |
withTableName(String tableName)
Deprecated.
The name of the table in which you want to get an item.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public GetItemRequest()
public GetItemRequest(String tableName, Key key)
tableName
- The name of the table in which you want to get an
item. Allowed characters are a-z
, A-Z
,
0-9
, _
(underscore), -
(hyphen)
and .
(period).key
- The primary key that uniquely identifies each item in a
table. A primary key can be a one attribute (hash) primary key or a
two attribute (hash-and-range) primary key.public String getTableName()
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).public void setTableName(String tableName)
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
tableName
- The name of the table in which you want to get an item. Allowed
characters are a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).public GetItemRequest withTableName(String tableName)
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
tableName
- The name of the table in which you want to get an item. Allowed
characters are a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).public Key getKey()
public void setKey(Key key)
key
- The primary key that uniquely identifies each item in a table. A
primary key can be a one attribute (hash) primary key or a two
attribute (hash-and-range) primary key.public GetItemRequest withKey(Key key)
Returns a reference to this object so that method calls can be chained together.
key
- The primary key that uniquely identifies each item in a table. A
primary key can be a one attribute (hash) primary key or a two
attribute (hash-and-range) primary key.public List<String> getAttributesToGet()
Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.
Constraints:
Length: 1 -
Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.public void setAttributesToGet(Collection<String> attributesToGet)
Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.
Constraints:
Length: 1 -
attributesToGet
- List of Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.public GetItemRequest withAttributesToGet(String... attributesToGet)
Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
attributesToGet
- List of Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.public GetItemRequest withAttributesToGet(Collection<String> attributesToGet)
Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
attributesToGet
- List of Attribute
names. If attribute names are not
specified then all attributes will be returned. If some attributes are
not found, they will not appear in the result.public Boolean isConsistentRead()
true
, then a consistent read is issued.
Otherwise eventually-consistent is used.true
, then a consistent read is issued.
Otherwise eventually-consistent is used.public void setConsistentRead(Boolean consistentRead)
true
, then a consistent read is issued.
Otherwise eventually-consistent is used.consistentRead
- If set to true
, then a consistent read is issued.
Otherwise eventually-consistent is used.public GetItemRequest withConsistentRead(Boolean consistentRead)
true
, then a consistent read is issued.
Otherwise eventually-consistent is used.
Returns a reference to this object so that method calls can be chained together.
consistentRead
- If set to true
, then a consistent read is issued.
Otherwise eventually-consistent is used.public Boolean getConsistentRead()
true
, then a consistent read is issued.
Otherwise eventually-consistent is used.true
, then a consistent read is issued.
Otherwise eventually-consistent is used.public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.