public Connection getConnection() throws SQLException, GenericEntityException { Connection connection = ConnectionFactory.getConnection(helperName); return connection; }
public Connection getConnection(final String name) throws SQLException, GenericEntityException { return ConnectionFactory.getConnection(name); } };
public Connection getConnection() throws SQLException, GenericEntityException { Connection connection = ConnectionFactory.getConnection(helperName); return connection; }
private List<Connection> openConnections() { final List<Connection> connectionList = Lists.newArrayListWithCapacity(numberConnections); for (int i = 0; i < numberConnections; i++) { try { final Connection connection = ConnectionFactory.getConnection(ofbizHelperName); connectionList.add(connection); } catch (final SQLException e) { log.error("Could not open connection.", e); } catch (final GenericEntityException e) { log.error("Could not open connection.", e); } } return connectionList; }
public Connection getConnection() throws SQLException, DataAccessException { try { return ConnectionFactory.getConnection(getDatabaseConfig().getDatasourceName()); } catch (GenericEntityException e) { throw new DataAccessException(e); } }
private int findConstraintNameClipLengthFromJDBCConnection() { final Connection connection; try { connection = ConnectionFactory.getConnection(name); final DatabaseType typeForConnection = DatabaseTypeFactory.getTypeForConnection(connection); if (typeForConnection == null) { Debug.logError("Could not determine database type from "); } return typeForConnection.getConstraintNameClipLength(); } catch (Exception e) { String error = "Could not get connection to database to determine database clip length"; Debug.logError(e, error); return DEFAULT_CONSTRAINT_NAME_CLIP_LENGTH; } } }
private int findConstraintNameClipLengthFromJDBCConnection() { final Connection connection; try { connection = ConnectionFactory.getConnection(name); final DatabaseType typeForConnection = DatabaseTypeFactory.getTypeForConnection(connection); if (typeForConnection == null) { Debug.logError("Could not determine database type from "); } return typeForConnection.getConstraintNameClipLength(); } catch (Exception e) { String error = "Could not get connection to database to determine database clip length"; Debug.logError(e, error); return DEFAULT_CONSTRAINT_NAME_CLIP_LENGTH; } } }
Connection connection = ConnectionFactory.getConnection(helperName); if (transactionIsolationLevel >= 0) connection.setTransactionIsolation(transactionIsolationLevel);
/** * Provides a database type. * * @return the database type. */ public DatabaseType getDatabaseTypeFromJDBCConnection() { if (databaseType == null) { Connection connection = null; try { connection = ConnectionFactory.getConnection(name); databaseType = getDatabaseTypeFromJDBCConnection(connection); } catch (Exception e) { String error = "Could not determine database type."; Debug.logError(e, error); throw new GeneralRuntimeException(error, e); } finally { silentlyClose(connection); } } return databaseType; }
private String findFieldTypeFromJDBCConnection() { final Connection connection; try { connection = ConnectionFactory.getConnection(name); final DatabaseType typeForConnection = DatabaseTypeFactory.getTypeForConnection(connection); if (typeForConnection == null) { Debug.logError("Could not determine database type from "); } return typeForConnection.getFieldTypeName(); } catch (Exception e) { String error = "Could not get connection to database to determine database type for " + AUTO_FIELD_TYPE; Debug.logError(e, error); throw new GeneralRuntimeException(error, e); } }
Connection connection = ConnectionFactory.getConnection(helperName); if (transactionIsolationLevel >= 0) connection.setTransactionIsolation(transactionIsolationLevel);
private String findSchemaNameFromJDBCConnection() { try { final Connection connection = ConnectionFactory.getConnection(name); try { return getDatabaseTypeFromJDBCConnection().getSchemaName(connection); } finally { silentlyClose(connection); } } catch (Exception e) { String error = "Could not get connection to database to determine database schema-name for " + AUTO_SCHEMA_NAME; Debug.logError(e, error); throw new GeneralRuntimeException(error, e); } }
connection = ConnectionFactory.getConnection(parentUtil.helperName); } catch (SQLException | GenericEntityException sqle) { Debug.logWarning("[SequenceUtil.SequenceBank.fillBank]: Unable to establish a connection with the database... Error was:", module);
private String findSchemaNameFromJDBCConnection() { final Connection connection; try { connection = ConnectionFactory.getConnection(name); final DatabaseType typeForConnection = DatabaseTypeFactory.getTypeForConnection(connection); if (typeForConnection == null) { Debug.logError("Could not determine database type from "); } return typeForConnection.getSchemaName(connection); } catch (Exception e) { String error = "Could not get connection to database to determine database schema-name for " + AUTO_SCHEMA_NAME; Debug.logError(e, error); throw new GeneralRuntimeException(error, e); } }
final Connection connection = ConnectionFactory.getConnection(helperName); if (transactionIsolationLevel >= 0) { connection.setTransactionIsolation(transactionIsolationLevel);
private String findFieldTypeFromJDBCConnection() { final Connection connection; try { connection = ConnectionFactory.getConnection(name); final DatabaseType typeForConnection = DatabaseTypeFactory.getTypeForConnection(connection); if (typeForConnection == null) { Debug.logError("Could not determine database type from "); } return typeForConnection.getFieldTypeName(); } catch (Exception e) { String error = "Could not get connection to database to determine database type for " + AUTO_FIELD_TYPE; Debug.logError(e, error); throw new GeneralRuntimeException(error, e); } }
private String findSchemaNameFromJDBCConnection() { final Connection connection; try { connection = ConnectionFactory.getConnection(name); final DatabaseType typeForConnection = DatabaseTypeFactory.getTypeForConnection(connection); if (typeForConnection == null) { Debug.logError("Could not determine database type from "); } return typeForConnection.getSchemaName(connection); } catch (Exception e) { String error = "Could not get connection to database to determine database schema-name for " + AUTO_SCHEMA_NAME; Debug.logError(e, error); throw new GeneralRuntimeException(error, e); } }
_connection = ConnectionFactory.getConnection(helperName);
_connection = ConnectionFactory.getConnection(helperName);
_connection = ConnectionFactory.getConnection(helperName); _guard = guard(_connection); } catch (SQLException sqle) {