if (Initializer.getDatabase() == Initializer.POSTGRES) {
if (DbHelper.getDatabase() == DbHelper.DB_POSTGRES) {
    public void testDataOperationWithPLSQL() throws Exception {        DataOperation operation = getSession().            retrieveDataOperation("examples.DataOperationWithPLSQL");           // neither variable being bound should throw a PersistenceException        DataQuery query = getSession().retrieveQuery("examples.DataQuery");        long size = query.size();        operation.execute();        assert("The query should be larger after the PL/SQL than before",               size < query.size());        operation = getSession().retrieveDataOperation            ("examples.DataOperationWithPLSQLAndReturn");        query = getSession().retrieveQuery("examples.DataQuery");        size = query.size();        // get the max_id that can be used to make sure we are getting        // the correct results back        DataQuery maxQuery = getSession().retrieveQuery("examples.DataQueryMaxID");        maxQuery.next();        int newID = ((BigDecimal)maxQuery.get("id")).intValue();        maxQuery.close();        String return_value = null;        if (Initializer.getDatabase() == Initializer.POSTGRES) {            DataQuery operationQuery = getSession().retrieveQuery                ("examples.DataOperationFunction");            operationQuery.next();            return_value = (String)operationQuery.get("newValue");            operationQuery.close();        } else {            operation = getSession().retrieveDataOperation                ("examples.DataOperationFunction");            operation.execute();            return_value = (String)operation.get("newValue");        }        assert("DataOperationFunction did not correctly change the items " +               "returned by the query.  Expected " + (size + 1) +                " but got " + query.size(), size + 1 == query.size());        size = query.size();        int nextID = Integer.parseInt(return_value);        assert("DataOperationFunction did not return the correct value. " +               "We expected " + (newID + 1) + " but got " + nextID,               newID + 1 == nextID);        newID = nextID;        if (Initializer.getDatabase() == Initializer.POSTGRES) {            DataQuery operationQuery = getSession().retrieveQuery                ("examples.DataOperationProcWithOut");            operationQuery.setParameter("oldID", null);            operationQuery.next();            return_value = (String)operationQuery.get("newID");            operationQuery.close();        } else {            operation = getSession().retrieveDataOperation                ("examples.DataOperationProcWithOut");            operation.execute();            return_value = (String)operation.get("newID");          }        assert("DataOperationProcWithOut did not correctly change the items " +               "returned by the query", size + 1 == query.size());        size = query.size();        nextID = Integer.parseInt(return_value);        assert("DataOperationProcWithOut did not return the correct value. " +               "We expected " + (newID + 1) + " but got " + nextID,               newID + 1 == nextID);        newID = nextID;        String stringValue = Integer.toString(Integer.parseInt(return_value) + 8);        if (Initializer.getDatabase() == Initializer.POSTGRES) {            DataQuery operationQuery = getSession().retrieveQuery                ("examples.DataOperationProcWithInOut");            operationQuery.setParameter("oldID", new Integer(stringValue));            operationQuery.next();            return_value = (String)operationQuery.get("newID");            operationQuery.close();        } else {            operation = getSession().retrieveDataOperation                ("examples.DataOperationProcWithInOut");            operation.setParameter("oldID", stringValue);            operation.execute();            return_value = (String)operation.get("newID");        }        assert("DataOperationProcWithInOut did not correctly change the " +               "items returned by the query.  We expected " + stringValue +               " but got " + return_value, stringValue.equals(return_value));        assert("DataOperationProcWithInOut did not add a row",               size + 1 == query.size());        size = query.size();        nextID = Integer.parseInt(return_value);        assert("DataOperationProcWithInOut did not return the correct value. " +               "We expected " + (newID + 8) + " but got " + nextID,               newID + 8 == nextID);        newID = nextID;        Integer integerValue = new Integer(Integer.parseInt(return_value) + 8);        Integer return_integer = null;        if (Initializer.getDatabase() == Initializer.POSTGRES) {            DataQuery operationQuery = getSession().retrieveQuery                ("examples.DataOperationProcWithInOutInt");            operationQuery.setParameter("oldID", integerValue);            operationQuery.next();            return_integer = (Integer)operationQuery.get("newID");            operationQuery.close();        } else {            operation = getSession().retrieveDataOperation                ("examples.DataOperationProcWithInOutInt");            operation.setParameter("oldID", integerValue);            operation.execute();            return_integer = (Integer)operation.get("newID");        }        assert("DataOperationProcWithInOutInt did not correctly change the " +               "items returned by the query (with Integer)",                integerValue.toString().equals(return_integer.toString()));        assert("DataOperationProcWithInOutInt and Integer did not add a row",               size + 1 == query.size());        size = query.size();        nextID = return_integer.intValue();        assert("DataOperationProcWithInOutInt did not return the correct value. " +               "We expected " + (newID + 8) + " but got " + nextID,               newID + 8 == nextID);        newID = nextID;                // now we test using Dates        Date date = new Date();        if (Initializer.getDatabase() == Initializer.POSTGRES) {            DataQuery operationQuery = getSession().retrieveQuery                ("examples.DataOperationProcWithDates");            operationQuery.setParameter("idToUpdate", integerValue);            operationQuery.setParameter("oldDate", date);            operationQuery.next();            operationQuery.close();        } else {            operation = getSession().retrieveDataOperation                ("examples.DataOperationProcWithDates");            operation.setParameter("idToUpdate", return_integer);            operation.setParameter("oldDate", date);            operation.execute();        }        assert("DataOperationProcWithDates and Integer added or removed a row",               size == query.size());        // get the new time and make sure it is the same as the old time        query = getSession().retrieveQuery("examples.DataQuery");        query.addEqualsFilter("id", return_integer);        query.next();        long newTime = date.getTime() - ((Date)query.get("actionTime")).getTime();        assert("The time retrieved is not near the time set",                newTime > -1000 && newTime < 1000);        query.close();    }