1/* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3.33 4 * 5 * Do not make changes to this file unless you know what you are doing--modify 6 * the SWIG interface file instead. 7 * ----------------------------------------------------------------------------- */ 8 9package com.sleepycat.db.internal; 10 11import com.sleepycat.db.*; 12import java.util.Comparator; 13 14public class Dbc { 15 private long swigCPtr; 16 protected boolean swigCMemOwn; 17 18 protected Dbc(long cPtr, boolean cMemoryOwn) { 19 swigCMemOwn = cMemoryOwn; 20 swigCPtr = cPtr; 21 } 22 23 protected static long getCPtr(Dbc obj) { 24 return (obj == null) ? 0 : obj.swigCPtr; 25 } 26 27 /* package */ synchronized void delete() { 28 if(swigCPtr != 0 && swigCMemOwn) { 29 swigCMemOwn = false; 30 throw new UnsupportedOperationException("C++ destructor does not have public access"); 31 } 32 swigCPtr = 0; 33 } 34 35 public synchronized void close() throws DatabaseException { 36 try { 37 close0(); 38 } finally { 39 swigCPtr = 0; 40 } 41 } 42 43 /* package */ void close0() { db_javaJNI.Dbc_close0(swigCPtr, this); } 44 45 public int count(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.Dbc_count(swigCPtr, this, flags); } 46 47 public int del(int flags) throws com.sleepycat.db.DatabaseException { 48 return db_javaJNI.Dbc_del(swigCPtr, this, flags); 49 } 50 51 public Dbc dup(int flags) throws com.sleepycat.db.DatabaseException { 52 long cPtr = db_javaJNI.Dbc_dup(swigCPtr, this, flags); 53 return (cPtr == 0) ? null : new Dbc(cPtr, false); 54 } 55 56 public int get(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException { 57 return db_javaJNI.Dbc_get(swigCPtr, this, key, data, flags); 58 } 59 60 public int get_priority() throws com.sleepycat.db.DatabaseException { 61 return db_javaJNI.Dbc_get_priority(swigCPtr, this); 62 } 63 64 public int pget(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry pkey, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException { 65 return db_javaJNI.Dbc_pget(swigCPtr, this, key, pkey, data, flags); 66 } 67 68 public int put(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException { 69 return db_javaJNI.Dbc_put(swigCPtr, this, key, data, flags); 70 } 71 72 public void set_priority(int priority) throws com.sleepycat.db.DatabaseException { db_javaJNI.Dbc_set_priority(swigCPtr, this, priority); } 73 74} 75