T - public class DataWithEtag<T>
extends java.lang.Object
| Constructor and Description |
|---|
DataWithEtag(T data,
java.lang.String etag,
java.lang.String oldEtag)
Construcutor setting notFound + isDeleted to false.
|
DataWithEtag(T data,
java.lang.String etag,
java.lang.String oldEtag,
boolean isDeleted)
Construcutor setting notFound false + isDeleted to value.
|
DataWithEtag(T data,
java.lang.String etag,
java.lang.String oldEtag,
boolean notFound,
boolean isDeleted) |
| Modifier and Type | Method and Description |
|---|---|
static DataWithEtag |
dataNotChanged(DataWithEtag data)
Creates a DWE that indicates nothing has changed.
|
static DataWithEtag |
dataNotChanged(java.lang.String etag)
Creates a DWE that indicates nothing has changed.
|
static DataWithEtag |
dataNotFound() |
T |
getData() |
java.lang.String |
getEtag()
The etag currently associated with the data.
|
boolean |
isChanged()
Returns true if this DataWithEtag object is the result of an ETAG checking
call and the data has changed since.
|
boolean |
isDeleted()
This method allows querying if the data is deleted.
|
boolean |
isNotFound()
This method allows querying if the data is null because it was not found.
|
public DataWithEtag(T data, java.lang.String etag, java.lang.String oldEtag, boolean notFound, boolean isDeleted)
public DataWithEtag(T data, java.lang.String etag, java.lang.String oldEtag)
data - etag - public DataWithEtag(T data, java.lang.String etag, java.lang.String oldEtag, boolean isDeleted)
data - etag - isDeleted - public static DataWithEtag dataNotFound()
public static DataWithEtag dataNotChanged(DataWithEtag data)
data - public static DataWithEtag dataNotChanged(java.lang.String etag)
etag - the unchanged etagpublic T getData()
public java.lang.String getEtag()
public boolean isChanged()
public boolean isDeleted()
public boolean isNotFound()
Copyright © 2019. All Rights Reserved.