All Downloads are FREE. Search and download functionalities are using the official Maven repository.

oracle.nosql.driver.ops.WriteRequest Maven / Gradle / Ivy

There is a newer version: 5.4.16
Show newest version
/*-
 * Copyright (c) 2011, 2020 Oracle and/or its affiliates.  All rights reserved.
 *
 * Licensed under the Universal Permissive License v 1.0 as shown at
 *  https://oss.oracle.com/licenses/upl/
 */

package oracle.nosql.driver.ops;

import oracle.nosql.driver.NoSQLHandle;
import oracle.nosql.driver.NoSQLHandleConfig;

/**
 * @hidden
 *
 * Represents a base class for the single row modifying operations
 * {@link NoSQLHandle#put} and {@link NoSQLHandle#delete}.
 * 

* This class encapsulates the common parameters of table name and * the return row boolean, which allows applications to get information * about the existing value of the target row on failure. By default * no previous information is returned. */ public abstract class WriteRequest extends Request { private boolean returnRow; protected WriteRequest() {} protected void setReturnRowInternal(boolean value) { this.returnRow = value; } /* getters are public for access by serializers */ /** * @hidden * @return true if there is a return row */ public boolean getReturnRowInternal() { return returnRow; } /** * @hidden */ @Override public Request setDefaults(NoSQLHandleConfig config) { super.setDefaults(config); return this; } protected void validateWriteRequest(String requestName) { if (tableName == null) { throw new IllegalArgumentException( (requestName + " requires table name")); } } /** * @hidden */ @Override public boolean doesWrites() { return true; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy