else
{
converter = ConverterFactory.getInstance().getConverter(typeReference);
}
final OrmExtracted orm = converter.fromDomain(value, namespace, key);
// If there's no vector clock in the object, use one possibly given via
// the builder.
if (orm.getRiakObject().getVClock() == null)
{
orm.getRiakObject().setVClock(vclock);
}
RiakFuture<StoreOperation.Response, Location> coreFuture =
cluster.execute(buildCoreOperation(orm));
CoreFutureAdapter<Response, Location, StoreOperation.Response, Location> future =
new CoreFutureAdapter<Response, Location, StoreOperation.Response, Location>(coreFuture)
{
@Override
protected Response convertResponse(StoreOperation.Response coreResponse)
{
Namespace ns = orm.getNamespace();
BinaryValue key = orm.getKey();
if (coreResponse.hasGeneratedKey())
{
key = coreResponse.getGeneratedKey();
}