1 26 27 package org.objectweb.openccm.pss.runtime.hibernate.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.hibernate.lib.CatalogBase 42 implements org.objectweb.openccm.pss.runtime.hibernate.api.Session 43 { 44 50 56 62 public Session(int id, net.sf.hibernate.Session session) 63 { 64 super(id, session); 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; 94 95 sh = find_storage_home(PIDHelper.get_RID(the_pid)); 97 98 return sh.find_by_short_pid(PIDHelper.get_short_pid(the_pid)); 99 } 100 101 104 public void 105 flush() 106 { 107 commit_tx(); 108 } 109 110 113 public void 114 refresh() 115 { 116 rollback_tx(); 117 } 118 119 122 public void 123 free_all() 124 { 125 } 128 129 132 public void 133 close() 134 { 135 flush(); 136 try { 137 get_hibernate_session().close(); 138 } catch (net.sf.hibernate.HibernateException ex) { 139 throw new RuntimeException (ex); 140 } 141 } 142 143 149 } 155 | Popular Tags |