incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1378484 [2/3] - in /incubator/isis/trunk: examples/quickstart/dom/src/main/java/dom/todo/ framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/ framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel...
Date Wed, 29 Aug 2012 09:10:21 GMT
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/TypicalLengthFacetUsingParser.java Wed Aug 29 09:10:16 2012
@@ -31,7 +31,7 @@ public class TypicalLengthFacetUsingPars
     private final ServicesInjector dependencyInjector;
 
     public TypicalLengthFacetUsingParser(final Parser<?> parser, final FacetHolder holder, final ServicesInjector dependencyInjector) {
-        super(TypicalLengthFacet.class, holder, false);
+        super(TypicalLengthFacet.class, holder, Derivation.NOT_DERIVED);
         this.parser = parser;
         this.dependencyInjector = dependencyInjector;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/value/ValueSemanticsProviderAndFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -54,6 +54,24 @@ public abstract class ValueSemanticsProv
     private final boolean immutable;
     private final boolean equalByContent;
     private final T defaultValue;
+    
+    public enum Immutability {
+        IMMUTABLE,
+        NOT_IMMUTABLE;
+
+        public static Immutability of(boolean immutable) {
+            return immutable? IMMUTABLE: NOT_IMMUTABLE;
+        }
+    }
+
+    public enum EqualByContent {
+        HONOURED,
+        NOT_HONOURED;
+
+        public static EqualByContent of(boolean equalByContent) {
+            return equalByContent? HONOURED: NOT_HONOURED;
+        }
+    }
 
     /**
      * Lazily looked up per {@link #getSpecification()}.
@@ -63,13 +81,13 @@ public abstract class ValueSemanticsProv
     private final IsisConfiguration configuration;
     private final ValueSemanticsProviderContext context;
 
-    public ValueSemanticsProviderAndFacetAbstract(final Class<? extends Facet> adapterFacetType, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final boolean immutable, final boolean equalByContent, final T defaultValue, final IsisConfiguration configuration,
+    public ValueSemanticsProviderAndFacetAbstract(final Class<? extends Facet> adapterFacetType, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final Immutability immutability, final EqualByContent equalByContent, final T defaultValue, final IsisConfiguration configuration,
             final ValueSemanticsProviderContext context) {
-        super(adapterFacetType, holder, false);
+        super(adapterFacetType, holder, Derivation.NOT_DERIVED);
         this.adaptedClass = adaptedClass;
         this.typicalLength = typicalLength;
-        this.immutable = immutable;
-        this.equalByContent = equalByContent;
+        this.immutable = (immutability == Immutability.IMMUTABLE);
+        this.equalByContent = (equalByContent == EqualByContent.HONOURED);
         this.defaultValue = defaultValue;
 
         this.configuration = configuration;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/choices/ActionParameterChoicesFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -37,7 +37,7 @@ public abstract class ActionParameterCho
     private final AdapterManager adapterManager;
 
     public ActionParameterChoicesFacetAbstract(final FacetHolder holder, final SpecificationLoader specificationLookup, final AdapterManager adapterManager) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
         this.specificationLookup = specificationLookup;
         this.adapterManager = adapterManager;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/ActionParameterDefaultsFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,7 +31,7 @@ public abstract class ActionParameterDef
     }
 
     public ActionParameterDefaultsFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/defaults/fromtype/ActionParameterDefaultFacetDerivedFromTypeFacets.java Wed Aug 29 09:10:16 2012
@@ -29,7 +29,7 @@ public class ActionParameterDefaultFacet
     private final DefaultedFacet[] defaultedFacets;
 
     public ActionParameterDefaultFacetDerivedFromTypeFacets(final DefaultedFacet[] defaultedFacets, final FacetHolder holder) {
-        super(holder, true);
+        super(holder, Derivation.DERIVED);
         this.defaultedFacets = defaultedFacets;
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/perspec/MustSatisfySpecificationOnParameterFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/perspec/MustSatisfySpecificationOnParameterFacet.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/perspec/MustSatisfySpecificationOnParameterFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/param/validate/perspec/MustSatisfySpecificationOnParameterFacet.java Wed Aug 29 09:10:16 2012
@@ -41,7 +41,7 @@ public class MustSatisfySpecificationOnP
     private final List<Specification> specifications;
 
     public MustSatisfySpecificationOnParameterFacet(final List<Specification> specifications, final FacetHolder holder) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
         this.specifications = specifications;
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/PropertyChoicesFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/PropertyChoicesFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/PropertyChoicesFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/choices/PropertyChoicesFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -34,7 +34,7 @@ public abstract class PropertyChoicesFac
     private final SpecificationLoader specificationLookup;
 
     public PropertyChoicesFacetAbstract(final FacetHolder holder, final SpecificationLoader specificationLookup) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
         this.specificationLookup = specificationLookup;
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/PropertyDefaultFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/PropertyDefaultFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/PropertyDefaultFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/PropertyDefaultFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,7 +31,7 @@ public abstract class PropertyDefaultFac
     }
 
     public PropertyDefaultFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultFacetDerivedFromDefaultedFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultFacetDerivedFromDefaultedFacet.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultFacetDerivedFromDefaultedFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/defaults/fromtype/PropertyDefaultFacetDerivedFromDefaultedFacet.java Wed Aug 29 09:10:16 2012
@@ -32,7 +32,7 @@ public class PropertyDefaultFacetDerived
     private final AdapterManager adapterManager;
 
     public PropertyDefaultFacetDerivedFromDefaultedFacet(final DefaultedFacet typeFacet, final FacetHolder holder, final AdapterManager adapterManager) {
-        super(PropertyDefaultFacet.class, holder, false);
+        super(PropertyDefaultFacet.class, holder, Derivation.NOT_DERIVED);
         this.typeFacet = typeFacet;
         this.adapterManager = adapterManager;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/modify/PropertyInitializationFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/modify/PropertyInitializationFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/modify/PropertyInitializationFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/modify/PropertyInitializationFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,6 @@ public abstract class PropertyInitializa
     }
 
     public PropertyInitializationFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
     }
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetAbstract.java Wed Aug 29 09:10:16 2012
@@ -33,7 +33,7 @@ public abstract class PropertyValidateFa
     }
 
     public PropertyValidateFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetDefault.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetDefault.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/PropertyValidateFacetDefault.java Wed Aug 29 09:10:16 2012
@@ -37,7 +37,7 @@ public class PropertyValidateFacetDefaul
     }
 
     public PropertyValidateFacetDefault(final FacetHolder holder) {
-        super(PropertyValidateFacet.class, holder, false);
+        super(PropertyValidateFacet.class, holder, Derivation.NOT_DERIVED);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/perspec/MustSatisfySpecificationOnPropertyFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/perspec/MustSatisfySpecificationOnPropertyFacet.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/perspec/MustSatisfySpecificationOnPropertyFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/validate/perspec/MustSatisfySpecificationOnPropertyFacet.java Wed Aug 29 09:10:16 2012
@@ -41,7 +41,7 @@ public class MustSatisfySpecificationOnP
     private final List<Specification> specifications;
 
     public MustSatisfySpecificationOnPropertyFacet(final List<Specification> specifications, final FacetHolder holder) {
-        super(type(), holder, false);
+        super(type(), holder, Derivation.NOT_DERIVED);
         this.specifications = specifications;
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/DateAndTimeValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/DateAndTimeValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/DateAndTimeValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/DateAndTimeValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -48,8 +48,8 @@ public abstract class DateAndTimeValueSe
     private static final int TYPICAL_LENGTH = 18;
 
     @SuppressWarnings("unchecked")
-    public DateAndTimeValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final boolean immutable, final boolean equalByContent, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super("datetime", holder, adaptedClass, TYPICAL_LENGTH, immutable, equalByContent, (T) DEFAULT_VALUE, configuration, context);
+    public DateAndTimeValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final Immutability immutability, final EqualByContent equalByContent, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        super("datetime", holder, adaptedClass, TYPICAL_LENGTH, immutability, equalByContent, (T) DEFAULT_VALUE, configuration, context);
 
         final String formatRequired = configuration.getString(ConfigurationConstants.ROOT + "value.format.datetime");
         if (formatRequired == null) {
@@ -59,14 +59,6 @@ public abstract class DateAndTimeValueSe
         }
     }
 
-    // //////////////////////////////////////////////////////////////////
-    // DateValueFacet
-    // //////////////////////////////////////////////////////////////////
-
-    @Override
-    public int getLevel() {
-        return DATE_AND_TIME;
-    }
 
     // //////////////////////////////////////////////////////////////////
     // temporal-specific stuff

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTemporal.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTemporal.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTemporal.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTemporal.java Wed Aug 29 09:10:16 2012
@@ -102,18 +102,18 @@ public abstract class ValueSemanticsProv
     /**
      * Uses {@link #type()} as the facet type.
      */
-    public ValueSemanticsProviderAbstractTemporal(final String propertyName, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final boolean immutable, final boolean equalByContent, final T defaultValue, final IsisConfiguration configuration,
+    public ValueSemanticsProviderAbstractTemporal(final String propertyName, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final Immutability immutability, final EqualByContent equalByContent, final T defaultValue, final IsisConfiguration configuration,
             final ValueSemanticsProviderContext context) {
-        this(propertyName, type(), holder, adaptedClass, typicalLength, immutable, equalByContent, defaultValue, configuration, context);
+        this(propertyName, type(), holder, adaptedClass, typicalLength, immutability, equalByContent, defaultValue, configuration, context);
     }
 
     /**
      * Allows the specific facet subclass to be specified (rather than use
      * {@link #type()}.
      */
-    public ValueSemanticsProviderAbstractTemporal(final String propertyType, final Class<? extends Facet> facetType, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final boolean immutable, final boolean equalByContent, final T defaultValue,
+    public ValueSemanticsProviderAbstractTemporal(final String propertyType, final Class<? extends Facet> facetType, final FacetHolder holder, final Class<T> adaptedClass, final int typicalLength, final Immutability immutability, final EqualByContent equalByContent, final T defaultValue,
             final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(facetType, holder, adaptedClass, typicalLength, immutable, equalByContent, defaultValue, configuration, context);
+        super(facetType, holder, adaptedClass, typicalLength, immutability, equalByContent, defaultValue, configuration, context);
         configureFormats();
 
         this.propertyType = propertyType;
@@ -333,11 +333,6 @@ public abstract class ValueSemanticsProv
         return getAdapterManager().adapterFor(setDate(date));
     }
 
-    /**
-     * For subclasses to implement.
-     */
-    @Override
-    public abstract int getLevel();
 
     // //////////////////////////////////////////////////////////////////
     // temporal-specific stuff

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bigdecimal/BigDecimalValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bigdecimal/BigDecimalValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bigdecimal/BigDecimalValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bigdecimal/BigDecimalValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -42,8 +42,6 @@ public class BigDecimalValueSemanticsPro
     }
 
     private static final int TYPICAL_LENGTH = 19;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
     private static final BigDecimal DEFAULT_VALUE = new BigDecimal(0);
 
     private final NumberFormat format;
@@ -57,7 +55,7 @@ public class BigDecimalValueSemanticsPro
     }
 
     public BigDecimalValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, BigDecimal.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, BigDecimal.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.decimal");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/biginteger/BigIntegerValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/biginteger/BigIntegerValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/biginteger/BigIntegerValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/biginteger/BigIntegerValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -41,8 +41,6 @@ public class BigIntegerValueSemanticsPro
         return BigIntegerValueFacet.class;
     }
 
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
     private static final BigInteger DEFAULT_VALUE = BigInteger.valueOf(0);
 
     private final NumberFormat format;
@@ -57,7 +55,7 @@ public class BigIntegerValueSemanticsPro
 
     public BigIntegerValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
 
-        super(type(), holder, BigInteger.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, BigInteger.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.int");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/booleans/BooleanValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/booleans/BooleanValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/booleans/BooleanValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/booleans/BooleanValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -37,11 +37,9 @@ public abstract class BooleanValueSemant
     }
 
     private static final int TYPICAL_LENGTH = 5;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     public BooleanValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Boolean> adaptedClass, final Boolean defaultValue, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, defaultValue, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, defaultValue, configuration, context);
     }
 
     // //////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bytes/ByteValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bytes/ByteValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bytes/ByteValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/bytes/ByteValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public abstract class ByteValueSemanticsProviderAbstract extends ValueSemanticsProviderAndFacetAbstract<Byte> implements ByteValueFacet {
 
@@ -39,15 +41,12 @@ public abstract class ByteValueSemantics
     }
 
     private static final Byte DEFAULT_VALUE = Byte.valueOf((byte) 0);
-
     private static final int TYPICAL_LENGTH = 4;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     private final NumberFormat format;
 
     public ByteValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Byte> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.byte");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/chars/CharValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/chars/CharValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/chars/CharValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/chars/CharValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -37,12 +37,10 @@ public abstract class CharValueSemantics
     }
 
     private static final Character DEFAULT_VALUE = Character.valueOf((char) 0);
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
     private static final int TYPICAL_LENGTH = 1;
 
     public CharValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Character> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
     }
 
     // //////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/color/ColorValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/color/ColorValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/color/ColorValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/color/ColorValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -32,6 +32,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public class ColorValueSemanticsProvider extends ValueSemanticsProviderAndFacetAbstract<Color> implements ColorValueFacet {
 
@@ -41,8 +43,6 @@ public class ColorValueSemanticsProvider
 
     private static final Color DEFAULT_VALUE = Color.BLACK;
     private static final int TYPICAL_LENGTH = 4;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = false;
 
     /**
      * Required because implementation of {@link Parser} and
@@ -53,7 +53,7 @@ public class ColorValueSemanticsProvider
     }
 
     public ColorValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, Color.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, Color.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.NOT_HONOURED, DEFAULT_VALUE, configuration, context);
     }
 
     // //////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueFacet.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueFacet.java Wed Aug 29 09:10:16 2012
@@ -25,19 +25,9 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facetapi.Facet;
 
 public interface DateValueFacet extends Facet {
-    public static final int DATE = 0x01;
-    public static final int TIME = 0x10;
-    public static final int PRECISION = 0x100;
-
-    public static final int DATE_ONLY = DATE;
-    public static final int TIME_ONLY = TIME;
-    public static final int DATE_AND_TIME = DATE + TIME;
-    public static final int TIMESTAMP = DATE + TIME + PRECISION;
 
     Date dateValue(ObjectAdapter object);
 
     ObjectAdapter createValue(Date date);
 
-    int getLevel();
-
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -26,27 +26,25 @@ import org.apache.isis.applib.adapters.P
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public class DateValueSemanticsProvider extends DateValueSemanticsProviderAbstract<org.apache.isis.applib.value.Date> {
 
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
-    private static final org.apache.isis.applib.value.Date DEFAULT_VALUE = null; // new
-                                                                                 // org.apache.isis.applib.value.Date(2007,1,1);
+    // no default
+    private static final org.apache.isis.applib.value.Date DEFAULT_VALUE = null; 
 
-    // // no default
 
     /**
      * Required because implementation of {@link Parser} and
      * {@link EncoderDecoder}.
      */
-    @SuppressWarnings("NP_NULL_PARAM_DEREF_NONVIRTUAL")
     public DateValueSemanticsProvider() {
         this(null, null, null);
     }
 
     public DateValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(holder, org.apache.isis.applib.value.Date.class, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(holder, org.apache.isis.applib.value.Date.class, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, DEFAULT_VALUE, configuration, context);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -45,8 +45,8 @@ public abstract class DateValueSemantics
         formats.put("medium", DateFormat.getDateInstance(DateFormat.MEDIUM));
     }
 
-    public DateValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final boolean immutable, final boolean equalByContent, final T defaultValue, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super("date", holder, adaptedClass, 12, immutable, equalByContent, defaultValue, configuration, context);
+    public DateValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final Immutability immutability, final EqualByContent equalByContent, final T defaultValue, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        super("date", holder, adaptedClass, 12, immutability, equalByContent, defaultValue, configuration, context);
 
         final String formatRequired = configuration.getString(ConfigurationConstants.ROOT + "value.format.date");
         if (formatRequired == null) {
@@ -60,11 +60,6 @@ public abstract class DateValueSemantics
     // DateValueFacet
     // //////////////////////////////////////////////////////////////////
 
-    @Override
-    public int getLevel() {
-        return DATE_ONLY;
-    }
-
     // //////////////////////////////////////////////////////////////////
     // temporal-specific stuff
     // //////////////////////////////////////////////////////////////////

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueFacet.java (from r1378001, incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/MarkerFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueFacet.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueFacet.java&p1=incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/MarkerFacetAbstract.java&r1=1378001&r2=1378484&rev=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/MarkerFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueFacet.java Wed Aug 29 09:10:16 2012
@@ -17,16 +17,17 @@
  *  under the License.
  */
 
-package org.apache.isis.core.metamodel.facets;
+package org.apache.isis.core.progmodel.facets.value.datejodalocal;
 
+import org.joda.time.LocalDate;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 
-public abstract class MarkerFacetAbstract extends FacetAbstract implements MarkerFacet {
+public interface JodaLocalDateValueFacet extends Facet {
+
+    LocalDate dateValue(ObjectAdapter object);
 
-    public MarkerFacetAbstract(final Class<? extends Facet> facetType, final FacetHolder holder) {
-        super(facetType, holder, false);
-    }
+    ObjectAdapter createValue(LocalDate date);
 
 }

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProvider.java (from r1378001, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProvider.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProvider.java&p1=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java&r1=1378001&r2=1378484&rev=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -17,55 +17,56 @@
  *  under the License.
  */
 
-package org.apache.isis.core.progmodel.facets.value.datetime;
+package org.apache.isis.core.progmodel.facets.value.datejodalocal;
 
 import java.util.Date;
 
+import org.joda.time.LocalDate;
+
 import org.apache.isis.applib.adapters.EncoderDecoder;
 import org.apache.isis.applib.adapters.Parser;
-import org.apache.isis.applib.value.DateTime;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
-import org.apache.isis.core.progmodel.facets.value.DateAndTimeValueSemanticsProviderAbstract;
 
-public class DateTimeValueSemanticsProvider extends DateAndTimeValueSemanticsProviderAbstract<DateTime> {
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
+public class JodaLocalDateValueSemanticsProvider extends JodaLocalDateValueSemanticsProviderAbstract<LocalDate> {
+
+    // no default
+    private static final LocalDate DEFAULT_VALUE = null;
+
 
     /**
      * Required because implementation of {@link Parser} and
      * {@link EncoderDecoder}.
      */
-    public DateTimeValueSemanticsProvider() {
+    public JodaLocalDateValueSemanticsProvider() {
         this(null, null, null);
     }
 
-    public DateTimeValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(holder, DateTime.class, IMMUTABLE, EQUAL_BY_CONTENT, configuration, context);
+    public JodaLocalDateValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        super(holder, LocalDate.class, DEFAULT_VALUE, configuration, context);
     }
 
     @Override
-    protected Date dateValue(final Object value) {
-        final DateTime date = (DateTime) value;
-        return date == null ? null : date.dateValue();
+    protected LocalDate add(final LocalDate original, final int years, final int months, final int days, final int hours, final int minutes) {
+        if(hours != 0 || minutes != 0) {
+            throw new IllegalArgumentException("cannot add non-zero hours or minutes to a LocalDate");
+        }
+        return original.plusYears(years).plusMonths(months).plusDays(days);
     }
 
     @Override
-    protected DateTime add(final DateTime original, final int years, final int months, final int days, final int hours, final int minutes) {
-        DateTime date = original;
-        date = date.add(years, months, days, hours, minutes);
-        return date;
+    protected LocalDate now() {
+        return new LocalDate();
     }
 
     @Override
-    protected DateTime now() {
-        return new DateTime();
+    protected Date dateValue(final Object value) {
+        return ((LocalDate) value).toDateTimeAtCurrentTime().toDate();
     }
 
     @Override
-    protected DateTime setDate(final Date date) {
-        return new DateTime(date);
+    protected LocalDate setDate(final Date date) {
+        return new LocalDate(date.getTime());
     }
-
 }

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProviderAbstract.java (from r1378001, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProviderAbstract.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProviderAbstract.java&p1=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java&r1=1378001&r2=1378484&rev=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/date/DateValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.core.progmodel.facets.value.date;
+package org.apache.isis.core.progmodel.facets.value.datejodalocal;
 
 import java.text.DateFormat;
 import java.util.ArrayList;
@@ -35,7 +35,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
 import org.apache.isis.core.progmodel.facets.value.ValueSemanticsProviderAbstractTemporal;
 
-public abstract class DateValueSemanticsProviderAbstract<T> extends ValueSemanticsProviderAbstractTemporal<T> {
+public abstract class JodaLocalDateValueSemanticsProviderAbstract<T> extends ValueSemanticsProviderAbstractTemporal<T> {
 
     private static Map<String, DateFormat> formats = Maps.newHashMap();
 
@@ -45,8 +45,8 @@ public abstract class DateValueSemantics
         formats.put("medium", DateFormat.getDateInstance(DateFormat.MEDIUM));
     }
 
-    public DateValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final boolean immutable, final boolean equalByContent, final T defaultValue, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super("date", holder, adaptedClass, 12, immutable, equalByContent, defaultValue, configuration, context);
+    public JodaLocalDateValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final T defaultValue, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
+        super("date", holder, adaptedClass, 12, Immutability.IMMUTABLE, EqualByContent.HONOURED, defaultValue, configuration, context);
 
         final String formatRequired = configuration.getString(ConfigurationConstants.ROOT + "value.format.date");
         if (formatRequired == null) {
@@ -56,14 +56,6 @@ public abstract class DateValueSemantics
         }
     }
 
-    // //////////////////////////////////////////////////////////////////
-    // DateValueFacet
-    // //////////////////////////////////////////////////////////////////
-
-    @Override
-    public int getLevel() {
-        return DATE_ONLY;
-    }
 
     // //////////////////////////////////////////////////////////////////
     // temporal-specific stuff

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueTypeFacetFactory.java (from r1378001, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueTypeFacetFactory.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueTypeFacetFactory.java&p1=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java&r1=1378001&r2=1378484&rev=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datejodalocal/JodaLocalDateValueTypeFacetFactory.java Wed Aug 29 09:10:16 2012
@@ -17,20 +17,18 @@
  *  under the License.
  */
 
-package org.apache.isis.core.progmodel.facets.value.datesql;
+package org.apache.isis.core.progmodel.facets.value.datejodalocal;
 
-import java.sql.Date;
+import org.joda.time.LocalDate;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueUsingValueSemanticsProviderFacetFactory;
-import org.apache.isis.core.progmodel.facets.value.date.DateValueFacet;
 
-public class JavaSqlDateValueTypeFacetFactory extends ValueUsingValueSemanticsProviderFacetFactory<Date> {
+public class JodaLocalDateValueTypeFacetFactory extends ValueUsingValueSemanticsProviderFacetFactory<LocalDate> {
 
-    public JavaSqlDateValueTypeFacetFactory() {
-        super(DateValueFacet.class); // as per inherited
-                                     // TimeValueSemanticsProvider#facetType
-                                     // (inherited)
+    public JodaLocalDateValueTypeFacetFactory() {
+     // as per inherited DateTimeValueSemanticsProvider#facetType
+        super(JodaLocalDateValueFacet.class); 
     }
 
     @Override
@@ -38,10 +36,10 @@ public class JavaSqlDateValueTypeFacetFa
         final Class<?> type = processClassContext.getCls();
         final FacetHolder holder = processClassContext.getFacetHolder();
 
-        if (type != Date.class) {
+        if (type != LocalDate.class) {
             return;
         }
-        addFacets(new JavaSqlDateValueSemanticsProvider(holder, getConfiguration(), getContext()));
+        addFacets(new JodaLocalDateValueSemanticsProvider(holder, getConfiguration(), getContext()));
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -40,8 +40,6 @@ import org.apache.isis.core.progmodel.fa
  */
 public class JavaSqlDateValueSemanticsProvider extends DateValueSemanticsProviderAbstract<Date> {
 
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
     private static final Date DEFAULT_VALUE = null; // no default
 
     /**
@@ -53,7 +51,7 @@ public class JavaSqlDateValueSemanticsPr
     }
 
     public JavaSqlDateValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(holder, Date.class, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(holder, Date.class, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, DEFAULT_VALUE, configuration, context);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datesql/JavaSqlDateValueTypeFacetFactory.java Wed Aug 29 09:10:16 2012
@@ -28,9 +28,8 @@ import org.apache.isis.core.progmodel.fa
 public class JavaSqlDateValueTypeFacetFactory extends ValueUsingValueSemanticsProviderFacetFactory<Date> {
 
     public JavaSqlDateValueTypeFacetFactory() {
-        super(DateValueFacet.class); // as per inherited
-                                     // TimeValueSemanticsProvider#facetType
-                                     // (inherited)
+        // as per inherited TimeValueSemanticsProvider#facetType 
+        super(DateValueFacet.class); 
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetime/DateTimeValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -27,11 +27,11 @@ import org.apache.isis.applib.value.Date
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 import org.apache.isis.core.progmodel.facets.value.DateAndTimeValueSemanticsProviderAbstract;
 
 public class DateTimeValueSemanticsProvider extends DateAndTimeValueSemanticsProviderAbstract<DateTime> {
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
 
     /**
      * Required because implementation of {@link Parser} and
@@ -42,7 +42,7 @@ public class DateTimeValueSemanticsProvi
     }
 
     public DateTimeValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(holder, DateTime.class, IMMUTABLE, EQUAL_BY_CONTENT, configuration, context);
+        super(holder, DateTime.class, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, configuration, context);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/dateutil/JavaUtilDateValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/dateutil/JavaUtilDateValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/dateutil/JavaUtilDateValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/dateutil/JavaUtilDateValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -41,9 +41,6 @@ import org.apache.isis.core.progmodel.fa
  */
 public class JavaUtilDateValueSemanticsProvider extends DateAndTimeValueSemanticsProviderAbstract<java.util.Date> {
 
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
-
     /**
      * Required because implementation of {@link Parser} and
      * {@link EncoderDecoder}.
@@ -53,7 +50,7 @@ public class JavaUtilDateValueSemanticsP
     }
 
     public JavaUtilDateValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(holder, Date.class, IMMUTABLE, EQUAL_BY_CONTENT, configuration, context);
+        super(holder, Date.class, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, configuration, context);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/floats/FloatValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/floats/FloatValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/floats/FloatValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/floats/FloatValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public class FloatValueSemanticsProviderAbstract extends ValueSemanticsProviderAndFacetAbstract<Float> implements FloatingPointValueFacet {
 
@@ -40,13 +42,11 @@ public class FloatValueSemanticsProvider
 
     private static final Float DEFAULT_VALUE = new Float(0.0f);
     private static final int TYPICAL_LENGTH = 12;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     private final NumberFormat format;
 
     public FloatValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Float> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.float");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/image/ImageValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/image/ImageValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/image/ImageValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/image/ImageValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -38,10 +38,8 @@ import org.apache.isis.core.progmodel.fa
 
 public abstract class ImageValueSemanticsProviderAbstract<T> extends ValueSemanticsProviderAndFacetAbstract<T> implements ImageValueFacet {
 
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
-    private static final Object DEFAULT_VALUE = null; // no default
     private static final int TYPICAL_LENGTH = 18;
+    private static final Object DEFAULT_VALUE = null; // no default
 
     private static final char[] BASE_64_CHARS = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
             'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', };
@@ -61,7 +59,7 @@ public abstract class ImageValueSemantic
 
     @SuppressWarnings("unchecked")
     public ImageValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(ImageValueFacet.class, holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, (T) DEFAULT_VALUE, configuration, context);
+        super(ImageValueFacet.class, holder, adaptedClass, TYPICAL_LENGTH, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, (T) DEFAULT_VALUE, configuration, context);
     }
 
     /**

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/integer/IntValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/integer/IntValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/integer/IntValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/integer/IntValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public abstract class IntValueSemanticsProviderAbstract extends ValueSemanticsProviderAndFacetAbstract<Integer> implements IntegerValueFacet {
 
@@ -40,13 +42,11 @@ public abstract class IntValueSemanticsP
 
     private static final Integer DEFAULT_VALUE = Integer.valueOf(0);
     private static final int TYPICAL_LENGTH = 9;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     private final NumberFormat format;
 
     public IntValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Integer> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.int");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/DoubleValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/DoubleValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/DoubleValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/DoubleValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public abstract class DoubleValueSemanticsProviderAbstract extends ValueSemanticsProviderAndFacetAbstract<Double> implements DoubleFloatingPointValueFacet {
 
@@ -40,13 +42,11 @@ public abstract class DoubleValueSemanti
 
     private static final Double DEFAULT_VALUE = new Double(0.0d);
     private static final int TYPICAL_LENGTH = 22;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     private final NumberFormat format;
 
     public DoubleValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Double> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.double");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/LongValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/LongValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/LongValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/LongValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public abstract class LongValueSemanticsProviderAbstract extends ValueSemanticsProviderAndFacetAbstract<Long> implements LongValueFacet {
 
@@ -40,13 +42,11 @@ public abstract class LongValueSemantics
 
     private static final Long DEFAULT_VALUE = Long.valueOf(0L);
     private static final int TYPICAL_LENGTH = 18;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     private final NumberFormat format;
 
     public LongValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Long> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.long");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/money/MoneyValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/money/MoneyValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/money/MoneyValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/money/MoneyValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -37,6 +37,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.properties.defaults.PropertyDefaultFacet;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public class MoneyValueSemanticsProvider extends ValueSemanticsProviderAndFacetAbstract<Money> implements MoneyValueFacet {
 
@@ -48,8 +50,6 @@ public class MoneyValueSemanticsProvider
     private static final NumberFormat DEFAULT_CURRENCY_FORMAT;
     private static final String LOCAL_CURRENCY_CODE;
     private static final int TYPICAL_LENGTH = 18;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
     private static final Money DEFAULT_VALUE = null; // no default
 
     private final String defaultCurrencyCode;
@@ -83,7 +83,7 @@ public class MoneyValueSemanticsProvider
     }
 
     public MoneyValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, Money.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, Money.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
 
         final String property = ConfigurationConstants.ROOT + "value.money.currency";
         defaultCurrencyCode = configuration.getString(property, LOCAL_CURRENCY_CODE);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/password/PasswordValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/password/PasswordValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/password/PasswordValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/password/PasswordValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -29,6 +29,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public class PasswordValueSemanticsProvider extends ValueSemanticsProviderAndFacetAbstract<Password> implements
     PasswordValueFacet {
@@ -39,8 +41,6 @@ public class PasswordValueSemanticsProvi
 
     private static final Password DEFAULT_VALUE = null; // no default
     private static final int TYPICAL_LENGTH = 12;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     /**
      * Required because implementation of {@link Parser} and {@link EncoderDecoder}.
@@ -51,7 +51,7 @@ public class PasswordValueSemanticsProvi
 
     public PasswordValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration,
         final ValueSemanticsProviderContext context) {
-        super(type(), holder, Password.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE,
+        super(type(), holder, Password.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE,
             configuration, context);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/percentage/PercentageValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/percentage/PercentageValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/percentage/PercentageValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/percentage/PercentageValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -44,8 +44,6 @@ public class PercentageValueSemanticsPro
 
     private static final Percentage DEFAULT_VALUE = new Percentage(0.0f);
     private static final int TYPICAL_LENGTH = 12;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     public static Class<? extends Facet> type() {
         return FloatingPointValueFacet.class;
@@ -62,7 +60,7 @@ public class PercentageValueSemanticsPro
     }
 
     public PercentageValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, Percentage.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, Percentage.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
 
         final String formatRequired = configuration.getString(ConfigurationConstants.ROOT + "value.format.percentage");
         if (formatRequired == null) {

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/shortint/ShortValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/shortint/ShortValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/shortint/ShortValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/shortint/ShortValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -40,13 +40,11 @@ public class ShortValueSemanticsProvider
 
     private static final Short DEFAULT_VALUE = Short.valueOf((short) 0);
     private static final int TYPICAL_LENGTH = 6;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
 
     private final NumberFormat format;
 
     public ShortValueSemanticsProviderAbstract(final FacetHolder holder, final Class<Short> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, adaptedClass, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
         format = determineNumberFormat("value.format.short");
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/string/StringValueSemanticsProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/string/StringValueSemanticsProvider.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/string/StringValueSemanticsProvider.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/string/StringValueSemanticsProvider.java Wed Aug 29 09:10:16 2012
@@ -28,6 +28,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 
 public class StringValueSemanticsProvider extends ValueSemanticsProviderAndFacetAbstract<String> implements StringValueFacet {
 
@@ -36,8 +38,6 @@ public class StringValueSemanticsProvide
     }
 
     private static final int TYPICAL_LENGTH = 25;
-    private static final boolean IMMUTABLE = true;
-    private static final boolean EQUAL_BY_CONTENT = true;
     private static final String DEFAULT_VALUE = null; // no default
 
     /**
@@ -49,7 +49,7 @@ public class StringValueSemanticsProvide
     }
 
     public StringValueSemanticsProvider(final FacetHolder holder, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super(type(), holder, String.class, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, DEFAULT_VALUE, configuration, context);
+        super(type(), holder, String.class, TYPICAL_LENGTH, Immutability.IMMUTABLE, EqualByContent.HONOURED, DEFAULT_VALUE, configuration, context);
     }
 
     // //////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/time/TimeValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/time/TimeValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/time/TimeValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/time/TimeValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -38,9 +38,6 @@ public abstract class TimeValueSemantics
     private static final Object DEFAULT_VALUE = null; // no default
     private static final int TYPICAL_LENGTH = 8;
 
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
-
     protected static void initFormats(final Map<String, DateFormat> formats) {
         formats.put(ISO_ENCODING_FORMAT, createDateEncodingFormat("HHmmssSSS")); 
         formats.put("short", DateFormat.getTimeInstance(DateFormat.SHORT)); 
@@ -48,7 +45,7 @@ public abstract class TimeValueSemantics
 
     @SuppressWarnings("unchecked")
     public TimeValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super("time", holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, (T) DEFAULT_VALUE, configuration, context);
+        super("time", holder, adaptedClass, TYPICAL_LENGTH, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, (T) DEFAULT_VALUE, configuration, context);
 
         final String formatRequired = configuration.getString(ConfigurationConstants.ROOT + "value.format.time");
         if (formatRequired == null) {
@@ -62,11 +59,6 @@ public abstract class TimeValueSemantics
     // DateValueFacet
     // //////////////////////////////////////////////////////////////////
 
-    @Override
-    public int getLevel() {
-        return TIME_ONLY;
-    }
-
     // //////////////////////////////////////////////////////////////////
     // temporal-specific stuff
     // //////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/timestamp/TimeStampValueSemanticsProviderAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/timestamp/TimeStampValueSemanticsProviderAbstract.java?rev=1378484&r1=1378483&r2=1378484&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/timestamp/TimeStampValueSemanticsProviderAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/timestamp/TimeStampValueSemanticsProviderAbstract.java Wed Aug 29 09:10:16 2012
@@ -31,6 +31,8 @@ import org.apache.isis.core.commons.conf
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderContext;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.EqualByContent;
+import org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.Immutability;
 import org.apache.isis.core.progmodel.facets.value.ValueSemanticsProviderAbstractTemporal;
 
 public abstract class TimeStampValueSemanticsProviderAbstract<T> extends ValueSemanticsProviderAbstractTemporal<T> {
@@ -38,9 +40,6 @@ public abstract class TimeStampValueSema
     private static final Object DEFAULT_VALUE = null; // no default
     private static final int TYPICAL_LENGTH = 12;
 
-    private static final boolean IMMUTABLE = false;
-    private static final boolean EQUAL_BY_CONTENT = false;
-
     protected static void initFormats(final Map<String, DateFormat> formats) {
         formats.put(ISO_ENCODING_FORMAT, createDateEncodingFormat("yyyyMMdd'T'HHmmssSSS")); 
         formats.put("short", DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG));
@@ -48,7 +47,7 @@ public abstract class TimeStampValueSema
 
     @SuppressWarnings("unchecked")
     public TimeStampValueSemanticsProviderAbstract(final FacetHolder holder, final Class<T> adaptedClass, final IsisConfiguration configuration, final ValueSemanticsProviderContext context) {
-        super("timestamp", holder, adaptedClass, TYPICAL_LENGTH, IMMUTABLE, EQUAL_BY_CONTENT, (T) DEFAULT_VALUE, configuration, context);
+        super("timestamp", holder, adaptedClass, TYPICAL_LENGTH, Immutability.NOT_IMMUTABLE, EqualByContent.NOT_HONOURED, (T) DEFAULT_VALUE, configuration, context);
         final String formatRequired = configuration.getString(ConfigurationConstants.ROOT + "value.format.timestamp");
         if (formatRequired == null) {
             format = formats().get(defaultFormat());
@@ -58,11 +57,6 @@ public abstract class TimeStampValueSema
     }
 
     @Override
-    public int getLevel() {
-        return TIMESTAMP;
-    }
-
-    @Override
     protected T add(final T original, final int years, final int months, final int days, final int hours, final int minutes) {
         return original;
     }



Mime
View raw message