Skip to content

Commit

Permalink
Remove default methods from BaseDb and RepositoryTransaction for back…
Browse files Browse the repository at this point in the history
…ward compatibility
  • Loading branch information
Alexander Lavrukov committed Jan 6, 2025
1 parent a0ca7db commit 07d3e61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -12,9 +11,7 @@ static <T> T current(Class<T> type) {
return Proxies.proxy(type, () -> Tx.Current.get().getRepositoryTransaction());
}

default <T extends Entity<T>> Table<T> table(Class<T> c) {
return table(TableDescriptor.from(EntitySchema.of(c)));
}
<T extends Entity<T>> Table<T> table(Class<T> c);

<T extends Entity<T>> Table<T> table(TableDescriptor<T> tableDescriptor);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
* one call to either method) lest your transaction stays active on the DB server.
*/
public interface RepositoryTransaction {
default <T extends Entity<T>> Table<T> table(Class<T> c) {
return table(TableDescriptor.from(EntitySchema.of(c)));
}
<T extends Entity<T>> Table<T> table(Class<T> c);

<T extends Entity<T>> Table<T> table(TableDescriptor<T> tableDescriptor);

Expand Down

0 comments on commit 07d3e61

Please sign in to comment.