1 26 27 package org.objectweb.openccm.pss.runtime.jdo.lib; 28 29 import org.objectweb.openccm.pss.runtime.common.lib.PIDHelper; 30 31 39 40 public class Session 41 extends org.objectweb.openccm.pss.runtime.jdo.lib.CatalogBase 42 implements org.objectweb.openccm.pss.runtime.jdo.api.Session 43 { 44 50 56 62 public Session(int id, javax.jdo.PersistenceManager pm) 63 { 64 super(id, pm); 65 } 66 67 73 79 85 88 public java.lang.Object 89 find_by_pid(byte[] the_pid) 90 throws org.omg.CosPersistentState.NotFound 91 { 92 org.omg.CosPersistentState.StorageHomeBase sh = null; 93 94 sh = find_storage_home(PIDHelper.get_RID(the_pid)); 96 97 return sh.find_by_short_pid(PIDHelper.get_short_pid(the_pid)); 98 } 99 100 103 public void 104 flush() 105 { 106 commit_tx(); 107 begin_tx(); 108 } 109 110 113 public void 114 refresh() 115 { 116 rollback_tx(); 117 begin_tx(); 118 } 119 120 123 public void 124 free_all() 125 { 126 } 129 130 133 public void 134 close() 135 { 136 flush(); 137 get_persistence_manager().close(); 138 } 139 140 146 } 152 | Popular Tags |