com.sleepycat.je.dbi
Enum PutMode

java.lang.Object
  extended by java.lang.Enum<PutMode>
      extended by com.sleepycat.je.dbi.PutMode
All Implemented Interfaces:
Serializable, Comparable<PutMode>

public enum PutMode
extends Enum<PutMode>

Used to distinguish Cursor put operations.


Enum Constant Summary
CURRENT
          User operation: Cursor.putCurrent.
NO_DUP_DATA
          User operation: Cursor.putNoDupData.
NO_OVERWRITE
          User operation: Cursor.putNoOverwrite.
OVERWRITE
          User operation: Cursor.put.
 
Method Summary
static PutMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PutMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CURRENT

public static final PutMode CURRENT
User operation: Cursor.putCurrent. Replace data at current position. Return KEYEMPTY if record at current position is deleted.


NO_DUP_DATA

public static final PutMode NO_DUP_DATA
User operation: Cursor.putNoDupData. Insert duplicate if key/data does not already exist; otherwise, return KEYEXIST.


NO_OVERWRITE

public static final PutMode NO_OVERWRITE
User operation: Cursor.putNoOverwrite. Insert non-duplicate if key does not already exist; otherwise, return KEYEXIST.


OVERWRITE

public static final PutMode OVERWRITE
User operation: Cursor.put. Insert if key (non-duplicate) or key/data (duplicate) does not already exist; otherwise, overwrite data.

Method Detail

values

public static PutMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PutMode c : PutMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PutMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright (c) 2004-2012 Oracle. All rights reserved.