This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch CAUSEWAY-3676 in repository https://gitbox.apache.org/repos/asf/causeway.git
commit d63312d2e467be94a9f4744242372187c94f166a Author: danhaywood <[email protected]> AuthorDate: Fri Feb 23 07:16:42 2024 +0000 CAUSEWAY-3676: simplifies holders (15) --- .../viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java | 6 +++--- .../viewer/graphql/model/domain/rich/query/GqlvCollection.java | 3 +-- .../viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java | 4 ++-- .../viewer/graphql/model/domain/rich/query/GqlvProperty.java | 1 - .../viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java | 4 ++-- .../viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java | 2 +- .../model/domain/rich/query/GqlvPropertyGetBlobAbstract.java | 5 +++-- .../graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java | 3 ++- .../model/domain/rich/query/GqlvPropertyGetBlobMimeType.java | 3 ++- .../graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java | 3 ++- .../viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java | 3 ++- .../model/domain/rich/query/GqlvPropertyGetClobAbstract.java | 5 +++-- .../graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java | 3 ++- .../model/domain/rich/query/GqlvPropertyGetClobMimeType.java | 3 ++- .../graphql/model/domain/rich/query/GqlvPropertyGetClobName.java | 3 ++- 15 files changed, 29 insertions(+), 22 deletions(-) diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java index b2588ed535..cc7bb6aca3 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvAssociationGet.java @@ -33,10 +33,10 @@ import lombok.val; public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends GqlvAbstract { - final HolderAssociationGet<T> holder; + final HolderMember<T> holder; public GqlvAssociationGet( - final HolderAssociationGet<T> holder, + final HolderMember<T> holder, final Context context) { super(context); this.holder = holder; @@ -52,7 +52,7 @@ public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends Gq } } - abstract GraphQLOutputType outputTypeFor(HolderAssociationGet<T> holder); + abstract GraphQLOutputType outputTypeFor(HolderMember<T> holder); @Override protected Object fetchData(final DataFetchingEnvironment environment) { diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java index 05c16698d9..2d2e5b2856 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollection.java @@ -26,8 +26,7 @@ import org.apache.causeway.viewer.graphql.model.domain.TypeNames; public class GqlvCollection extends GqlvAssociation<OneToManyAssociation, org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder> - implements HolderAssociationGet<OneToManyAssociation>, - HolderMember<OneToManyAssociation>, + implements HolderMember<OneToManyAssociation>, HolderAssociationDatatype<OneToManyAssociation>, org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider, org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider<OneToManyAssociation>, org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider { private final GqlvMemberHidden<OneToManyAssociation> hidden; diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java index b55dad3b39..9394cb182c 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvCollectionGet.java @@ -28,13 +28,13 @@ import lombok.val; public class GqlvCollectionGet extends GqlvAssociationGet<OneToManyAssociation> { public GqlvCollectionGet( - final HolderAssociationGet holder, + final HolderMember<OneToManyAssociation> holder, final Context context) { super(holder, context); } @Override - GraphQLOutputType outputTypeFor(HolderAssociationGet<OneToManyAssociation> holder) { + GraphQLOutputType outputTypeFor(HolderMember<OneToManyAssociation> holder) { val oneToManyAssociation = holder.getObjectMember(); return context.typeMapper.listTypeForElementTypeOf(oneToManyAssociation, holder.getSchemaType()); } diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java index 7cce2888c4..e831483a76 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvProperty.java @@ -40,7 +40,6 @@ public class GqlvProperty extends GqlvAssociation<OneToOneAssociation, org.apache.causeway.viewer.graphql.model.domain.common.query.GqlvMemberHolder> implements HolderMember<OneToOneAssociation>, - HolderPropertyGet, HolderPropertyAutoComplete, HolderPropertySet, HolderAssociationDatatype<OneToOneAssociation>, diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java index 65251e9faa..c7ffcea574 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGet.java @@ -28,13 +28,13 @@ import lombok.val; public class GqlvPropertyGet extends GqlvAssociationGet<OneToOneAssociation> { public GqlvPropertyGet( - final HolderPropertyGet holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context); } @Override - GraphQLOutputType outputTypeFor(HolderAssociationGet<OneToOneAssociation> holder) { + GraphQLOutputType outputTypeFor(HolderMember<OneToOneAssociation> holder) { val oneToOneAssociation = holder.getObjectMember(); return context.typeMapper.outputTypeFor(oneToOneAssociation, holder.getSchemaType()); } diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java index ed5eaecdd0..07b2d2fdad 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlob.java @@ -33,7 +33,7 @@ import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo; public class GqlvPropertyGetBlob extends GqlvAbstractCustom - implements HolderPropertyGetXlobDetails + implements HolderMember<OneToOneAssociation> { final HolderPropertyGetXlob holder; diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java index 749bb0cd9c..b9cdb59bcc 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobAbstract.java @@ -27,6 +27,7 @@ import graphql.schema.GraphQLFieldDefinition; import org.apache.causeway.applib.value.Blob; import org.apache.causeway.core.metamodel.object.ManagedObject; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract; import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo; @@ -35,10 +36,10 @@ import lombok.val; public abstract class GqlvPropertyGetBlobAbstract extends GqlvAbstract { - final HolderPropertyGetXlobDetails holder; + final HolderMember<OneToOneAssociation> holder; public GqlvPropertyGetBlobAbstract( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context, String name) { super(context); this.holder = holder; diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java index ea134e523f..81f9d08c7e 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobBytes.java @@ -20,6 +20,7 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query; import graphql.schema.DataFetchingEnvironment; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo; @@ -30,7 +31,7 @@ public class GqlvPropertyGetBlobBytes extends GqlvPropertyGetBlobAbstract { private final String graphqlPath; public GqlvPropertyGetBlobBytes( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context, "bytes"); diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java index 15e563553d..4e1e3fa074 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobMimeType.java @@ -20,12 +20,13 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query; import graphql.schema.DataFetchingEnvironment; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; public class GqlvPropertyGetBlobMimeType extends GqlvPropertyGetBlobAbstract { public GqlvPropertyGetBlobMimeType( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context, "mimeType"); diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java index e90e78c74e..15bd102c5d 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetBlobName.java @@ -21,12 +21,13 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query; import graphql.schema.DataFetchingEnvironment; import org.apache.causeway.applib.value.Blob; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; public class GqlvPropertyGetBlobName extends GqlvPropertyGetBlobAbstract { public GqlvPropertyGetBlobName( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context, "name"); } diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java index a4371f3216..a115facfb7 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClob.java @@ -34,7 +34,8 @@ import org.apache.causeway.viewer.graphql.model.mmproviders.SchemaTypeProvider; public class GqlvPropertyGetClob extends GqlvAbstractCustom - implements HolderPropertyGet, HolderPropertyGetXlobDetails, SchemaTypeProvider { + implements HolderMember<OneToOneAssociation>, + SchemaTypeProvider { final HolderPropertyGetXlob holder; final GqlvPropertyGetClobName clobName; diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java index 5d2699e83f..8139ad21d9 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobAbstract.java @@ -27,6 +27,7 @@ import graphql.schema.GraphQLFieldDefinition; import org.apache.causeway.applib.value.Blob; import org.apache.causeway.core.metamodel.object.ManagedObject; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract; import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo; @@ -35,10 +36,10 @@ import lombok.val; public abstract class GqlvPropertyGetClobAbstract extends GqlvAbstract { - final HolderPropertyGetXlobDetails holder; + final HolderMember<OneToOneAssociation> holder; public GqlvPropertyGetClobAbstract( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context, String name) { super(context); this.holder = holder; diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java index fa434a03d5..ff178526de 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobChars.java @@ -20,6 +20,7 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query; import graphql.schema.DataFetchingEnvironment; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo; @@ -30,7 +31,7 @@ public class GqlvPropertyGetClobChars extends GqlvPropertyGetClobAbstract { private final String graphqlPath; public GqlvPropertyGetClobChars( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context, "chars"); diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java index 656e128c39..d32498f457 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobMimeType.java @@ -20,12 +20,13 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query; import graphql.schema.DataFetchingEnvironment; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; public class GqlvPropertyGetClobMimeType extends GqlvPropertyGetClobAbstract { public GqlvPropertyGetClobMimeType( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context, "mimeType"); diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java index 1510aaa2a2..be559e0a3e 100644 --- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java +++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/rich/query/GqlvPropertyGetClobName.java @@ -21,12 +21,13 @@ package org.apache.causeway.viewer.graphql.model.domain.rich.query; import graphql.schema.DataFetchingEnvironment; import org.apache.causeway.applib.value.Blob; +import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation; import org.apache.causeway.viewer.graphql.model.context.Context; public class GqlvPropertyGetClobName extends GqlvPropertyGetClobAbstract { public GqlvPropertyGetClobName( - final HolderPropertyGetXlobDetails holder, + final HolderMember<OneToOneAssociation> holder, final Context context) { super(holder, context, "name"); }
