/** * @param iConnection * @param resultSetType * @param resultSetConcurrency * @param resultSetHoldability */ public OrientJdbcStatement( OrientJdbcConnection iConnection, int resultSetType, int resultSetConcurrency, int resultSetHoldability) { this.connection = iConnection; this.database = iConnection.getDatabase(); database.activateOnCurrentThread(); documents = emptyList(); batches = new ArrayList<String>(); this.resultSetType = resultSetType; this.resultSetConcurrency = resultSetConcurrency; this.resultSetHoldability = resultSetHoldability; info = connection.getInfo(); }
/** * @param iConnection * @param resultSetType * @param resultSetConcurrency * @param resultSetHoldability */ public OrientJdbcStatement( OrientJdbcConnection iConnection, int resultSetType, int resultSetConcurrency, int resultSetHoldability) { this.connection = iConnection; this.database = iConnection.getDatabase(); ODatabaseRecordThreadLocal.INSTANCE.set(database); documents = emptyList(); batches = new ArrayList<String>(); this.resultSetType = resultSetType; this.resultSetConcurrency = resultSetConcurrency; this.resultSetHoldability = resultSetHoldability; }
@After public void closeConnection() throws Exception { if (conn != null && !conn.isClosed()) conn.close(); }