polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [10/33] polygene-java git commit: Added hasProperty, hasAssociation, hasManyAssociation, hasNamedAssociation query methods in StateDescriptor & co.
Date Thu, 26 Oct 2017 07:34:40 GMT
Added hasProperty, hasAssociation, hasManyAssociation, hasNamedAssociation query methods in
StateDescriptor & co.

Signed-off-by: niclas <niclas@hedhman.org>


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/ffd72078
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/ffd72078
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/ffd72078

Branch: refs/heads/develop
Commit: ffd7207876386e30854ecd8afcf8ded742db3ead
Parents: 914ed58
Author: niclas <niclas@hedhman.org>
Authored: Sun Jun 11 11:30:21 2017 +0800
Committer: niclas <niclas@hedhman.org>
Committed: Sun Jun 11 11:30:21 2017 +0800

----------------------------------------------------------------------
 .../association/AssociationStateDescriptor.java |  6 +++++
 .../polygene/api/common/QualifiedName.java      |  2 --
 .../polygene/api/composite/PropertyMapper.java  |  2 +-
 .../polygene/api/composite/StateDescriptor.java |  2 ++
 .../polygene/api/entity/EntityReference.java    | 13 +++++++++-
 .../runtime/association/AssociationsModel.java  | 16 ++++++++-----
 .../association/ManyAssociationsModel.java      | 16 +++++++++----
 .../association/NamedAssociationsModel.java     | 21 +++++++++-------
 .../polygene/runtime/composite/StateModel.java  |  6 +++++
 .../runtime/entity/EntityStateModel.java        | 21 ++++++++++++++--
 .../runtime/property/PropertiesModel.java       | 18 ++++++++------
 .../polygene/runtime/value/ValueStateModel.java | 18 ++++++++++++++
 .../skeletons/SQLCompatEntityStateWrapper.java  | 25 +++++++++++++++++++-
 13 files changed, 133 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
b/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
index dbee470..2c11b63 100644
--- a/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateDescriptor.java
@@ -34,18 +34,24 @@ public interface AssociationStateDescriptor extends StateDescriptor
     AssociationDescriptor getAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasAssociation( QualifiedName name );
+
     AssociationDescriptor getManyAssociationByName( String name )
         throws IllegalArgumentException;
 
     AssociationDescriptor getManyAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasManyAssociation( QualifiedName name );
+
     AssociationDescriptor getNamedAssociationByName( String name )
         throws IllegalArgumentException;
 
     AssociationDescriptor getNamedAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasNamedAssociation( QualifiedName name );
+
     Stream<? extends AssociationDescriptor> associations();
 
     Stream<? extends AssociationDescriptor> manyAssociations();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java b/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
index 36bf86a..657b6de 100644
--- a/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
+++ b/core/api/src/main/java/org/apache/polygene/api/common/QualifiedName.java
@@ -238,9 +238,7 @@ public final class QualifiedName
         {
             return false;
         }
-
         QualifiedName that = (QualifiedName) o;
-
         return name.equals( that.name ) && typeName.equals( that.typeName );
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
b/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
index 59e1f67..c4e13f3 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/PropertyMapper.java
@@ -236,7 +236,7 @@ public final class PropertyMapper
     {
         return new Properties()
         {
-            private static final long serialVersionUID = 3550125427530538865L;
+            private static final long serialVersionUID = 1L;
 
             @Override
             public Object get( Object o )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
b/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
index 20c07c2..8bf4738 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/StateDescriptor.java
@@ -35,5 +35,7 @@ public interface StateDescriptor
     PropertyDescriptor findPropertyModelByQualifiedName( QualifiedName name )
         throws IllegalArgumentException;
 
+    boolean hasProperty( QualifiedName name );
+
     Stream<? extends PropertyDescriptor> properties();
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java b/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
index 98d1003..3bc557e 100644
--- a/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
+++ b/core/api/src/main/java/org/apache/polygene/api/entity/EntityReference.java
@@ -21,6 +21,7 @@
 package org.apache.polygene.api.entity;
 
 import java.util.Objects;
+import org.apache.polygene.api.identity.HasIdentity;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.identity.StringIdentity;
 
@@ -39,6 +40,7 @@ public final class EntityReference
      */
     public static EntityReference parseEntityReference(String identityString)
     {
+        Objects.requireNonNull( identityString, "identityString must not be null" );
         return new EntityReference( new StringIdentity( identityString ) );
     }
 
@@ -48,7 +50,16 @@ public final class EntityReference
      */
     public static EntityReference entityReferenceFor(Object object)
     {
-        return new EntityReference(((EntityComposite) object).identity().get());
+        Objects.requireNonNull( object );
+        if( object instanceof Identity )
+        {
+            return new EntityReference( ((Identity) object) );
+        }
+        if( object instanceof HasIdentity )
+        {
+            return new EntityReference( ((HasIdentity) object).identity().get() );
+        }
+        throw new IllegalArgumentException( "Can not get an entity reference for " + object.getClass()
);
     }
 
     public static EntityReference create(Identity identity)

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
index a9a53a0..e47adcc 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/AssociationsModel.java
@@ -38,6 +38,7 @@ public final class AssociationsModel
     implements VisitableHierarchy<AssociationsModel, AssociationModel>
 {
     private final Map<AccessibleObject, AssociationModel> mapAccessorAssociationModel
= new LinkedHashMap<>();
+    private final Map<QualifiedName, AssociationModel> mapNameAssociationModel = new
LinkedHashMap<>();
 
     public AssociationsModel()
     {
@@ -51,6 +52,7 @@ public final class AssociationsModel
     public void addAssociation( AssociationModel associationModel )
     {
         mapAccessorAssociationModel.put( associationModel.accessor(), associationModel );
+        mapNameAssociationModel.put( associationModel.qualifiedName(), associationModel );
     }
 
     @Override
@@ -97,16 +99,19 @@ public final class AssociationsModel
     public AssociationDescriptor getAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( AssociationModel associationModel : mapAccessorAssociationModel.values() )
+        AssociationModel associationModel = mapNameAssociationModel.get( name );
+        if( associationModel != null )
         {
-            if( associationModel.qualifiedName().equals( name ) )
-            {
-                return associationModel;
-            }
+            return associationModel;
         }
         throw new IllegalArgumentException( "No association found with qualified name:" +
name );
     }
 
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return mapNameAssociationModel.containsKey( name );
+    }
+
     public void checkConstraints( AssociationStateHolder state )
     {
         for( AssociationModel associationModel : mapAccessorAssociationModel.values() )
@@ -116,5 +121,4 @@ public final class AssociationsModel
             associationModel.checkConstraints( association.get() );
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
index 8765f42..96c51b2 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/ManyAssociationsModel.java
@@ -40,6 +40,7 @@ public final class ManyAssociationsModel
     implements VisitableHierarchy<ManyAssociationsModel, ManyAssociationModel>
 {
     private final Map<AccessibleObject, ManyAssociationModel> mapAccessorAssociationModel
= new LinkedHashMap<>();
+    private final Map<QualifiedName, ManyAssociationModel> mapNameAssociationModel
= new LinkedHashMap<>();
 
     public ManyAssociationsModel()
     {
@@ -53,6 +54,7 @@ public final class ManyAssociationsModel
     public void addManyAssociation( ManyAssociationModel model )
     {
         mapAccessorAssociationModel.put( model.accessor(), model );
+        mapNameAssociationModel.put( model.qualifiedName(), model );
     }
 
     @Override
@@ -106,16 +108,20 @@ public final class ManyAssociationsModel
     public AssociationDescriptor getManyAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( ManyAssociationModel associationModel : mapAccessorAssociationModel.values()
)
+
+        ManyAssociationModel associationModel = mapNameAssociationModel.get( name );
+        if( associationModel != null )
         {
-            if( associationModel.qualifiedName().equals( name ) )
-            {
-                return associationModel;
-            }
+            return associationModel;
         }
         throw new IllegalArgumentException( "No many-association found with qualified name:"
+ name );
     }
 
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return mapNameAssociationModel.containsKey( name );
+    }
+
     public void checkConstraints( ValueStateInstance state )
     {
         for( ManyAssociationModel manyAssociationModel : mapAccessorAssociationModel.values()
)

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
index 9007abf..c21b3d6 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/association/NamedAssociationsModel.java
@@ -40,6 +40,7 @@ public final class NamedAssociationsModel
     implements VisitableHierarchy<NamedAssociationsModel, NamedAssociationModel>
 {
     private final Map<AccessibleObject, NamedAssociationModel> mapAccessorAssociationModel
= new LinkedHashMap<>();
+    private final Map<QualifiedName, NamedAssociationModel> mapNameAssociationModel
= new LinkedHashMap<>();
 
     public NamedAssociationsModel()
     {
@@ -53,6 +54,7 @@ public final class NamedAssociationsModel
     public void addNamedAssociation( NamedAssociationModel model )
     {
         mapAccessorAssociationModel.put( model.accessor(), model );
+        mapNameAssociationModel.put( model.qualifiedName(), model );
     }
 
     @Override
@@ -83,11 +85,11 @@ public final class NamedAssociationsModel
         throws IllegalArgumentException
     {
         NamedAssociationModel namedAssociationModel = mapAccessorAssociationModel.get( accessor
);
-        if( namedAssociationModel == null )
+        if( namedAssociationModel != null )
         {
-            throw new IllegalArgumentException( "No named-association found with name:" +
( (Member) accessor ).getName() );
+            return namedAssociationModel;
         }
-        return namedAssociationModel;
+        throw new IllegalArgumentException( "No named-association found with name:" + ( (Member)
accessor ).getName() );
     }
 
     public AssociationDescriptor getNamedAssociationByName( String name )
@@ -106,16 +108,19 @@ public final class NamedAssociationsModel
     public AssociationDescriptor getNamedAssociationByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( NamedAssociationModel associationModel : mapAccessorAssociationModel.values()
)
+        NamedAssociationModel associationModel = mapNameAssociationModel.get( name );
+        if( associationModel != null )
         {
-            if( associationModel.qualifiedName().equals( name ) )
-            {
-                return associationModel;
-            }
+            return associationModel;
         }
         throw new IllegalArgumentException( "No named-association found with qualified name:"
+ name );
     }
 
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return mapNameAssociationModel.containsKey( name );
+    }
+
     public void checkConstraints( ValueStateInstance state )
     {
         for( NamedAssociationModel associationModel : mapAccessorAssociationModel.values()
)

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
index 9995d1b..e330d6b 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/StateModel.java
@@ -67,6 +67,12 @@ public class StateModel
     }
 
     @Override
+    public boolean hasProperty( QualifiedName name )
+    {
+        return propertiesModel.hasProperty( name );
+    }
+
+    @Override
     public <ThrowableType extends Throwable> boolean accept( HierarchicalVisitor<?
super Object, ? super Object, ThrowableType> visitor )
         throws ThrowableType
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
index 7601b4e..7ed42e4 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/entity/EntityStateModel.java
@@ -38,8 +38,7 @@ import org.apache.polygene.runtime.property.PropertiesModel;
 /**
  * Model for EntityComposite state.
  */
-public final class EntityStateModel
-    extends StateModel
+public final class EntityStateModel extends StateModel
     implements AssociationStateDescriptor
 {
     private final AssociationsModel associationsModel;
@@ -77,6 +76,12 @@ public final class EntityStateModel
         return associationsModel.getAssociationByQualifiedName( name );
     }
 
+    @Override
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return associationsModel.hasAssociation( name );
+    }
+
     public ManyAssociationModel getManyAssociation( AccessibleObject accessor )
         throws IllegalArgumentException
     {
@@ -97,6 +102,12 @@ public final class EntityStateModel
         return manyAssociationsModel.getManyAssociationByQualifiedName( name );
     }
 
+    @Override
+    public boolean hasManyAssociation( QualifiedName name )
+    {
+        return manyAssociationsModel.hasAssociation( name );
+    }
+
     public NamedAssociationModel getNamedAssociation( AccessibleObject accessor )
         throws IllegalArgumentException
     {
@@ -118,6 +129,12 @@ public final class EntityStateModel
     }
 
     @Override
+    public boolean hasNamedAssociation( QualifiedName name )
+    {
+        return namedAssociationsModel.hasAssociation( name );
+    }
+
+    @Override
     public Stream<AssociationModel> associations()
     {
         return associationsModel.associations();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
index cfcfcb5..ef1f831 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/property/PropertiesModel.java
@@ -34,7 +34,8 @@ import org.apache.polygene.api.util.VisitableHierarchy;
 public class PropertiesModel
     implements VisitableHierarchy<Object, Object>
 {
-    protected final Map<AccessibleObject, PropertyModel> mapAccessiblePropertyModel
= new LinkedHashMap<>();
+    private final Map<AccessibleObject, PropertyModel> mapAccessiblePropertyModel =
new LinkedHashMap<>();
+    private final Map<QualifiedName, PropertyModel> mapNamePropertyModel = new LinkedHashMap<>();
 
     public PropertiesModel()
     {
@@ -43,6 +44,7 @@ public class PropertiesModel
     public void addProperty( PropertyModel property )
     {
         mapAccessiblePropertyModel.put( property.accessor(), property );
+        mapNamePropertyModel.put( property.qualifiedName(), property );
     }
 
     @Override
@@ -75,7 +77,6 @@ public class PropertiesModel
         {
             throw new IllegalArgumentException( "No property found with name: " + ( (Member)
accessor ).getName() );
         }
-
         return propertyModel;
     }
 
@@ -95,13 +96,16 @@ public class PropertiesModel
     public PropertyModel getPropertyByQualifiedName( QualifiedName name )
         throws IllegalArgumentException
     {
-        for( PropertyModel propertyModel : mapAccessiblePropertyModel.values() )
+        PropertyModel propertyModel = mapNamePropertyModel.get( name );
+        if( propertyModel != null )
         {
-            if( propertyModel.qualifiedName().equals( name ) )
-            {
-                return propertyModel;
-            }
+            return propertyModel;
         }
         throw new IllegalArgumentException( "No property found with qualified name: " + name
);
     }
+
+    public boolean hasProperty( QualifiedName name )
+    {
+        return mapNamePropertyModel.containsKey( name );
+    }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
index 73c6a17..f8ef350 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/value/ValueStateModel.java
@@ -70,6 +70,12 @@ public final class ValueStateModel
     }
 
     @Override
+    public boolean hasAssociation( QualifiedName name )
+    {
+        return associationsModel.hasAssociation( name );
+    }
+
+    @Override
     public AssociationDescriptor getManyAssociationByName( String name )
     {
         return manyAssociationsModel.getManyAssociationByName( name );
@@ -82,6 +88,12 @@ public final class ValueStateModel
     }
 
     @Override
+    public boolean hasManyAssociation( QualifiedName name )
+    {
+        return manyAssociationsModel.hasAssociation( name );
+    }
+
+    @Override
     public AssociationDescriptor getNamedAssociationByName( String name )
     {
         return namedAssociationsModel.getNamedAssociationByName( name );
@@ -94,6 +106,12 @@ public final class ValueStateModel
     }
 
     @Override
+    public boolean hasNamedAssociation( QualifiedName name )
+    {
+        return namedAssociationsModel.hasAssociation( name );
+    }
+
+    @Override
     public Stream<AssociationModel> associations()
     {
         return associationsModel.associations();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ffd72078/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
index bf665c6..4b1d9a2 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/polygene/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
@@ -34,7 +34,6 @@ import org.apache.polygene.api.property.PropertyDescriptor;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.type.CollectionType;
 import org.apache.polygene.api.type.EntityCompositeType;
-import org.apache.polygene.api.type.ValueCompositeType;
 import org.apache.polygene.api.type.ValueType;
 import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.spi.entity.EntityState;
@@ -307,6 +306,12 @@ class SQLCompatEntityStateWrapper
         }
 
         @Override
+        public boolean hasAssociation( QualifiedName name )
+        {
+            return wrappedAssociationStateDescriptor.hasAssociation( name );
+        }
+
+        @Override
         public AssociationDescriptor getManyAssociationByName( String name )
             throws IllegalArgumentException
         {
@@ -321,6 +326,12 @@ class SQLCompatEntityStateWrapper
         }
 
         @Override
+        public boolean hasManyAssociation( QualifiedName name )
+        {
+            return false;
+        }
+
+        @Override
         public AssociationDescriptor getNamedAssociationByName( String name )
             throws IllegalArgumentException
         {
@@ -335,6 +346,12 @@ class SQLCompatEntityStateWrapper
         }
 
         @Override
+        public boolean hasNamedAssociation( QualifiedName name )
+        {
+            return false;
+        }
+
+        @Override
         public Stream<? extends AssociationDescriptor> associations()
         {
             return wrappedAssociationStateDescriptor.associations();
@@ -367,6 +384,12 @@ class SQLCompatEntityStateWrapper
         }
 
         @Override
+        public boolean hasProperty( QualifiedName name )
+        {
+            return wrappedAssociationStateDescriptor.hasProperty( name );
+        }
+
+        @Override
         public Stream<? extends PropertyDescriptor> properties()
         {
             return wrappedAssociationStateDescriptor.properties().filter( PROPERTY_SPEC );


Mime
View raw message