From 07d3e61417e501487328cd20bdf922d64c731ff5 Mon Sep 17 00:00:00 2001 From: Alexander Lavrukov Date: Mon, 6 Jan 2025 15:08:38 +0300 Subject: [PATCH] Remove default methods from BaseDb and RepositoryTransaction for backward compatibility --- repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java | 5 +---- .../tech/ydb/yoj/repository/db/RepositoryTransaction.java | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java b/repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java index ebeffbde..356f4c08 100644 --- a/repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java +++ b/repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java @@ -1,7 +1,6 @@ package tech.ydb.yoj.repository; import tech.ydb.yoj.repository.db.Entity; -import tech.ydb.yoj.repository.db.EntitySchema; import tech.ydb.yoj.repository.db.Table; import tech.ydb.yoj.repository.db.TableDescriptor; import tech.ydb.yoj.repository.db.Tx; @@ -12,9 +11,7 @@ static T current(Class type) { return Proxies.proxy(type, () -> Tx.Current.get().getRepositoryTransaction()); } - default > Table table(Class c) { - return table(TableDescriptor.from(EntitySchema.of(c))); - } + > Table table(Class c); > Table table(TableDescriptor tableDescriptor); } diff --git a/repository/src/main/java/tech/ydb/yoj/repository/db/RepositoryTransaction.java b/repository/src/main/java/tech/ydb/yoj/repository/db/RepositoryTransaction.java index 4a5d9e8a..d9057dda 100644 --- a/repository/src/main/java/tech/ydb/yoj/repository/db/RepositoryTransaction.java +++ b/repository/src/main/java/tech/ydb/yoj/repository/db/RepositoryTransaction.java @@ -8,9 +8,7 @@ * one call to either method) lest your transaction stays active on the DB server. */ public interface RepositoryTransaction { - default > Table table(Class c) { - return table(TableDescriptor.from(EntitySchema.of(c))); - } + > Table table(Class c); > Table table(TableDescriptor tableDescriptor);