~ubuntu-branches/ubuntu/precise/rpm/precise-proposed

« back to all changes in this revision

Viewing changes to db/java/src/com/sleepycat/db/internal/DbSequence.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-06-25 18:57:20 UTC
  • mfrom: (1.1.5 upstream) (4.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090625185720-617sjskgtgmf09vf
Tags: 4.7.0-7ubuntu1
* Merge from debian unstable, remaining changes:
  - change build depends from libdwarf-dev -> libdw-dev
    (libdwarf-dev is in universe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ----------------------------------------------------------------------------
2
 
 * This file was automatically generated by SWIG (http://www.swig.org).
3
 
 * Version: 1.3.21
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
 
 
9
 
package com.sleepycat.db.internal;
10
 
 
11
 
 
12
 
import com.sleepycat.db.*;
13
 
import java.util.Comparator;
14
 
 
15
 
public class DbSequence {
16
 
  private long swigCPtr;
17
 
  protected boolean swigCMemOwn;
18
 
 
19
 
  protected DbSequence(long cPtr, boolean cMemoryOwn) {
20
 
    swigCMemOwn = cMemoryOwn;
21
 
    swigCPtr = cPtr;
22
 
  }
23
 
 
24
 
  protected DbSequence() {
25
 
    this(0, false);
26
 
  }
27
 
 
28
 
  /* package */ void delete() {
29
 
    if(swigCPtr != 0 && swigCMemOwn) {
30
 
      swigCMemOwn = false;
31
 
      throw new UnsupportedOperationException("C++ destructor does not have public access");
32
 
    }
33
 
    swigCPtr = 0;
34
 
  }
35
 
 
36
 
  protected static long getCPtr(DbSequence obj) {
37
 
    return (obj == null) ? 0 : obj.swigCPtr;
38
 
  }
39
 
 
40
 
        public Sequence wrapper;
41
 
 
42
 
        public synchronized void close(int flags) throws DatabaseException {
43
 
                try {
44
 
                        close0(flags);
45
 
                } finally {
46
 
                        swigCPtr = 0;
47
 
                }
48
 
        }
49
 
 
50
 
        public synchronized void remove(DbTxn txn, int flags)
51
 
            throws DatabaseException {
52
 
                try {
53
 
                        remove0(txn, flags);
54
 
                } finally {
55
 
                        swigCPtr = 0;
56
 
                }
57
 
        }
58
 
 
59
 
  public DbSequence(Db db, int flags) throws com.sleepycat.db.DatabaseException {
60
 
    this(db_javaJNI.new_DbSequence(Db.getCPtr(db), flags), true);
61
 
  }
62
 
 
63
 
  /* package */ void close0(int flags) { db_javaJNI.DbSequence_close0(swigCPtr, flags); }
64
 
 
65
 
  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); }
66
 
 
67
 
  public int get_cachesize() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_cachesize(swigCPtr); }
68
 
 
69
 
  public Db get_db() throws com.sleepycat.db.DatabaseException {
70
 
    long cPtr = db_javaJNI.DbSequence_get_db(swigCPtr);
71
 
    return (cPtr == 0) ? null : new Db(cPtr, false);
72
 
  }
73
 
 
74
 
  public int get_flags() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_flags(swigCPtr); }
75
 
 
76
 
  public void get_key(com.sleepycat.db.DatabaseEntry key) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_get_key(swigCPtr, key); }
77
 
 
78
 
  public long get_range_min() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_range_min(swigCPtr); }
79
 
 
80
 
  public long get_range_max() throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_get_range_max(swigCPtr); }
81
 
 
82
 
  public void initial_value(long val) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_initial_value(swigCPtr, val); }
83
 
 
84
 
  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); }
85
 
 
86
 
  /* package */ void remove0(DbTxn txnid, int flags) { db_javaJNI.DbSequence_remove0(swigCPtr, DbTxn.getCPtr(txnid), flags); }
87
 
 
88
 
  public void set_cachesize(int size) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_cachesize(swigCPtr, size); }
89
 
 
90
 
  public void set_flags(int flags) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_flags(swigCPtr, flags); }
91
 
 
92
 
  public void set_range(long min, long max) throws com.sleepycat.db.DatabaseException { db_javaJNI.DbSequence_set_range(swigCPtr, min, max); }
93
 
 
94
 
  public com.sleepycat.db.SequenceStats stat(int flags) throws com.sleepycat.db.DatabaseException { return db_javaJNI.DbSequence_stat(swigCPtr, flags); }
95
 
 
96
 
}