1 21 22 package org.opensubsystems.core.persist.db; 23 24 import java.sql.Connection ; 25 import java.sql.PreparedStatement ; 26 import java.sql.SQLException ; 27 import java.util.Map ; 28 29 import org.opensubsystems.core.data.BasicDataObject; 30 import org.opensubsystems.core.data.ModifiableDataObject; 31 import org.opensubsystems.core.error.OSSException; 32 33 48 public interface Database 49 { 50 52 55 int BATCH_ITERATOR = 500; 56 57 60 int HSQLDB_DATABASE_TYPE = 1; 61 62 65 String HSQLDB_DATABASE_TYPE_IDENTIFIER = "HsqlDB"; 66 67 70 int SAPDB_DATABASE_TYPE = 2; 71 72 75 String SAPDB_DATABASE_TYPE_IDENTIFIER = "SapDB"; 76 77 80 int POSTGRESQL_DATABASE_TYPE = 3; 81 82 85 String POSTGRESQL_DATABASE_TYPE_IDENTIFIER = "PostgreSQL"; 86 87 90 int MYSQL_DATABASE_TYPE = 4; 91 92 95 String MYSQL_DATABASE_TYPE_IDENTIFIER = "MySQL"; 96 97 100 int MSSQL_DATABASE_TYPE = 5; 101 102 105 String MSSQL_DATABASE_TYPE_IDENTIFIER = "MSSQL"; 106 107 110 int DB2_DATABASE_TYPE = 6; 111 112 115 String DB2_DATABASE_TYPE_IDENTIFIER = "DB2"; 116 117 120 int SYBASE_DATABASE_TYPE = 7; 121 122 125 String SYBASE_DATABASE_TYPE_IDENTIFIER = "Sybase"; 126 127 130 int ORACLE_DATABASE_TYPE = 8; 131 132 135 String ORACLE_DATABASE_TYPE_IDENTIFIER = "Oracle"; 136 137 140 int MAXDB_DATABASE_TYPE = 9; 141 142 145 String MAXDB_DATABASE_TYPE_IDENTIFIER = "MaxDB"; 146 147 149 154 void start( 155 ) throws OSSException; 156 157 163 void stop( 164 ) throws OSSException; 165 166 172 void add( 173 DatabaseSchema dsSchema 174 ) throws OSSException; 175 176 184 void add( 185 Class clsSchema 186 ) throws OSSException; 187 188 194 int getDatabaseType( 195 ); 196 197 204 String getDatabaseTypeIdentifier( 205 ); 206 207 212 boolean isStarted( 213 ); 214 215 217 223 String getConnectionTestStatement( 224 ); 225 226 234 int getTransactionIsolation( 235 int iTransactionIsolation 236 ); 237 238 247 int getSelectListResultSetType(); 248 249 259 int getSelectListResultSetConcurrency(); 260 261 268 boolean hasAbsolutePositioningSupport(); 269 270 276 boolean preferCountToLast(); 277 278 280 286 String getCurrentTimestampFunctionCall( 287 ); 288 289 305 Object [] getSQLAnalyzeFunctionCall( 306 Map mapTableNames 307 ); 308 309 314 String getSQLCountFunctionCall( 315 ); 316 317 324 boolean hasSelectListRangeSupport( 325 ); 326 327 334 boolean isCallableStatement( 335 String strQuery 336 ); 337 338 356 void insertAndFetchGeneratedValues( 357 Connection dbConnection, 358 PreparedStatement insertStatement, 359 boolean bIsInDomain, 360 String strTableName, 361 int iIndex, 362 BasicDataObject data 363 ) throws SQLException , 364 OSSException; 365 366 386 void updatedAndFetchGeneratedValues( 387 String strDataName, 388 Connection dbConnection, 389 PreparedStatement updateStatement, 390 boolean bIsInDomain, 391 String strTableName, 392 int iIndex, 393 ModifiableDataObject data 394 ) throws SQLException , 395 OSSException; 396 } 397
| Popular Tags
|