1 28 29 package com.caucho.amber; 30 31 import java.sql.ResultSet ; 32 import java.sql.SQLException ; 33 import java.util.List ; 34 35 38 public interface AmberConnection { 39 42 public Object load(Class cl, Object key) 43 throws AmberException; 44 45 48 public Object load(Class cl, long key) 49 throws AmberException; 50 51 54 public Object makePersistent(Object entity) 55 throws SQLException ; 56 57 60 public void create(Object obj) 61 throws SQLException ; 62 63 66 public boolean contains(Object entity); 67 68 71 public void delete(Object obj) 72 throws SQLException ; 73 74 81 public ResultSet query(String query) 82 throws SQLException ; 83 84 91 public int update(String query) 92 throws SQLException ; 93 94 102 public AmberQuery prepareQuery(String queryString) 103 throws AmberException; 104 105 108 public void beginTransaction() 109 throws SQLException ; 110 111 114 public void commit() 115 throws SQLException ; 116 117 120 public void rollback() 121 throws SQLException ; 122 123 126 public void flush() 127 throws SQLException ; 128 129 133 public void close(); 134 135 142 public List find(String query) 143 throws SQLException ; 144 } 145 | Popular Tags |