Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

Dbc.java

00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.25
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package com.sleepycat.db.internal;
00010 
00011 import com.sleepycat.db.*;
00012 import java.util.Comparator;
00013 
00014 public class Dbc {
00015   private long swigCPtr;
00016   protected boolean swigCMemOwn;
00017 
00018   protected Dbc(long cPtr, boolean cMemoryOwn) {
00019     swigCMemOwn = cMemoryOwn;
00020     swigCPtr = cPtr;
00021   }
00022 
00023   protected static long getCPtr(Dbc obj) {
00024     return (obj == null) ? 0 : obj.swigCPtr;
00025   }
00026 
00027   /* package */ void delete() {
00028     if(swigCPtr != 0 && swigCMemOwn) {
00029       swigCMemOwn = false;
00030       throw new UnsupportedOperationException("C++ destructor does not have public access");
00031     }
00032     swigCPtr = 0;
00033   }
00034 
00035         public synchronized void close() throws DatabaseException {
00036                 try {
00037                         close0();
00038                 } finally {
00039                         swigCPtr = 0;
00040                 }
00041         }
00042 
00043   /* package */ void close0() { db_javaJNI.Dbc_close0(swigCPtr); }
00044 
00045   public int count(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.Dbc_count(swigCPtr, flags); }
00046 
00047   public int del(int flags) throws com.sleepycat.db.DatabaseException {
00048     return db_javaJNI.Dbc_del(swigCPtr, flags);
00049   }
00050 
00051   public Dbc dup(int flags) throws com.sleepycat.db.DatabaseException {
00052     long cPtr = db_javaJNI.Dbc_dup(swigCPtr, flags);
00053     return (cPtr == 0) ? null : new Dbc(cPtr, false);
00054   }
00055 
00056   public int get(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException {
00057     return db_javaJNI.Dbc_get(swigCPtr, key, data, flags);
00058   }
00059 
00060   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 {
00061     return db_javaJNI.Dbc_pget(swigCPtr, key, pkey, data, flags);
00062   }
00063 
00064   public int put(com.sleepycat.db.DatabaseEntry key, com.sleepycat.db.DatabaseEntry data, int flags) throws com.sleepycat.db.DatabaseException {
00065     return db_javaJNI.Dbc_put(swigCPtr, key, data, flags);
00066   }
00067 
00068 }

Generated on Sun Dec 25 12:14:32 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2