protected PreparedStatement getExistQuery(Connection conn, DatabaseObjectType type) throws SQLException { PreparedStatement pstmt = null; for (SQLObject existQuery : catalogStore.getExistQueries()) { if (type.equals(existQuery.getType())) { pstmt = conn.prepareStatement(existQuery.getSql()); break; } } return pstmt; }