You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/09/09 17:07:41 UTC

[09/13] ISIS-522: mothballing SQL OS.

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimeMapper.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimeMapper.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimeMapper.java
deleted file mode 100644
index 3b76abc..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimeMapper.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.jdbc;
-
-import org.apache.isis.applib.PersistFailedException;
-import org.apache.isis.applib.value.Time;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.objectstore.sql.AbstractFieldMappingFactory;
-import org.apache.isis.objectstore.sql.Defaults;
-import org.apache.isis.objectstore.sql.Results;
-import org.apache.isis.objectstore.sql.mapping.FieldMapping;
-
-public class JdbcTimeMapper extends AbstractJdbcFieldMapping {
-
-    private final String dataType;
-
-    public static class Factory extends AbstractFieldMappingFactory {
-
-        @Override
-        public FieldMapping createFieldMapping(final ObjectSpecification object, final ObjectAssociation field) {
-            final String dataType = getTypeOverride(object, field, Defaults.TYPE_TIME());
-            return new JdbcTimeMapper(field, dataType);
-        }
-    }
-
-    protected JdbcTimeMapper(final ObjectAssociation field, final String dataType) {
-        super(field);
-        this.dataType = dataType;
-    }
-
-    @Override
-    protected Object preparedStatementObject(final ObjectAdapter value) {
-        final Time asTime = (Time) value.getObject();
-        return asTime.asJavaTime();
-    }
-
-    @Override
-    public ObjectAdapter setFromDBColumn(final Results results, final String columnName, final ObjectAssociation field) {
-        /*
-         * Long hour = Long.decode(encodedValue.substring(0, 2)); Long minute =
-         * Long.decode(encodedValue.substring(3, 5)); Long millis = (minute +
-         * hour * 60) * 60 * 1000; String valueString = "T" +
-         * Long.toString(millis); return
-         * field.getSpecification().getFacet(EncodableFacet.class)
-         * .fromEncodedString(valueString);
-         */
-        ObjectAdapter restoredValue;
-        final Class<?> correspondingClass = field.getSpecification().getCorrespondingClass();
-        if (correspondingClass == Time.class) {
-            final Time timeValue = results.getTime(columnName);
-            restoredValue = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(timeValue);
-        } else {
-            throw new PersistFailedException("Unhandled time type: " + correspondingClass.getCanonicalName());
-        }
-        return restoredValue;
-
-    }
-
-    @Override
-    public String columnType() {
-        return dataType;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimestampMapper.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimestampMapper.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimestampMapper.java
deleted file mode 100644
index 73e6906..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/JdbcTimestampMapper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.jdbc;
-
-import org.apache.isis.applib.PersistFailedException;
-import org.apache.isis.applib.value.TimeStamp;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.objectstore.sql.AbstractFieldMappingFactory;
-import org.apache.isis.objectstore.sql.Defaults;
-import org.apache.isis.objectstore.sql.Results;
-import org.apache.isis.objectstore.sql.mapping.FieldMapping;
-
-public class JdbcTimestampMapper extends AbstractJdbcFieldMapping {
-
-    private final String dataType;
-
-    public static class Factory extends AbstractFieldMappingFactory {
-
-        @Override
-        public FieldMapping createFieldMapping(final ObjectSpecification object, final ObjectAssociation field) {
-            final String dataType = getTypeOverride(object, field, Defaults.TYPE_TIMESTAMP());
-            return new JdbcTimestampMapper(field, dataType);
-        }
-    }
-
-    protected JdbcTimestampMapper(final ObjectAssociation field, final String dataType) {
-        super(field);
-        this.dataType = dataType;
-    }
-
-    @Override
-    protected Object preparedStatementObject(final ObjectAdapter value) {
-        final TimeStamp asDate = (TimeStamp) value.getObject();
-        final java.sql.Timestamp timeStamp = new java.sql.Timestamp(asDate.longValue());
-        return timeStamp;
-    }
-
-    @Override
-    public ObjectAdapter setFromDBColumn(final Results results, final String columnName, final ObjectAssociation field) {
-
-        ObjectAdapter restoredValue;
-        final Class<?> correspondingClass = field.getSpecification().getCorrespondingClass();
-        if (correspondingClass == TimeStamp.class) {
-            final java.sql.Timestamp o = (java.sql.Timestamp) results.getObject(columnName);
-            final TimeStamp timeValue = new TimeStamp(o.getTime());
-            restoredValue = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(timeValue);
-        } else {
-            throw new PersistFailedException("Unhandled time type: " + correspondingClass.getCanonicalName());
-        }
-        return restoredValue;
-    }
-
-    @Override
-    public String columnType() {
-        return dataType;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoder.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoder.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoder.java
deleted file mode 100644
index 8f6c797..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoder.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.isis.objectstore.sql.jdbc.helpers;
-
-/**
- * 
- * 
- * @version $Rev$ $Date$
- */
-public class SimplePasswordEncoderDecoder {
-    private final String passwordSeed;
-    private final int seedLength;
-    private final Integer valueOfZero = Integer.valueOf('0');
-    private final int dbLength;
-
-    public SimplePasswordEncoderDecoder(String passwordSeed, Integer encLength) {
-        this.passwordSeed = passwordSeed;
-        if (passwordSeed == null) {
-            seedLength = 0;
-        } else {
-            seedLength = passwordSeed.length();
-        }
-        dbLength = encLength;
-    }
-
-    /**
-     * Use a simple algorithm to encode the given value into an encoded String
-     * 
-     * @param String
-     *            raw value
-     * @return encoded String
-     */
-    public final String encodeRawValueIntoEncodedString(final String value) {
-        if (passwordSeed == null) {
-            return value;
-        }
-        final int rawLength = value.length();
-        String length = Integer.toHexString(rawLength);
-        if (length.length() == 1) {
-            length = "0" + length;
-        }
-        String encodePart1 = length + value;
-        String encoded = "";
-        for (int i = 0; i < rawLength + 2; i++) {
-            int thisSeed = passwordSeed.charAt(i % seedLength);
-            int thisPassword = encodePart1.charAt(i);
-            int nextValue = (thisSeed + thisPassword) % 255;
-            encoded = encoded.concat(String.format("%2h", nextValue));
-
-        }
-        for (int i = rawLength; i < (dbLength / 2) - 2; i++) {
-            int thisSeed = passwordSeed.charAt(i % seedLength);
-            int thisPassword = passwordSeed.charAt((i - 2) % seedLength);
-            int nextValue = (thisSeed + thisPassword + i) % 255;
-            encoded = encoded.concat(String.format("%2h", nextValue));
-        }
-
-        return encoded;
-    }
-
-    /**
-     * Use a simple algorithm to decode the given encoded String into a raw String
-     * 
-     * @param String
-     *            encoded value
-     * @return decoded raw String
-     */
-    public final String decodeEncodedValueIntoRawString(final String encodedValue) {
-        if (passwordSeed == null) {
-            return encodedValue;
-        }
-        int passwordLength = extractIndexedValueAsInt(encodedValue, 0);
-
-        String decodedValue = "";
-        for (int i = 0; i < passwordLength; i++) {
-            char extracted = extractIndexedValueAsChar(encodedValue, i + 2);
-            decodedValue = decodedValue + (extracted);
-        }
-        return decodedValue;
-    }
-
-    private int extractIndexedValueAsInt(final String encodedValue, int index) {
-        int value1 = decodeIndexedValue(encodedValue, index) - valueOfZero;
-        int value2 = decodeIndexedValue(encodedValue, index + 1) - valueOfZero;
-        return value1 * 16 + value2;
-    }
-
-    private char extractIndexedValueAsChar(final String encodedValue, int index) {
-        int value1 = decodeIndexedValue(encodedValue, index);
-        return (char) value1;
-    }
-
-    private int decodeIndexedValue(final String encodedValue, int index) {
-        String s = encodedValue.substring((index) * 2, (index) * 2 + 2);
-        int hex = Integer.valueOf(s, 16);
-        int thisSeed = passwordSeed.charAt(index % seedLength);
-        int passwordValue = hex - thisSeed;
-        return passwordValue;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/installer/JdbcFieldMappingFactoryInstaller.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/installer/JdbcFieldMappingFactoryInstaller.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/installer/JdbcFieldMappingFactoryInstaller.java
deleted file mode 100644
index 62391bf..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/jdbc/installer/JdbcFieldMappingFactoryInstaller.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.jdbc.installer;
-
-import org.apache.isis.applib.value.Color;
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.applib.value.DateTime;
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.applib.value.Money;
-import org.apache.isis.applib.value.Password;
-import org.apache.isis.applib.value.Percentage;
-import org.apache.isis.applib.value.Time;
-import org.apache.isis.applib.value.TimeStamp;
-import org.apache.isis.objectstore.sql.Defaults;
-import org.apache.isis.objectstore.sql.FieldMappingFactoryInstaller;
-import org.apache.isis.objectstore.sql.FieldMappingLookup;
-import org.apache.isis.objectstore.sql.jdbc.JdbcBinaryValueMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcColorValueMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcDateMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcDateTimeMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcGeneralValueMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcImageValueMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcMoneyValueMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcObjectReferenceFieldMapping;
-import org.apache.isis.objectstore.sql.jdbc.JdbcObjectReferenceMappingFactory;
-import org.apache.isis.objectstore.sql.jdbc.JdbcPasswordValueMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcTimeMapper;
-import org.apache.isis.objectstore.sql.jdbc.JdbcTimestampMapper;
-
-public class JdbcFieldMappingFactoryInstaller implements FieldMappingFactoryInstaller {
-
-    @Override
-    public void load(final FieldMappingLookup lookup) {
-
-        lookup.addFieldMappingFactory(Image.class,
-            new JdbcImageValueMapper.Factory(Defaults.TYPE_STRING(), Defaults.TYPE_BLOB()));
-
-        lookup.addFieldMappingFactory(Boolean.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_BOOLEAN()));
-        lookup.addFieldMappingFactory(Short.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_SHORT()));
-        lookup.addFieldMappingFactory(Integer.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_INT()));
-        lookup.addFieldMappingFactory(Long.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_LONG()));
-        lookup.addFieldMappingFactory(Float.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_FLOAT()));
-        lookup.addFieldMappingFactory(Double.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_DOUBLE()));
-        lookup.addFieldMappingFactory(char.class, new JdbcGeneralValueMapper.Factory("CHAR(2)"));
-
-        lookup.addFieldMappingFactory(Money.class, new JdbcMoneyValueMapper.Factory("FLOAT", "VARCHAR(3)"));
-        lookup.addFieldMappingFactory(Percentage.class, new JdbcGeneralValueMapper.Factory("FLOAT"));
-        lookup.addFieldMappingFactory(Password.class, new JdbcPasswordValueMapper.Factory(Defaults.TYPE_PASSWORD(),
-            Defaults.PASSWORD_SEED(), Defaults.PASSWORD_ENC_LENGTH()));
-        lookup.addFieldMappingFactory(Color.class, new JdbcColorValueMapper.Factory(Defaults.TYPE_LONG()));
-        lookup.addFieldMappingFactory(String.class, new JdbcGeneralValueMapper.Factory(Defaults.TYPE_STRING()));
-
-        lookup.addFieldMappingFactory(Date.class, new JdbcDateMapper.Factory());
-        lookup.addFieldMappingFactory(Time.class, new JdbcTimeMapper.Factory());
-        lookup.addFieldMappingFactory(DateTime.class, new JdbcDateTimeMapper.Factory());
-        lookup.addFieldMappingFactory(TimeStamp.class, new JdbcTimestampMapper.Factory());
-
-        lookup.addFieldMappingFactory(java.sql.Date.class, new JdbcDateMapper.Factory());
-        lookup.addFieldMappingFactory(java.sql.Time.class, new JdbcTimeMapper.Factory());
-        lookup.addFieldMappingFactory(java.util.Date.class, new JdbcDateTimeMapper.Factory());
-        lookup.addFieldMappingFactory(java.sql.Timestamp.class, new JdbcTimestampMapper.Factory());
-
-        lookup.addFieldMappingFactory(boolean.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_BOOLEAN()));
-        lookup.addFieldMappingFactory(short.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_SHORT()));
-        lookup.addFieldMappingFactory(int.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_INT()));
-        lookup.addFieldMappingFactory(long.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_LONG()));
-        lookup.addFieldMappingFactory(float.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_FLOAT()));
-        lookup.addFieldMappingFactory(double.class, new JdbcBinaryValueMapper.Factory(Defaults.TYPE_DOUBLE()));
-
-        lookup.setReferenceFieldMappingFactory(new JdbcObjectReferenceFieldMapping.Factory());
-
-        lookup.setObjectReferenceMappingfactory(new JdbcObjectReferenceMappingFactory());
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMapping.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMapping.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMapping.java
deleted file mode 100644
index 0cc664e..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMapping.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.mapping;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.objectstore.sql.DatabaseConnector;
-import org.apache.isis.objectstore.sql.Results;
-
-public interface FieldMapping {
-	
-    public ObjectAssociation getField();
-
-    void appendColumnDefinitions(StringBuffer sql);
-
-    void appendColumnNames(StringBuffer sql);
-
-    void appendInsertValues(DatabaseConnector connector, StringBuffer sql, ObjectAdapter object);
-
-    void appendUpdateValues(DatabaseConnector connector, StringBuffer sql, ObjectAdapter object);
-
-    void initializeField(ObjectAdapter object, Results rs);
-
-    void appendWhereClause(DatabaseConnector connector, StringBuffer sql, ObjectAdapter object);
-
-    void debugData(DebugBuilder debug);
-
-    void appendWhereObject(DatabaseConnector connector, ObjectAdapter objectAdapter);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMappingFactory.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMappingFactory.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMappingFactory.java
deleted file mode 100644
index 4a139cf..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/FieldMappingFactory.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.mapping;
-
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-
-public interface FieldMappingFactory {
-    FieldMapping createFieldMapping(final ObjectSpecification object, final ObjectAssociation field);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMapping.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMapping.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMapping.java
deleted file mode 100644
index e064cbe..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMapping.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.mapping;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.objectstore.sql.DatabaseConnector;
-import org.apache.isis.objectstore.sql.Results;
-
-public interface ObjectReferenceMapping {
-
-    void appendColumnDefinitions(StringBuffer sql);
-
-    void appendInsertValues(DatabaseConnector connector, StringBuffer sb, ObjectAdapter value);
-
-    void appendColumnNames(StringBuffer sql);
-
-    void appendUpdateValues(DatabaseConnector connector, StringBuffer sql, ObjectAdapter object);
-
-    Oid recreateOid(final Results rs, final ObjectSpecification specification);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMappingFactory.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMappingFactory.java b/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMappingFactory.java
deleted file mode 100644
index 6a13d63..0000000
--- a/component/objectstore/sql/sql-impl/src/main/java/org/apache/isis/objectstore/sql/mapping/ObjectReferenceMappingFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.mapping;
-
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-public interface ObjectReferenceMappingFactory {
-    ObjectReferenceMapping createReferenceMapping(String columnName, ObjectSpecification specification);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/site/apt/index.apt b/component/objectstore/sql/sql-impl/src/site/apt/index.apt
deleted file mode 100644
index 891352a..0000000
--- a/component/objectstore/sql/sql-impl/src/site/apt/index.apt
+++ /dev/null
@@ -1,27 +0,0 @@
-~~  Licensed to the Apache Software Foundation (ASF) under one
-~~  or more contributor license agreements.  See the NOTICE file
-~~  distributed with this work for additional information
-~~  regarding copyright ownership.  The ASF licenses this file
-~~  to you under the Apache License, Version 2.0 (the
-~~  "License"); you may not use this file except in compliance
-~~  with the License.  You may obtain a copy of the License at
-~~
-~~        http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~  Unless required by applicable law or agreed to in writing,
-~~  software distributed under the License is distributed on an
-~~  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-~~  KIND, either express or implied.  See the License for the
-~~  specific language governing permissions and limitations
-~~  under the License.
-
-
-
-SQL ObjectStore Implementation
-
- This module holds the implementation of the {{{../index.html}SQL ObjectStore}}.
-
-Further Info
-  
- See this module's {{{./apidocs/index.html}Javadoc}} and {{{../docbkx/html/guide/isis-sql-objectstore.html}User Guide}} for more information.
-

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/site/apt/jottings.apt b/component/objectstore/sql/sql-impl/src/site/apt/jottings.apt
deleted file mode 100644
index c5d1200..0000000
--- a/component/objectstore/sql/sql-impl/src/site/apt/jottings.apt
+++ /dev/null
@@ -1,24 +0,0 @@
-~~  Licensed to the Apache Software Foundation (ASF) under one
-~~  or more contributor license agreements.  See the NOTICE file
-~~  distributed with this work for additional information
-~~  regarding copyright ownership.  The ASF licenses this file
-~~  to you under the Apache License, Version 2.0 (the
-~~  "License"); you may not use this file except in compliance
-~~  with the License.  You may obtain a copy of the License at
-~~
-~~        http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~  Unless required by applicable law or agreed to in writing,
-~~  software distributed under the License is distributed on an
-~~  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-~~  KIND, either express or implied.  See the License for the
-~~  specific language governing permissions and limitations
-~~  under the License.
-
-
-
-Jottings
- 
-  This page is to capture any random jottings relating to this module prior 
-  to being moved into formal documentation. 
- 

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/site/site.xml
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/site/site.xml b/component/objectstore/sql/sql-impl/src/site/site.xml
deleted file mode 100644
index fea0aec..0000000
--- a/component/objectstore/sql/sql-impl/src/site/site.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-         http://www.apache.org/licenses/LICENSE-2.0
-         
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project>
-
-	<body>
-		<breadcrumbs>
-			<item name="Implementation" href="index.html"/>
-		</breadcrumbs>
-
-		<menu name="SQL Objectstore Implementation">
-			<item name="About" href="index.html" />
-            <item name="Jottings" href="jottings.html" />
-		</menu>
-
-        <menu name="SQL OS Modules">
-            <item name="Implementation" href="../sql-impl/index.html" />
-            <item name="Tests" href="../sql-tests-common/index.html" />
-            <item name="Integration Tests" href="../sql-tests-served/index.html" /> 
-        </menu>
-
-        <menu name="Maven Reports" ref="reports" />
-	</body>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/DefaultsTest.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/DefaultsTest.java b/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/DefaultsTest.java
deleted file mode 100644
index 86b5db4..0000000
--- a/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/DefaultsTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql;
-
-import static org.hamcrest.Matchers.is;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-
-public class DefaultsTest {
-    @Test
-    public void tablePrefixDefaultsTo_Isis() {
-        final String prefix = "isis.persistor.sql";
-        final IsisConfiguration config = new IsisConfigurationDefault();
-        Defaults.initialise(prefix, config);
-        Assert.assertThat(Defaults.getTablePrefix(), is("isis_"));
-    }
-
-    @Test
-    public void tablePrefixCanBeReplaced() {
-        final String prefix = "isis.persistor.sql";
-        final String key = "isis.persistor.sql.default.tableprefix";
-        final IsisConfigurationDefault config = new IsisConfigurationDefault();
-        config.add(key, "");
-        Defaults.initialise(prefix, config);
-        Assert.assertThat(Defaults.getTablePrefix(), is(""));
-    }
-    
-    @Test 
-    public void checkLimitStatement(){
-        final String prefix = "isis.persistor.sql";
-        final IsisConfigurationDefault config = new IsisConfigurationDefault();
-        Defaults.initialise(prefix, config);
-        
-        final long startIndex=0;
-        final long rowCount=0;
-        
-        Assert.assertThat(Defaults.getLimitsClause(startIndex, rowCount), is("LIMIT 0, 0"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoderTest.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoderTest.java b/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoderTest.java
deleted file mode 100644
index e2a976a..0000000
--- a/component/objectstore/sql/sql-impl/src/test/java/org/apache/isis/objectstore/sql/jdbc/helpers/SimplePasswordEncoderDecoderTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.isis.objectstore.sql.jdbc.helpers;
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.not;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * 
- * 
- * @version $Rev$ $Date$
- */
-public class SimplePasswordEncoderDecoderTest {
-
-    private static final String testSeed = "randomString12345";
-    private static final Integer encLength = 120;
-
-    @Test
-    public void testEncodingValueFromString() {
-        SimplePasswordEncoderDecoder encdec = new SimplePasswordEncoderDecoder(testSeed, encLength);
-        String input = "password";
-        String encoded = encdec.encodeRawValueIntoEncodedString(input);
-        Assert.assertThat(encoded, is(not(input)));
-        Assert.assertThat(encoded.length(), is(120));
-    }
-
-    @Test
-    public void testDecodingEncodedValue() {
-        SimplePasswordEncoderDecoder encdec = new SimplePasswordEncoderDecoder(testSeed, encLength);
-        String input = "password";
-        String encoded = encdec.encodeRawValueIntoEncodedString(input);
-        Assert.assertThat(encoded, is(not(input)));
-
-        String decoded = encdec.decodeEncodedValueIntoRawString(encoded);
-        Assert.assertThat(decoded, is(input));
-    }
-
-    @Test
-    public void testNoSeedDoesNothing() {
-        SimplePasswordEncoderDecoder encdec = new SimplePasswordEncoderDecoder(null, encLength);
-        String input = "password";
-        String encoded = encdec.encodeRawValueIntoEncodedString(input);
-        Assert.assertThat(encoded, is(input));
-
-        String decoded = encdec.decodeEncodedValueIntoRawString(encoded);
-        Assert.assertThat(decoded, is(input));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-tests-common/pom.xml
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-tests-common/pom.xml b/component/objectstore/sql/sql-tests-common/pom.xml
deleted file mode 100644
index 829c1e4..0000000
--- a/component/objectstore/sql/sql-tests-common/pom.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-         http://www.apache.org/licenses/LICENSE-2.0
-         
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.isis.objectstore</groupId>
-        <artifactId>isis-objectstore-sql</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>isis-objectstore-sql-tests-common</artifactId>
-
-    <name>Isis SQL ObjectStore Integration Tests - Common</name>
-
-    <properties>
-	    <siteBaseDir>..</siteBaseDir>
-		<relativeUrl>sql-tests-common/</relativeUrl>
-
-        <xml-objectstore.version>1.0.0-SNAPSHOT</xml-objectstore.version>
-        <hsqldb.version>2.2.9</hsqldb.version>
-    </properties>
-
-    <!-- used in Site generation for relative references. -->
-    <url>http://isis.apache.org/${relativeUrl}</url>
-
-    <description>Common code to test the sql persistor. Uses the HSQLDB for maximum compatibility.</description>
-    <build>
-        <plugins>
-            <!-- TODO: currently set to ignore test failures -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <testFailureIgnore>false</testFailureIgnore>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>${maven-project-info-reports-plugin}</version>
-                <inherited>false</inherited>
-                <configuration>
-                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                </configuration>
-                <reportSets>
-                    <reportSet>
-                        <inherited>false</inherited>
-                        <reports>
-                            <report>dependency-management</report>
-                            <report>dependencies</report>
-                            <report>dependency-convergence</report>
-                            <report>plugins</report>
-                            <report>summary</report>
-                        </reports>
-                    </reportSet>
-                </reportSets>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.hsqldb</groupId>
-                <artifactId>hsqldb</artifactId>
-                <version>${hsqldb.version}</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-unittestsupport</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-integtestsupport</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-runtime</artifactId>
-        </dependency>
-
-        
-        <!--  Required for TestProxy -->
-		<!-- Isis defaults -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-objectstore</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-objectstore</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-        	<groupId>org.apache.isis.core</groupId>
-        	<artifactId>isis-core-bytecode-cglib</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-		<!-- Isis Object store -->
-        <dependency>
-            <groupId>org.apache.isis.objectstore</groupId>
-            <artifactId>isis-objectstore-sql-impl</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-tck-dom</artifactId>
-        </dependency>
-
-
-        <!-- HSQLDB -->
-        <dependency>
-            <groupId>org.hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-        </dependency>
-        <!-- Required to support the XML cross-test -->
-        <dependency>
-            <groupId>org.apache.isis.objectstore</groupId>
-            <artifactId>isis-objectstore-xml</artifactId>
-        </dependency>
-		<!-- others -->
-        <dependency>
-            <groupId>org.jmock</groupId>
-            <artifactId>jmock-legacy</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.jmock</groupId>
-            <artifactId>jmock-junit4</artifactId>
-        </dependency>
-        <dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/Data.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/Data.java b/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/Data.java
deleted file mode 100644
index f54f756..0000000
--- a/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/Data.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.objectstore.sql.common;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.isis.applib.value.Color;
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.applib.value.DateTime;
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.applib.value.Money;
-import org.apache.isis.applib.value.Password;
-import org.apache.isis.applib.value.Percentage;
-import org.apache.isis.applib.value.Time;
-import org.apache.isis.applib.value.TimeStamp;
-
-public class Data {
-
-    // private static final TimeZone GMTm2_TIME_ZONE;
-
-    // Helper values
-    static final java.sql.Date sqlDate;
-    static final java.sql.Date sqlDate20100305;
-
-    static {
-        /*
-         * 
-         * // For testing -ve offset timezone local regions. GMTm2_TIME_ZONE = TimeZone.getTimeZone("GMT-0200");
-         * //GMTm2_TIME_ZONE = TimeZone.getTimeZone("UTC"); TimeZone.setDefault(GMTm2_TIME_ZONE);
-         */
-
-        /*
-         * TimeZone timeZone = TimeZone.getTimeZone("Etc/UTC"); if (timeZone == null) { timeZone =
-         * TimeZone.getTimeZone("UTC"); } UTC_TIME_ZONE = timeZone;
-         */
-
-        /*
-         * There is still an issue assigning a java.sql.Date variable from a calendar. final Calendar cal =
-         * Calendar.getInstance(); cal.setTimeZone(UTC_TIME_ZONE); cal.clear(); cal.set(Calendar.YEAR, 2011);
-         * cal.set(Calendar.MONTH, 4-1); cal.set(Calendar.DAY_OF_MONTH, 8);
-         */
-        // 2011-4-8 = 1,270,684,800,000
-        final Date date20100308 = new Date(2010, 4, 8);
-        sqlDate = new java.sql.Date(date20100308.getMillisSinceEpoch());
-
-        sqlDate20100305 = new java.sql.Date(new Date(2010, 3, 5).getMillisSinceEpoch());
-    }
-
-    static final Date applibDate = new Date(2010, 3, 5); // 2010-03-05 =
-                                                         // 1,267,747,200,000
-    static final DateTime dateTime = new DateTime(2010, 3, 5, 1, 23); // 1,267,752,180,000
-    static final TimeStamp timeStamp = new TimeStamp(dateTime.millisSinceEpoch());
-    static final Time time = new Time(14, 56); // 53,760,000
-
-    static final Color color = Color.WHITE;
-    static final Image image = new Image(new int[][] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } });
-    static final Password password = new Password("password");
-    static final Percentage percentage = new Percentage(42);
-    static final Money money = new Money(99.99, "ZAR");
-
-    // Standard values
-    static final int intMaxValue = Integer.MAX_VALUE;
-    static final short shortMaxValue = Short.MAX_VALUE;
-    static final long longMaxValue = Long.MAX_VALUE;
-    static final double doubleMaxValue = 1e308;// Double.MAX_VALUE;
-    static final float floatMaxValue = (float) 1e37;// Float.MAX_VALUE;
-
-    static final int intMinValue = Integer.MIN_VALUE;
-    static final short shortMinValue = Short.MIN_VALUE;
-    static final long longMinValue = Long.MIN_VALUE;
-    static final double doubleMinValue = 1e-307;// Double.MIN_VALUE;
-    static final float floatMinValue = (float) 1e-37;// Float.MIN_VALUE;
-
-    // Collection mapper tests
-    static final List<String> stringList1 = Arrays.asList("Baking", "Bakery", "Canned", "Dairy");
-    static final List<String> stringList2 = Arrays.asList("Fridge", "Deli", "Fresh Produce", "Frozen", "Household",
-        "Other..");
-
-    public static List<String> getTableNames() {
-        return Arrays.asList("sqldataclass", "simpleclass", "simpleclasstwo", "primitivevaluedentity");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestCommonBase.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestCommonBase.java b/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestCommonBase.java
deleted file mode 100755
index 0747bcd..0000000
--- a/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestCommonBase.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.objectstore.sql.common;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.FixMethodOrder;
-import org.junit.Rule;
-import org.junit.runners.MethodSorters;
-
-import org.apache.isis.core.tck.dom.poly.ReferencingPolyTypesEntity;
-import org.apache.isis.core.tck.dom.sqlos.SqlDomainObjectRepository;
-import org.apache.isis.core.tck.dom.sqlos.data.SqlDataClass;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-import org.apache.isis.objectstore.sql.common.SqlIntegrationTestFixtures.State;
-
-/**
- * @author Kevin kevin@kmz.co.za
- * 
- *         This common test class is used by all sql objectstore tests to manage the Isis framework.
- * 
- * @version $Rev$ $Date$
- */
-@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public abstract class SqlIntegrationTestCommonBase {
-
-    @Rule
-    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
-    protected SqlIntegrationTestFixtures getSqlIntegrationTestFixtures() {
-        return SqlIntegrationTestFixtures.getInstance();
-    }
-
-    protected SqlDomainObjectRepository factory;
-    protected SqlDataClass sqlDataClass;
-    protected ReferencingPolyTypesEntity referencingPolyTypesEntity;
-
-    public Properties getProperties() {
-        try {
-            final Properties properties = new Properties();
-            properties.load(new FileInputStream("src/test/config/" + getPropertiesFilename()));
-            return properties;
-        } catch (final FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (final IOException e) {
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    public abstract String getPropertiesFilename();
-
-    protected void setFixtureInitializationStateIfNot(State state, String persistenceMechanism) {
-        if (!persistenceMechanismIs(persistenceMechanism)) {
-            setFixtureInitializationState(state);
-        }
-    }
-
-    protected void setFixtureInitializationState(final State state, final String persistenceMechanism) {
-        if (persistenceMechanismIs(persistenceMechanism)) {
-            setFixtureInitializationState(state);
-        }
-    }
-
-    protected void setFixtureInitializationState(final State state) {
-        getSqlIntegrationTestFixtures().setState(state);
-    }
-
-    protected boolean persistenceMechanismIs(final String persistenceMechanism) {
-        return getProperties().getProperty("isis.persistor").equals(persistenceMechanism);
-    }
-
-    /**
-     * This method can be used to do any DB specific actions the first time the test framework is setup. e.g. In the XML
-     * test, it must delete all XML files in the data store directory.
-     * 
-     * You can also use @BeforeClass to perform pre-connection cleanup, such as deleting hsql-db data directories.
-     */
-    public void resetPersistenceStoreDirectlyIfRequired() {
-    }
-
-    protected void testSetup() {
-        resetPersistenceStoreDirectlyIfRequired();
-        getSqlIntegrationTestFixtures().setState(State.INITIALIZE);
-    }
-
-    // //////////////////////////////////////////////////////////////////////////////
-    // before, after
-    // //////////////////////////////////////////////////////////////////////////////
-
-    @Before
-    public void setUpSystem() throws Exception {
-        org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.INFO);
-
-        if (!getSqlIntegrationTestFixtures().getState().isInitialize()) {
-            return;
-        }
-
-        final Properties properties = getProperties();
-        if (properties == null) {
-            getSqlIntegrationTestFixtures().initSystem("src/test/config", getPropertiesFilename());
-        } else {
-            getSqlIntegrationTestFixtures().initSystem(properties);
-        }
-
-        final String sqlSetupString = getSqlSetupString();
-        if (sqlSetupString != null) {
-            getSqlIntegrationTestFixtures().sqlExecute(sqlSetupString);
-        }
-    }
-
-    /**
-     * optional hook
-     */
-    protected String getSqlSetupString() {
-        return null;
-    }
-
-    @Before
-    public void setUpFactory() throws Exception {
-        factory = getSqlIntegrationTestFixtures().getSqlDataClassFactory();
-
-        // may have been setup by previous test
-        sqlDataClass = getSqlIntegrationTestFixtures().getSqlDataClass();
-        referencingPolyTypesEntity = getSqlIntegrationTestFixtures().getPolyTestClass();
-    }
-    
-
-
-    // //////////////////////////////////////////////////////////////////////////////
-    // after
-    // //////////////////////////////////////////////////////////////////////////////
-
-
-    @After
-    public void tearDown() throws Exception {
-        
-        
-        
-        if (!getSqlIntegrationTestFixtures().getState().isInitialize()) {
-            return;
-        }
-        final String sqlTeardownString = getSqlTeardownString();
-        if (sqlTeardownString != null) {
-            try {
-                getSqlIntegrationTestFixtures().sqlExecute(sqlTeardownString);
-            } catch (final SQLException e) {
-                e.printStackTrace();
-            }
-        }
-        getSqlIntegrationTestFixtures().shutDown();
-    }
-
-
-    /**
-     * optional hook
-     */
-    protected String getSqlTeardownString() {
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/40561609/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestData.java
----------------------------------------------------------------------
diff --git a/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestData.java b/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestData.java
deleted file mode 100644
index dcb5db1..0000000
--- a/component/objectstore/sql/sql-tests-common/src/main/java/org/apache/isis/objectstore/sql/common/SqlIntegrationTestData.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.objectstore.sql.common;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.FixMethodOrder;
-import org.junit.Test;
-import org.junit.runners.MethodSorters;
-
-import org.apache.isis.applib.value.Color;
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.applib.value.DateTime;
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.applib.value.Money;
-import org.apache.isis.applib.value.Password;
-import org.apache.isis.applib.value.Percentage;
-import org.apache.isis.applib.value.Time;
-import org.apache.isis.applib.value.TimeStamp;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.sqlos.SqlDomainObjectRepository;
-import org.apache.isis.core.tck.dom.sqlos.data.SimpleClass;
-import org.apache.isis.core.tck.dom.sqlos.data.SimpleClassTwo;
-import org.apache.isis.core.tck.dom.sqlos.data.SqlDataClass;
-import org.apache.isis.objectstore.sql.common.SqlIntegrationTestFixtures.State;
-
-/**
- * @author Kevin kevin@kmz.co.za
- * 
- *         This common class is used by the datatype tests (values, objects, collections) to ensure proper creation and
- *         reloading of domain objects.
- * 
- *         There are two "tests", with the framework re-initialised each time (to flush any objectstore memory of any
- *         created domain objects).
- * 
- *         The Singleton class {@link SqlIntegrationTestFixtures} is used to preserve values between tests.
- * 
- * @version $Rev$ $Date$
- */
-@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public abstract class SqlIntegrationTestData extends SqlIntegrationTestCommonBase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SqlIntegrationTestData.class);
-
-    private static List<SimpleClass> simpleClassList1 = new ArrayList<SimpleClass>();
-    private static List<SimpleClass> simpleClassList2 = new ArrayList<SimpleClass>();
-
-    private static SimpleClassTwo simpleClassTwoA;
-    private static SimpleClassTwo simpleClassTwoB;
-
-    private static PrimitiveValuedEntity pve1;
-    private static PrimitiveValuedEntity pve2;
-
-    
-    @Before
-    public void setUpXactn() throws Exception {
-        IsisContext.getTransactionManager().startTransaction();
-    }
-
-    @After
-    public void tearDownXactn() throws Exception {
-        IsisContext.getTransactionManager().endTransaction();
-        assertThat(IsisContext.getTransactionManager().getTransaction().getState().isComplete(), is(true));
-        
-    }
-
-    
-    /**
-     * Uses factory methods within the Isis framework to create the test data,
-     * thus exercising the "create data" portion of the object store.
-     * 
-     * The Isis framework will be again be re-created in the next test unless the 
-     * object store is "in-memory" (this is required since "in-memory" has to be
-     * left alone for created data to still be present in the next test).
-     */
-    @Test
-    public void testSetupStore() throws Exception {
-        testSetup();
-        setUpFactory();
-        testCreate();
-    }
-
-    protected void testCreate() throws Exception {
-
-        sqlDataClass = factory.newDataClass();
-
-        sqlDataClass.setString("Test String");
-        sqlDataClass.setDate(Data.applibDate);
-        sqlDataClass.setSqlDate(Data.sqlDate);
-        sqlDataClass.setMoney(Data.money);
-        sqlDataClass.setDateTime(Data.dateTime);
-        sqlDataClass.setTimeStamp(Data.timeStamp);
-        sqlDataClass.setTime(Data.time);
-        sqlDataClass.setColor(Data.color);
-        sqlDataClass.setImage(Data.image);
-        sqlDataClass.setPassword(Data.password);
-        sqlDataClass.setPercentage(Data.percentage);
-
-        // Setup SimpleClassTwo
-        simpleClassTwoA = factory.newSimpleClassTwo();
-        simpleClassTwoA.setText("A");
-        simpleClassTwoA.setIntValue(999);
-        simpleClassTwoA.setBooleanValue(true);
-
-        simpleClassTwoB = factory.newSimpleClassTwo();
-        simpleClassTwoB.setText("B");
-
-        sqlDataClass.setSimpleClassTwo(simpleClassTwoA);
-
-        // NumericClasses
-        // standard min types
-        pve2 = factory.newPrimitiveValuedEntity();
-        LOG.info( "Bits to represent Double: " + Double.SIZE);
-        pve2.setIntProperty(Data.intMinValue);
-        pve2.setShortProperty(Data.shortMinValue);
-        pve2.setLongProperty(Data.longMinValue);
-        pve2.setDoubleProperty(Data.doubleMinValue);
-        pve2.setFloatProperty(Data.floatMinValue);
-        pve2.setCharProperty((char) (32)); // temporary work around: See ISIS-269
-
-        sqlDataClass.setPrimitiveValuedEntityMin(pve2);
-
-        // standard max types
-        pve1 = factory.newPrimitiveValuedEntity();
-        pve1.setIntProperty(Data.intMaxValue);
-        pve1.setShortProperty(Data.shortMaxValue);
-        pve1.setLongProperty(Data.longMaxValue);
-        pve1.setDoubleProperty(Data.doubleMaxValue);
-        pve1.setFloatProperty(Data.floatMaxValue);
-        pve1.setCharProperty((char) (255));
-
-        sqlDataClass.setPrimitiveValuedEntityMax(pve1);
-
-        // Initialise collection1
-        boolean bMustAdd = false;
-        if (simpleClassList1.size() == 0) {
-            bMustAdd = true;
-        }
-        for (final String string : Data.stringList1) {
-            final SimpleClass simpleClass = factory.newSimpleClass();
-            simpleClass.setString(string);
-            simpleClass.setSimpleClassTwoA(simpleClassTwoA);
-            sqlDataClass.addToSimpleClasses1(simpleClass);
-            if (bMustAdd) {
-                simpleClassList1.add(simpleClass);
-            }
-        }
-
-        // Initialise collection2
-        for (final String string : Data.stringList2) {
-            final SimpleClass simpleClass = factory.newSimpleClass();
-            simpleClass.setString(string);
-            simpleClass.setSimpleClassTwoA(simpleClassTwoB);
-            sqlDataClass.addToSimpleClasses2(simpleClass);
-            if (bMustAdd) {
-                simpleClassList2.add(simpleClass);
-            }
-        }
-
-        // Initialise Image
-        Image image = new Image(new int[][] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } });
-        sqlDataClass.setImage(image);
-
-        // Save
-        factory.save(sqlDataClass);
-
-        setFixtureInitializationState(State.DONT_INITIALIZE, "in-memory");
-    }
-
-    /**
-     * The actual "tests". Unless the test is using the "in-memory" object store 
-     * the Isis framework is re-created, thus ensuring that no domain objects are
-     * left over from the previous "create" step, forcing the objects to be created
-     * via the object store.
-     * 
-     * Exercises the "restore data" portion of the object store.
-     * 
-     * Confirms that values and objects (single and collections) are loaded as expected.
-     * Especially, it confirms that dates, times, etc, do not suffer from differences in
-     * time zones between the database and the Isis framework.
-     */
-    @Test
-    public void testTestAll() throws Exception {
-        
-        testLoad();
-
-        setUpFactory();
-
-        testString();
-        setStringToDifferentValue();
-        testSimpleClassCollection1Lazy();
-
-        testMoney();
-        testColor();
-        testPassword();
-        testPercentage();
-        
-        testImage();
-        
-        testStandardValueTypesMaxima();
-        testStandardValueTypesMinima();
-
-        testSingleReferenceLazy();
-        testSimpleClassTwoReferenceLazy();
-
-        testSimpleClassCollection1();
-        testSimpleClassCollection2();
-
-        testSingleReferenceResolve();
-        testSimpleClassTwoReferenceResolve();
-        testSimpleClassTwo();
-        testUpdate1();
-        testUpdate2();
-        testUpdateCollectionIsDirty();
-        testFindByMatchString();
-        testFindByMatchEntity();
-
-        testApplibDate();
-        testSqlDate();
-        testTime();
-        testTimeStamp();
-        testDateTimezoneIssue();
-        testDateTime();
-        
-        // Test LIMIT statement
-        testLimitCount();
-
-        // Must be here so that the Isis framework is initialised for the next test package.
-        setFixtureInitializationState(State.INITIALIZE);
-    }
-
-    private void testLoad() throws Exception {
-        final List<SqlDataClass> dataClasses = factory.allDataClasses();
-        IsisContext.getTransactionManager().flushTransaction();
-        
-        assertEquals(1, dataClasses.size());
-        final SqlDataClass sqlDataClass = dataClasses.get(0);
-        getSqlIntegrationTestFixtures().setSqlDataClass(sqlDataClass);
-
-        setFixtureInitializationState(State.DONT_INITIALIZE);
-    }
-
-    private void testString() {
-        assertEquals("Test String", sqlDataClass.getString());
-    }
-
-    private void setStringToDifferentValue() {
-        sqlDataClass.setString("String 2");
-    }
-
-    private void testSimpleClassCollection1Lazy() {
-        final List<SimpleClass> collection = sqlDataClass.simpleClasses1;
-
-        assertEquals("collection size is not equal!", collection.size(), simpleClassList1.size());
-    }
-
-    /**
-     * Test {@link SqlDataClass} {@link Date} field.
-     * 
-     * @throws Exception
-     */
-    private void testApplibDate() {
-
-        LOG.info("Test: testDate() '2010-3-5' = 1267747200000");
-
-        // 2010-3-5 = 1267747200000
-        LOG.info( "applibDate.dateValue() as String: " + Data.applibDate);
-        LOG.info( "applibDate.dateValue() as Long: " + Data.applibDate.getMillisSinceEpoch());
-
-        // 2010-3-5 = 1267747200000
-        LOG.info( "sqlDataClass.getDate() as String: " + sqlDataClass.getDate());
-        LOG.info( "sqlDataClass.getDate().getTime() as Long: " + sqlDataClass.getDate().getMillisSinceEpoch());
-
-        if (!Data.applibDate.isEqualTo(sqlDataClass.getDate())) {
-            fail("Applib date: Test '2010-3-5', expected " + Data.applibDate.toString() + ", but got "
-                + sqlDataClass.getDate().toString() + ". Check log for more info.");
-        } else {
-            // LOG.log(Level.INFO,
-            // "SQL applib.value.date: test passed! Woohoo!");
-        }
-
-    }
-
-    /**
-     * Test {@link SqlDataClass} {@link java.sql.Date} field.
-     * 
-     * @throws Exception
-     */
-    private void testSqlDate() {
-
-        LOG.info( "Test: testSqlDate() '2011-4-8' == 1302220800000");
-
-        // 2011-4-8 = 1302220800000
-        LOG.info( "sqlDate.toString() as String:" + Data.sqlDate); // shows
-        // as
-        // 2011-04-07
-        LOG.info( "sqlDate.getTime() as Long:" + Data.sqlDate.getTime());
-
-        // 2011-4-8 = 1302220800000
-        LOG.info( "sqlDataClass.getSqlDate() as String:" + sqlDataClass.getSqlDate()); // shows
-                                                                                                 // as
-        // 2011-04-07
-        LOG.info( "sqlDataClass.getSqlDate().getTime() as Long:" + sqlDataClass.getSqlDate().getTime());
-
-        if (Data.sqlDate.compareTo(sqlDataClass.getSqlDate()) != 0) {
-            fail("SQL date: Test '2011-4-8', expected " + Data.sqlDate.toString() + ", but got "
-                + sqlDataClass.getSqlDate().toString() + ". Check log for more info.");
-        } else {
-            // LOG.log(Level.INFO, "SQL date: test passed! Woohoo!");
-        }
-
-    }/**/
-
-    private void testDateTimezoneIssue() {
-        /*
-         * At the moment, applib Date and java.sql.Date are restored from ValueSemanticsProviderAbstractTemporal with an
-         * explicit hourly offset that comes from the timezone. I.e. in South Africa, with TZ +2h00, they have an
-         * implicit time of 02h00 (2AM). This can potentially seriously screw up GMT-X dates, which, I suspect, will
-         * actually be set to the dat BEFORE.
-         * 
-         * This test is a simple test to confirm that date/time before and after checks work as expected.
-         */
-
-        DateTime dateTime = sqlDataClass.getDateTime(); // new DateTime(2010, 3, 5, 1, 23);
-        Date date = sqlDataClass.getDate(); // new Date(2010, 3, 5);
-
-        // java.sql.Date sqlDate = sqlDataClass.getSqlDate(); // "2010-03-05"
-        // assertTrue("dateTime's value (" + dateTime.dateValue() + ") should be after java.sql.date's (" + sqlDate +
-        // ")",
-        // dateTime.dateValue().after(sqlDate));
-
-        assertTrue("dateTime's value (" + dateTime.dateValue() + ") should be after date's (" + date + ")", dateTime
-            .dateValue().after(date.dateValue()));
-
-    }
-
-    /**
-     * Test {@link Money} type.
-     */
-    private void testMoney() {
-        assertEquals(Data.money, sqlDataClass.getMoney());
-    }
-
-    /**
-     * Test {@link DateTime} type.
-     */
-    private void testDateTime() {
-
-        LOG.info( "Test: testDateTime()");
-        LOG.info( "sqlDataClass.getDateTime() as String:" + sqlDataClass.getDateTime());
-        LOG.info( "dateTime.toString() as String:" + Data.dateTime);
-
-        LOG.info( "sqlDataClass.getDateTime().getTime() as Long:"
-            + sqlDataClass.getDateTime().millisSinceEpoch());
-        LOG.info( "dateTime.getTime() as Long:" + Data.dateTime.millisSinceEpoch());
-
-        if (!Data.dateTime.equals(sqlDataClass.getDateTime())) {
-            fail("DateTime " + Data.dateTime.toString() + " is not expected " + sqlDataClass.getDateTime().toString());
-        }
-    }
-
-    /**
-     * Test {@link TimeStamp} type.
-     */
-    private void testTimeStamp() {
-        assertTrue(
-            "TimeStamp " + sqlDataClass.getTimeStamp().toString() + " does not equal expected "
-                + Data.timeStamp.toString(), Data.timeStamp.isEqualTo(sqlDataClass.getTimeStamp()));
-    }
-
-    /**
-     * Test {@link Time} type.
-     */
-    /**/
-    private void testTime() {
-        assertNotNull("sqlDataClass is null", sqlDataClass);
-        assertNotNull("getTime() is null", sqlDataClass.getTime());
-        assertTrue("Time 14h56: expected " + Data.time.toString() + ", but got " + sqlDataClass.getTime().toString(),
-            Data.time.isEqualTo(sqlDataClass.getTime()));
-    }
-
-    /**
-     * Test {@link Color} type.
-     */
-    private void testColor() {
-        assertEquals(Data.color, sqlDataClass.getColor());
-    }
-
-    /**
-     * Test {@link Image} type.
-     */
-    private void testImage() {
-        Image image1 = new Image(new int[][] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } });
-        Image image2 = sqlDataClass.getImage();
-        // REVIEW: Only XML persistor fails here...
-        if (!persistenceMechanismIs("xml")) {
-            assertImagesEqual(image1, image2);
-        }
-    }
-
-    private void assertImagesEqual(Image image2, Image image3) {
-        assertEquals(image2.getHeight(), image3.getHeight());
-        assertEquals(image2.getWidth(), image3.getWidth());
-        boolean same = true;
-        int i = 0, j = 0;
-        int p1 = 0, p2 = 0;
-        String error = "";
-        int[][] i1 = image2.getImage(), i2 = image3.getImage();
-        for (i = 0; same && i < image2.getHeight(); i++) {
-            int[] r1 = i1[i], r2 = i2[i];
-            for (j = 0; same && j < image2.getWidth(); j++) {
-                p1 = r1[j];
-                p2 = r2[j];
-                if (p1 != p2) {
-                    same = false;
-                    error = "Images differ at i = " + i + ", j = " + j + ", " + p1 + " is not " + p2 + "!";
-                    break;
-                }
-            }
-        }
-        assertTrue(error, same);
-    }
-
-    /**
-     * Test {@link Password} type.
-     */
-    private void testPassword() {
-        assertEquals(Data.password, sqlDataClass.getPassword());
-    }
-
-    /**
-     * Test {@link Percentage} type.
-     */
-    private void testPercentage() {
-        assertEquals(Data.percentage, sqlDataClass.getPercentage());
-    }
-
-    private void testStandardValueTypesMaxima() {
-        final PrimitiveValuedEntity pveMax = sqlDataClass.getPrimitiveValuedEntityMax();
-
-        assertEquals(Data.shortMaxValue, pveMax.getShortProperty());
-        assertEquals(Data.intMaxValue, pveMax.getIntProperty());
-        assertEquals(Data.longMaxValue, pveMax.getLongProperty());
-        assertEquals(Data.doubleMaxValue, pveMax.getDoubleProperty(), 0.00001f); // fails
-        // in
-        assertEquals(Data.floatMaxValue, pveMax.getFloatProperty(), 0.00001f);
-    }
-
-    private void testStandardValueTypesMinima() {
-        final PrimitiveValuedEntity pveMin = sqlDataClass.getPrimitiveValuedEntityMin();
-
-        assertEquals(Data.shortMinValue, pveMin.getShortProperty());
-        assertEquals(Data.intMinValue, pveMin.getIntProperty());
-        assertEquals(Data.longMinValue, pveMin.getLongProperty());
-        assertEquals(Data.doubleMinValue, pveMin.getDoubleProperty(), 0.00001f); // fails
-        // in
-        // MySQL
-        // =
-        // infinity
-        assertEquals(Data.floatMinValue, pveMin.getFloatProperty(), 0.00001f);
-    }
-
-    /**
-     * Test {@link StringCollection} type.
-     */
-    /*
-     * public void testStringCollection(){ SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getPerson();
-     * List<String> collection = sqlDataClass.getStringCollection(); int i = 0; for (String string : collection) {
-     * assertEquals(SqlIntegrationTestCommon.stringList.get(i++), string); } }
-     */
-
-    private void testSingleReferenceLazy() {
-        final SimpleClassTwo a = sqlDataClass.getSimpleClassTwo();
-        if (!persistenceMechanismIs("in-memory")) {
-            assertEquals(null, a.text); // must check direct value, as
-            // framework can auto-resolve, if you use getText()
-        }
-    }
-
-    /**
-     * Test a collection of {@link SimpleClass} type.
-     */
-    private void testSimpleClassCollection1() {
-        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
-
-        assertEquals("collection size is not equal!", simpleClassList1.size(), collection.size());
-
-        int i = 0;
-        for (final SimpleClass simpleClass : simpleClassList1) {
-            assertEquals(simpleClass.getString(), collection.get(i++).getString());
-        }
-    }
-
-    /**
-     * Test another collection of {@link SimpleClass} type.
-     */
-    private void testSimpleClassCollection2() {
-        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses2();
-
-        assertEquals("collection size is not equal!", simpleClassList2.size(), collection.size());
-
-        int i = 0;
-        for (final SimpleClass simpleClass : simpleClassList2) {
-            assertEquals(simpleClass.getString(), collection.get(i++).getString());
-        }
-    }
-
-    private void testSimpleClassTwoReferenceLazy() {
-        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
-        if (getProperties().getProperty("isis.persistor") != "in-memory") {
-            for (final SimpleClass simpleClass : collection) {
-                final SimpleClassTwo a = simpleClass.getSimpleClassTwoA();
-                assertEquals(null, a.text); // must check direct value, as
-                                            // framework can auto-resolve, if
-                                            // you use getText()
-            }
-        }
-    }
-
-    private void testSingleReferenceResolve() {
-        final SimpleClassTwo a = sqlDataClass.getSimpleClassTwo();
-        factory.resolve(a);
-        assertEquals(simpleClassTwoA.getText(), a.getText());
-    }
-
-    private void testSimpleClassTwoReferenceResolve() {
-        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
-        for (final SimpleClass simpleClass : collection) {
-            final SimpleClassTwo a = simpleClass.getSimpleClassTwoA();
-            factory.resolve(a);
-            assertEquals(simpleClassTwoA.getText(), a.getText());
-            assertEquals(simpleClassTwoA.getIntValue(), a.getIntValue());
-            assertEquals(simpleClassTwoA.getBooleanValue(), a.getBooleanValue());
-        }
-    }
-
-    private void testSimpleClassTwo() {
-        final SqlDomainObjectRepository factory = getSqlIntegrationTestFixtures().getSqlDataClassFactory();
-        final List<SimpleClassTwo> classes = factory.allSimpleClassTwos();
-        assertEquals(2, classes.size());
-        for (final SimpleClassTwo simpleClass : classes) {
-            // assertEquals(simpleClassTwoA.getText(), simpleClass.getText());
-            assertTrue("AB".contains(simpleClass.getText()));
-        }
-    }
-
-    private void testUpdate1() {
-        final List<SimpleClassTwo> classes = factory.allSimpleClassTwos();
-        assertEquals(2, classes.size());
-
-        final SimpleClassTwo simpleClass = classes.get(0);
-        simpleClass.setText("XXX");
-        simpleClass.setBooleanValue(false);
-        simpleClassTwoA.setBooleanValue(false);
-
-        setFixtureInitializationStateIfNot(State.INITIALIZE, "in-memory");
-    }
-
-    private void testUpdate2() {
-        final List<SimpleClassTwo> classes = factory.allSimpleClassTwos();
-        assertEquals(2, classes.size());
-
-        final SimpleClassTwo simpleClass = classes.get(0);
-        assertEquals("XXX", simpleClass.getText());
-        assertEquals(simpleClassTwoA.getBooleanValue(), simpleClass.getBooleanValue());
-
-        setFixtureInitializationState(State.DONT_INITIALIZE);
-    }
-
-    private void testUpdateCollectionIsDirty() {
-
-        final List<SqlDataClass> sqlDataClasses = factory.allDataClasses();
-        final SqlDataClass sqlDataClass = sqlDataClasses.get(0);
-
-        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
-        final SimpleClass simpleClass1 = collection.get(0);
-
-        collection.remove(simpleClass1);
-
-        // REVIEW: I'm very doubtful about this...
-        // what exactly is meant by updating an internal collection?
-        if (!persistenceMechanismIs("xml")) {
-            factory.update(collection);
-        }
-
-        factory.update(sqlDataClass);
-    }
-    
-    private void testLimitCount() {
-        final List<SimpleClass> subset = factory.someSimpleClasses(0, 2);
-        assertEquals(2, subset.size());
-        // TODO: This test does not confirm that the *right* 2 were returned. 
-    }
-
-    private void testFindByMatchString() {
-        final SimpleClass simpleClassMatch = new SimpleClass();
-        simpleClassMatch.setString(Data.stringList1.get(1));
-
-        final List<SimpleClass> classes = factory.allSimpleClassesThatMatch(simpleClassMatch);
-        assertEquals(1, classes.size());
-
-    }
-
-    private void testFindByMatchEntity() {
-        final List<SimpleClassTwo> classTwos = factory.allSimpleClassTwos();
-
-        final SimpleClass simpleClassMatch = new SimpleClass();
-        simpleClassMatch.setSimpleClassTwoA(classTwos.get(0));
-
-        final List<SimpleClass> classes = factory.allSimpleClassesThatMatch(simpleClassMatch);
-
-        // TODO: Why is this hack required?
-        if (!getProperties().getProperty("isis.persistor").equals("in-memory")) {
-            assertEquals(Data.stringList1.size(), classes.size());
-        } else {
-            assertEquals(Data.stringList1.size() + 2, classes.size());
-        }
-    }
-}