1 23 24 30 31 package com.sun.jdo.spi.persistence.support.sqlstore; 32 33 34 36 public class PersistenceWrapper { 37 public static final int IN_USE = 1; 38 public static final int NOT_IN_USE = 2; 39 public static final int DELETED = 3; 40 41 private int state = 0; 46 private int inUse = 0; 47 48 private Object persistent = null; 50 51 public void setState(int newstate) { 52 this.state = newstate; 53 } 54 55 public int getState() { 56 return state; 57 } 58 59 public void addInUse() { 60 inUse++; 61 } 62 63 public int removeInUse() { 64 if (inUse > 0) { 65 inUse--; 66 } 67 return inUse; 68 } 69 70 public int getInUse() { 71 return inUse; 72 } 73 74 public void setPersistent(Object newobject) { 75 persistent = newobject; 76 } 77 78 public Object getPersistent() { 79 return persistent; 80 } 81 82 } 83 | Popular Tags |