* @param storeMeta
* a {@link StoreMeta} for the store operation.
* @return a {@link RequestMeta} populated from the storeMeta's values.
*/
static RequestMeta convert(StoreMeta storeMeta, IRiakObject riakObject) {
RequestMeta requestMeta = new RequestMeta();
if (storeMeta.hasW()) {
requestMeta.w(storeMeta.getW().getIntValue());
}
if (storeMeta.hasDw()) {
requestMeta.dw(storeMeta.getDw().getIntValue());
}
if (storeMeta.hasReturnBody()) {
requestMeta.returnBody(storeMeta.getReturnBody());
}
if (storeMeta.hasReturnHead()) {
requestMeta.returnHead(storeMeta.getReturnHead());
}
String contentType = riakObject.getContentType();
if (contentType != null) {
requestMeta.contentType(contentType);
}
if (storeMeta.hasPw()) {
requestMeta.pw( storeMeta.getPw().getIntValue());
}
if (storeMeta.hasIfNoneMatch()) {
requestMeta.ifNoneMatch(storeMeta.getIfNoneMatch());
}
if (storeMeta.hasIfNotModified()) {
requestMeta.ifNotModified(storeMeta.getIfNotModified());
}
return requestMeta;
}