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

DbSequence.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 DbSequence {
00015   private long swigCPtr;
00016   protected boolean swigCMemOwn;
00017 
00018   protected DbSequence(long cPtr, boolean cMemoryOwn) {
00019     swigCMemOwn = cMemoryOwn;
00020     swigCPtr = cPtr;
00021   }
00022 
00023   protected static long getCPtr(DbSequence 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 Sequence wrapper;
00036 
00037         public synchronized void close(int flags) throws DatabaseException {
00038                 try {
00039                         close0(flags);
00040                 } finally {
00041                         swigCPtr = 0;
00042                 }
00043         }
00044 
00045         public synchronized void remove(DbTxn txn, int flags)
00046             throws DatabaseException {
00047                 try {
00048                         remove0(txn, flags);
00049                 } finally {
00050                         swigCPtr = 0;
00051                 }
00052         }
00053 
00054   public DbSequence(Db db, int flags) throws com.sleepycat.db.DatabaseException {
00055     this(db_javaJNI.new_DbSequence(Db.getCPtr(db), flags), true);
00056   }
00057 
00058   /* package */ void close0(int flags) { db_javaJNI.DbSequence_close0(swigCPtr, flags); }
00059 
00060   public long get(DbTxn txnid, int delta, int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get(swigCPtr, DbTxn.getCPtr(txnid), delta, flags); }
00061 
00062   public int get_cachesize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_cachesize(swigCPtr); }
00063 
00064   public Db get_db() throws com.sleepycat.db.DatabaseException {
00065     long cPtr = db_javaJNI.DbSequence_get_db(swigCPtr);
00066     return (cPtr == 0) ? null : new Db(cPtr, false);
00067   }
00068 
00069   public int get_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_flags(swigCPtr); }
00070 
00071   public void get_key(com.sleepycat.db.DatabaseEntry key) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_get_key(swigCPtr, key); }
00072 
00073   public long get_range_min() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_range_min(swigCPtr); }
00074 
00075   public long get_range_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_range_max(swigCPtr); }
00076 
00077   public void initial_value(long val) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_initial_value(swigCPtr, val); }
00078 
00079   public void open(DbTxn txnid, com.sleepycat.db.DatabaseEntry key, int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_open(swigCPtr, DbTxn.getCPtr(txnid), key, flags); }
00080 
00081   /* package */ void remove0(DbTxn txnid, int flags) { db_javaJNI.DbSequence_remove0(swigCPtr, DbTxn.getCPtr(txnid), flags); }
00082 
00083   public void set_cachesize(int size) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_cachesize(swigCPtr, size); }
00084 
00085   public void set_flags(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_flags(swigCPtr, flags); }
00086 
00087   public void set_range(long min, long max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_range(swigCPtr, min, max); }
00088 
00089   public com.sleepycat.db.SequenceStats stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_stat(swigCPtr, flags); }
00090 
00091 }

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