diff --git a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheUpdate.java b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheUpdate.java index 4f594a9d343ccb..4ffd4191d6dd44 100644 --- a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheUpdate.java +++ b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheUpdate.java @@ -8,7 +8,10 @@ * Interface representing an update query. * * Use one of its methods to perform the update query. + * + * @deprecated use {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instead. */ +@Deprecated(forRemoval = true, since = "2.1.0") public interface PanacheUpdate { /** diff --git a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/PanacheUpdate.java b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/PanacheUpdate.java new file mode 100644 index 00000000000000..d7f0bde322e715 --- /dev/null +++ b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/PanacheUpdate.java @@ -0,0 +1,47 @@ +package io.quarkus.mongodb.panache.common; + +import java.util.Map; + +import io.quarkus.panache.common.Parameters; + +/** + * Interface representing an update query. + * + * Use one of its methods to perform the update query. + */ +public interface PanacheUpdate extends io.quarkus.mongodb.panache.PanacheUpdate { + + /** + * Execute the update query with the update document. + * + * @param query a {@link io.quarkus.mongodb.panache query string} + * @param params params optional sequence of indexed parameters + * @return the number of entities updated. + */ + public long where(String query, Object... params); + + /** + * Execute the update query with the update document. + * + * @param query a {@link io.quarkus.mongodb.panache query string} + * @param params {@link Map} of named parameters + * @return the number of entities updated. + */ + public long where(String query, Map params); + + /** + * Execute the update query with the update document. + * + * @param query a {@link io.quarkus.mongodb.panache query string} + * @param params {@link Parameters} of named parameters + * @return the number of entities updated. + */ + public long where(String query, Parameters params); + + /** + * Execute an update on all documents with the update document. + * + * @return the number of entities updated. + */ + public long all(); +} diff --git a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/ReactivePanacheUpdate.java b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/ReactivePanacheUpdate.java new file mode 100644 index 00000000000000..23084422184934 --- /dev/null +++ b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/ReactivePanacheUpdate.java @@ -0,0 +1,47 @@ +package io.quarkus.mongodb.panache.common.reactive; + +import java.util.Map; + +import io.quarkus.panache.common.Parameters; +import io.smallrye.mutiny.Uni; + +/** + * Interface representing an update query. + * + * Use one of its methods to perform the update query. + */ +public interface ReactivePanacheUpdate extends io.quarkus.mongodb.panache.reactive.ReactivePanacheUpdate { + /** + * Execute the update query with the update document. + * + * @param query a {@link io.quarkus.mongodb.panache query string} + * @param params params optional sequence of indexed parameters + * @return the number of entities updated. + */ + public Uni where(String query, Object... params); + + /** + * Execute the update query with the update document. + * + * @param query a {@link io.quarkus.mongodb.panache query string} + * @param params {@link Map} of named parameters + * @return the number of entities updated. + */ + public Uni where(String query, Map params); + + /** + * Execute the update query with the update document. + * + * @param query a {@link io.quarkus.mongodb.panache query string} + * @param params {@link Parameters} of named parameters + * @return the number of entities updated. + */ + public Uni where(String query, Parameters params); + + /** + * Execute an update on all documents with the update document. + * + * @return the number of entities updated. + */ + public Uni all(); +} diff --git a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/runtime/ReactivePanacheUpdateImpl.java b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/runtime/ReactivePanacheUpdateImpl.java index 2b63b0e105a648..fd40deea8423d9 100644 --- a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/runtime/ReactivePanacheUpdateImpl.java +++ b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/reactive/runtime/ReactivePanacheUpdateImpl.java @@ -5,7 +5,7 @@ import org.bson.BsonDocument; import org.bson.conversions.Bson; -import io.quarkus.mongodb.panache.reactive.ReactivePanacheUpdate; +import io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate; import io.quarkus.mongodb.reactive.ReactiveMongoCollection; import io.quarkus.panache.common.Parameters; import io.smallrye.mutiny.Uni; diff --git a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/runtime/PanacheUpdateImpl.java b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/runtime/PanacheUpdateImpl.java index 5928f69bf0ba17..7a1412ec08e95c 100644 --- a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/runtime/PanacheUpdateImpl.java +++ b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/runtime/PanacheUpdateImpl.java @@ -8,7 +8,7 @@ import com.mongodb.client.ClientSession; import com.mongodb.client.MongoCollection; -import io.quarkus.mongodb.panache.PanacheUpdate; +import io.quarkus.mongodb.panache.common.PanacheUpdate; import io.quarkus.panache.common.Parameters; public class PanacheUpdateImpl implements PanacheUpdate { diff --git a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/ReactivePanacheUpdate.java b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/ReactivePanacheUpdate.java index e9e16195de40dc..dad63d45117b92 100644 --- a/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/ReactivePanacheUpdate.java +++ b/extensions/panache/mongodb-panache-common/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/ReactivePanacheUpdate.java @@ -9,7 +9,10 @@ * Interface representing an update query. * * Use one of its methods to perform the update query. + * + * @deprecated use {@link io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate} instead. */ +@Deprecated(forRemoval = true, since = "2.1.0") public interface ReactivePanacheUpdate { /** * Execute the update query with the update document. diff --git a/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinImperativeTypeBundle.java b/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinImperativeTypeBundle.java index 755f08605eac22..6a70d7984b3283 100644 --- a/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinImperativeTypeBundle.java +++ b/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinImperativeTypeBundle.java @@ -1,6 +1,6 @@ package io.quarkus.mongodb.panache.kotlin.deployment; -import io.quarkus.mongodb.panache.PanacheUpdate; +import io.quarkus.mongodb.panache.common.PanacheUpdate; import io.quarkus.mongodb.panache.kotlin.PanacheMongoCompanion; import io.quarkus.mongodb.panache.kotlin.PanacheMongoCompanionBase; import io.quarkus.mongodb.panache.kotlin.PanacheMongoEntity; diff --git a/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinReactiveTypeBundle.java b/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinReactiveTypeBundle.java index e425a786382cd6..c5a6e1cfccada4 100644 --- a/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinReactiveTypeBundle.java +++ b/extensions/panache/mongodb-panache-kotlin/deployment/src/main/java/io/quarkus/mongodb/panache/kotlin/deployment/KotlinReactiveTypeBundle.java @@ -1,5 +1,6 @@ package io.quarkus.mongodb.panache.kotlin.deployment; +import io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate; import io.quarkus.mongodb.panache.kotlin.reactive.ReactivePanacheMongoCompanion; import io.quarkus.mongodb.panache.kotlin.reactive.ReactivePanacheMongoCompanionBase; import io.quarkus.mongodb.panache.kotlin.reactive.ReactivePanacheMongoEntity; @@ -8,7 +9,6 @@ import io.quarkus.mongodb.panache.kotlin.reactive.ReactivePanacheMongoRepositoryBase; import io.quarkus.mongodb.panache.kotlin.reactive.ReactivePanacheQuery; import io.quarkus.mongodb.panache.kotlin.reactive.runtime.KotlinReactiveMongoOperations; -import io.quarkus.mongodb.panache.reactive.ReactivePanacheUpdate; import io.quarkus.panache.common.deployment.ByteCodeType; import io.quarkus.panache.common.deployment.TypeBundle; diff --git a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoCompanion.kt b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoCompanion.kt index ea00195eaebc25..1918720184cbe2 100644 --- a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoCompanion.kt +++ b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoCompanion.kt @@ -645,45 +645,45 @@ interface PanacheMongoCompanionBase { /** * Update all entities of this type using the given update document with optional indexed parameters. - * The returned [PanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.PanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params optional sequence of indexed parameters - * @return a new [PanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.PanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, vararg params: Any?): PanacheUpdate = throw INSTANCE.implementationInjectionMissing() + fun update(update: String, vararg params: Any?): io.quarkus.mongodb.panache.common.PanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document with named parameters. - * The returned [PanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.PanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * * @param params map of named parameters - * @return a new [PanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.PanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Map): PanacheUpdate = + fun update(update: String, params: Map): io.quarkus.mongodb.panache.common.PanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document, with named parameters. - * The returned [PanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.PanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * * @param params [Parameters] of named parameters - * @return a new [PanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.PanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Parameters): PanacheUpdate = throw INSTANCE.implementationInjectionMissing() + fun update(update: String, params: Parameters): io.quarkus.mongodb.panache.common.PanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Allow to access the underlying Mongo Collection. diff --git a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoRepositoryBase.kt b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoRepositoryBase.kt index ca61bbf8301a34..54e685a0024acb 100755 --- a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoRepositoryBase.kt +++ b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/PanacheMongoRepositoryBase.kt @@ -676,43 +676,43 @@ interface PanacheMongoRepositoryBase { /** * Update all entities of this type by the given update document, with optional indexed parameters. - * The returned [PanacheUpdate] object will allow to restrict on which documents the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.PanacheUpdate] object will allow to restrict on which documents the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params optional sequence of indexed parameters - * @return a new [PanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.PanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, vararg params: Any?): PanacheUpdate = throw INSTANCE.implementationInjectionMissing() + fun update(update: String, vararg params: Any?): io.quarkus.mongodb.panache.common.PanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document, with named parameters. - * The returned [PanacheUpdate] object will allow to restrict on which documents the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.PanacheUpdate] object will allow to restrict on which documents the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params [Map] of named parameters - * @return a new [PanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.PanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Map): PanacheUpdate = + fun update(update: String, params: Map): io.quarkus.mongodb.panache.common.PanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document, with named parameters. - * The returned [PanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.PanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params [Parameters] of named parameters - * @return a new [PanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.PanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Parameters): PanacheUpdate = throw INSTANCE.implementationInjectionMissing() + fun update(update: String, params: Parameters): io.quarkus.mongodb.panache.common.PanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Allow to access the underlying Mongo Collection diff --git a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoCompanion.kt b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoCompanion.kt index ee54a438afa79b..4569679432d4ab 100644 --- a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoCompanion.kt +++ b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoCompanion.kt @@ -718,43 +718,43 @@ interface ReactivePanacheMongoCompanionBase): ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() + fun update(update: String, params: Map): io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document, with named parameters. - * The returned [ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params [Parameters] of named parameters - * @return a new [ReactivePanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Parameters): ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() + fun update(update: String, params: Parameters): io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Allow to access the underlying Mongo Collection. diff --git a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoRepositoryBase.kt b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoRepositoryBase.kt index 9b373eb99aa508..acfbb80306bc84 100644 --- a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoRepositoryBase.kt +++ b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/ReactivePanacheMongoRepositoryBase.kt @@ -683,44 +683,44 @@ interface ReactivePanacheMongoRepositoryBase { /** * Update all entities of this type by the given update document, with optional indexed parameters. - * The returned [ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params optional sequence of indexed parameters - * @return a new [ReactivePanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, vararg params: Any?): ReactivePanacheUpdate = + fun update(update: String, vararg params: Any?): io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document, with named parameters. - * The returned [ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params [Map] of named parameters - * @return a new [ReactivePanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Map): ReactivePanacheUpdate = + fun update(update: String, params: Map): io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** * Update all entities of this type by the given update document, with named parameters. - * The returned [ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. + * The returned [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] object will allow to restrict on which document the update should be applied. * * @param update the update document, if it didn't contain any update operator, we add `$set`. * It can also be expressed as a query string. * @param params [Parameters] of named parameters - * @return a new [ReactivePanacheUpdate] instance for the given update document + * @return a new [io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate] instance for the given update document * @see [update] */ @GenerateBridge - fun update(update: String, params: Parameters): ReactivePanacheUpdate = + fun update(update: String, params: Parameters): io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate = throw INSTANCE.implementationInjectionMissing() /** diff --git a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/runtime/KotlinReactiveMongoOperations.kt b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/runtime/KotlinReactiveMongoOperations.kt index de25456af0b612..ff70db439f23a1 100644 --- a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/runtime/KotlinReactiveMongoOperations.kt +++ b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/reactive/runtime/KotlinReactiveMongoOperations.kt @@ -1,7 +1,7 @@ package io.quarkus.mongodb.panache.kotlin.reactive.runtime +import io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate import io.quarkus.mongodb.panache.kotlin.reactive.ReactivePanacheQuery -import io.quarkus.mongodb.panache.reactive.ReactivePanacheUpdate import io.quarkus.mongodb.panache.common.reactive.runtime.ReactiveMongoOperations import io.quarkus.mongodb.panache.common.reactive.runtime.ReactivePanacheUpdateImpl import io.quarkus.mongodb.reactive.ReactiveMongoCollection diff --git a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/runtime/KotlinMongoOperations.kt b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/runtime/KotlinMongoOperations.kt index ef75f564d111a5..f3058a83416b06 100644 --- a/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/runtime/KotlinMongoOperations.kt +++ b/extensions/panache/mongodb-panache-kotlin/runtime/src/main/kotlin/io/quarkus/mongodb/panache/kotlin/runtime/KotlinMongoOperations.kt @@ -2,7 +2,7 @@ package io.quarkus.mongodb.panache.kotlin.runtime import com.mongodb.client.ClientSession import com.mongodb.client.MongoCollection -import io.quarkus.mongodb.panache.PanacheUpdate +import io.quarkus.mongodb.panache.common.PanacheUpdate import io.quarkus.mongodb.panache.kotlin.PanacheQuery import io.quarkus.mongodb.panache.common.runtime.MongoOperations import io.quarkus.mongodb.panache.common.runtime.PanacheUpdateImpl diff --git a/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ImperativeTypeBundle.java b/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ImperativeTypeBundle.java index 3faab59afb2807..7fc8e73c830e43 100644 --- a/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ImperativeTypeBundle.java +++ b/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ImperativeTypeBundle.java @@ -5,7 +5,7 @@ import io.quarkus.mongodb.panache.PanacheMongoRepository; import io.quarkus.mongodb.panache.PanacheMongoRepositoryBase; import io.quarkus.mongodb.panache.PanacheQuery; -import io.quarkus.mongodb.panache.PanacheUpdate; +import io.quarkus.mongodb.panache.common.PanacheUpdate; import io.quarkus.mongodb.panache.runtime.JavaMongoOperations; import io.quarkus.panache.common.deployment.ByteCodeType; import io.quarkus.panache.common.deployment.TypeBundle; diff --git a/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ReactiveTypeBundle.java b/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ReactiveTypeBundle.java index 271443c5821038..ded7b4f4946276 100644 --- a/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ReactiveTypeBundle.java +++ b/extensions/panache/mongodb-panache/deployment/src/main/java/io/quarkus/mongodb/panache/deployment/ReactiveTypeBundle.java @@ -1,11 +1,11 @@ package io.quarkus.mongodb.panache.deployment; +import io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate; import io.quarkus.mongodb.panache.reactive.ReactivePanacheMongoEntity; import io.quarkus.mongodb.panache.reactive.ReactivePanacheMongoEntityBase; import io.quarkus.mongodb.panache.reactive.ReactivePanacheMongoRepository; import io.quarkus.mongodb.panache.reactive.ReactivePanacheMongoRepositoryBase; import io.quarkus.mongodb.panache.reactive.ReactivePanacheQuery; -import io.quarkus.mongodb.panache.reactive.ReactivePanacheUpdate; import io.quarkus.mongodb.panache.reactive.runtime.JavaReactiveMongoOperations; import io.quarkus.panache.common.deployment.ByteCodeType; import io.quarkus.panache.common.deployment.TypeBundle; diff --git a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoEntityBase.java b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoEntityBase.java index 0f9ddf83e3416b..409756568957cb 100755 --- a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoEntityBase.java +++ b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoEntityBase.java @@ -883,50 +883,53 @@ public static void persistOrUpdate(Object firstEntity, Object... entities) { /** * Update all entities of this type by the given update document, with optional indexed parameters. - * The returned {@link PanacheUpdate} object will allow to restrict on which document the update should be applied. + * The returned {@link io.quarkus.mongodb.panache.common.PanacheUpdate} object will allow to restrict on which document the + * update should be applied. * * @param update the update document, if it didn't contain any update operator, we add $set.. * It can also be expressed as a {@link io.quarkus.mongodb.panache query string}. * @param params optional sequence of indexed parameters - * @return a new {@link PanacheUpdate} instance for the given update document + * @return a new {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instance for the given update document * @see #update(String, Map) * @see #update(String, Parameters) */ @GenerateBridge - public static PanacheUpdate update(String update, Object... params) { + public static io.quarkus.mongodb.panache.common.PanacheUpdate update(String update, Object... params) { throw INSTANCE.implementationInjectionMissing(); } /** * Update all entities of this type by the given update document, with named parameters. - * The returned {@link PanacheUpdate} object will allow to restrict on which document the update should be applied. + * The returned {@link io.quarkus.mongodb.panache.common.PanacheUpdate} object will allow to restrict on which document the + * update should be applied. * * @param update the update document, if it didn't contain any update operator, we add $set. * It can also be expressed as a {@link io.quarkus.mongodb.panache query string}. * @param params {@link Map} of named parameters - * @return a new {@link PanacheUpdate} instance for the given update document + * @return a new {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instance for the given update document * @see #update(String, Object...) * @see #update(String, Parameters) * */ @GenerateBridge - public static PanacheUpdate update(String update, Map params) { + public static io.quarkus.mongodb.panache.common.PanacheUpdate update(String update, Map params) { throw INSTANCE.implementationInjectionMissing(); } /** * Update all entities of this type by the given update document, with named parameters. - * The returned {@link PanacheUpdate} object will allow to restrict on which document the update should be applied. + * The returned {@link io.quarkus.mongodb.panache.common.PanacheUpdate} object will allow to restrict on which document the + * update should be applied. * * @param update the update document, if it didn't contain any update operator, we add $set. * It can also be expressed as a {@link io.quarkus.mongodb.panache query string}. * @param params {@link Parameters} of named parameters - * @return a new {@link PanacheUpdate} instance for the given update document + * @return a new {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instance for the given update document * @see #update(String, Object...) * @see #update(String, Map) */ @GenerateBridge - public static PanacheUpdate update(String update, Parameters params) { + public static io.quarkus.mongodb.panache.common.PanacheUpdate update(String update, Parameters params) { throw INSTANCE.implementationInjectionMissing(); } diff --git a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoRepositoryBase.java b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoRepositoryBase.java index eb360d109f8276..f4962e7b991ff7 100755 --- a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoRepositoryBase.java +++ b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/PanacheMongoRepositoryBase.java @@ -881,50 +881,53 @@ default void persistOrUpdate(Entity firstEntity, @SuppressWarnings("unchecked") /** * Update all entities of this type by the given update document, with optional indexed parameters. - * The returned {@link PanacheUpdate} object will allow to restrict on which documents the update should be applied. + * The returned {@link io.quarkus.mongodb.panache.common.PanacheUpdate} object will allow to restrict on which documents the + * update should be applied. * * @param update the update document, if it didn't contain any update operator, we add $set. * It can also be expressed as a {@link io.quarkus.mongodb.panache query string}. * @param params optional sequence of indexed parameters - * @return a new {@link PanacheUpdate} instance for the given update document + * @return a new {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instance for the given update document * @see #update(String, Map) * @see #update(String, Parameters) */ @GenerateBridge - default PanacheUpdate update(String update, Object... params) { + default io.quarkus.mongodb.panache.common.PanacheUpdate update(String update, Object... params) { throw INSTANCE.implementationInjectionMissing(); } /** * Update all entities of this type by the given update document, with named parameters. - * The returned {@link PanacheUpdate} object will allow to restrict on which documents the update should be applied. + * The returned {@link io.quarkus.mongodb.panache.common.PanacheUpdate} object will allow to restrict on which documents the + * update should be applied. * * @param update the update document, if it didn't contain any update operator, we add $set. * It can also be expressed as a {@link io.quarkus.mongodb.panache query string}. * @param params {@link Map} of named parameters - * @return a new {@link PanacheUpdate} instance for the given update document + * @return a new {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instance for the given update document * @see #update(String, Object...) * @see #update(String, Parameters) * */ @GenerateBridge - default PanacheUpdate update(String update, Map params) { + default io.quarkus.mongodb.panache.common.PanacheUpdate update(String update, Map params) { throw INSTANCE.implementationInjectionMissing(); } /** * Update all entities of this type by the given update document, with named parameters. - * The returned {@link PanacheUpdate} object will allow to restrict on which document the update should be applied. + * The returned {@link io.quarkus.mongodb.panache.common.PanacheUpdate} object will allow to restrict on which document the + * update should be applied. * * @param update the update document, if it didn't contain any update operator, we add $set. * It can also be expressed as a {@link io.quarkus.mongodb.panache query string}. * @param params {@link Parameters} of named parameters - * @return a new {@link PanacheUpdate} instance for the given update document + * @return a new {@link io.quarkus.mongodb.panache.common.PanacheUpdate} instance for the given update document * @see #update(String, Object...) * @see #update(String, Map) */ @GenerateBridge - default PanacheUpdate update(String update, Parameters params) { + default io.quarkus.mongodb.panache.common.PanacheUpdate update(String update, Parameters params) { throw INSTANCE.implementationInjectionMissing(); } diff --git a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/runtime/JavaReactiveMongoOperations.java b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/runtime/JavaReactiveMongoOperations.java index 39accc9dd9fade..f1411c4f5f30a8 100644 --- a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/runtime/JavaReactiveMongoOperations.java +++ b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/runtime/JavaReactiveMongoOperations.java @@ -4,10 +4,10 @@ import org.bson.Document; +import io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate; import io.quarkus.mongodb.panache.common.reactive.runtime.ReactiveMongoOperations; import io.quarkus.mongodb.panache.common.reactive.runtime.ReactivePanacheUpdateImpl; import io.quarkus.mongodb.panache.reactive.ReactivePanacheQuery; -import io.quarkus.mongodb.panache.reactive.ReactivePanacheUpdate; import io.quarkus.mongodb.reactive.ReactiveMongoCollection; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; diff --git a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/runtime/JavaMongoOperations.java b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/runtime/JavaMongoOperations.java index a04abd9727008b..fef64ae6a0ef46 100644 --- a/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/runtime/JavaMongoOperations.java +++ b/extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/runtime/JavaMongoOperations.java @@ -9,7 +9,7 @@ import com.mongodb.client.MongoCollection; import io.quarkus.mongodb.panache.PanacheQuery; -import io.quarkus.mongodb.panache.PanacheUpdate; +import io.quarkus.mongodb.panache.common.PanacheUpdate; import io.quarkus.mongodb.panache.common.runtime.MongoOperations; import io.quarkus.mongodb.panache.common.runtime.PanacheUpdateImpl;