From 80ca8edb4f9747d20f5e26b8522d59bf8c960798 Mon Sep 17 00:00:00 2001 From: Alexander Lavrukov Date: Fri, 6 Dec 2024 15:56:10 +0300 Subject: [PATCH] Return couple deprecated constructors back --- .../ydb/statement/MultipleVarsYqlStatement.java | 8 ++++++++ .../ydb/statement/PredicateStatement.java | 13 +++++++++++++ .../yoj/repository/ydb/statement/YqlStatement.java | 8 ++++++++ 3 files changed, 29 insertions(+) diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/MultipleVarsYqlStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/MultipleVarsYqlStatement.java index 32645b2a..81d132e6 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/MultipleVarsYqlStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/MultipleVarsYqlStatement.java @@ -22,6 +22,14 @@ public abstract class MultipleVarsYqlStatement, RESULT> extends YqlStatement { public static final String listName = "$Input"; + /** + * @deprecated Use constructor with {@link TableDescriptor} for selecting correct entity table + */ + @Deprecated(forRemoval = true) + public MultipleVarsYqlStatement(EntitySchema schema, Schema resultSchema) { + this(TableDescriptor.from(schema), schema, resultSchema); + } + public MultipleVarsYqlStatement( TableDescriptor tableDescriptor, EntitySchema schema, Schema resultSchema ) { diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/PredicateStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/PredicateStatement.java index 6041ede3..5336953f 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/PredicateStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/PredicateStatement.java @@ -34,6 +34,19 @@ public abstract class PredicateStatement, private final Map predParams; + /** + * @deprecated Use constructor with {@link TableDescriptor} for selecting correct entity table + */ + @Deprecated(forRemoval = true) + public PredicateStatement( + @NonNull EntitySchema schema, + @NonNull Schema outSchema, + @NonNull PARAMS params, + @NonNull Function getPredicate + ) { + this(TableDescriptor.from(schema), schema, outSchema, params, getPredicate); + } + public PredicateStatement( @NonNull TableDescriptor tableDescriptor, @NonNull EntitySchema schema, diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java index 333a49e7..da3697fe 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java @@ -41,6 +41,14 @@ public abstract class YqlStatement, RESULT @Getter protected final TableDescriptor tableDescriptor; + /** + * @deprecated Use constructor with {@link TableDescriptor} for selecting correct entity table + */ + @Deprecated(forRemoval = true) + public YqlStatement(EntitySchema schema, Schema resultSchema) { + this(TableDescriptor.from(schema), schema, resultSchema); + } + public YqlStatement( TableDescriptor tableDescriptor, EntitySchema schema, Schema resultSchema ) {