Skip to content

Commit 0acbede

Browse files
committed
#77: Add concrete docs on which parts of Projections user-visible API will be moved to a different library and/or package, and which internal Projection-related APIs will be removed altogether
1 parent d87eb64 commit 0acbede

File tree

10 files changed

+29
-18
lines changed

10 files changed

+29
-18
lines changed

databind/src/main/java/tech/ydb/yoj/databind/schema/Schema.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ public void setName(String newName) {
577577
}
578578

579579
/**
580-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
580+
* @deprecated Projections will be moved from the core YOJ API in 3.0.0 to an optional module.
581+
* The {@code getRawPath()} method is only used by projection logic, and will most likely be removed.
581582
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
582583
*/
583584
@Deprecated(forRemoval = true)
@@ -586,7 +587,8 @@ public String getRawPath() {
586587
}
587588

588589
/**
589-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
590+
* @deprecated Projections will be moved from the core YOJ API in 3.0.0 to an optional module.
591+
* The {@code getRawSubPath(int)} method is only used by projection logic, and will most likely be removed.
590592
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
591593
*/
592594
@Deprecated(forRemoval = true)

repository/src/main/java/tech/ydb/yoj/repository/db/Entity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ default E preSave() {
2323
}
2424

2525
/**
26+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ module in YOJ 3.0.0.
27+
* The {@code Entity.createProjections()} method will be moved to a subinterface of {@code Entity}
28+
* in a separate library.
2629
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
2730
*/
2831
default List<Entity<?>> createProjections() {

repository/src/main/java/tech/ydb/yoj/repository/db/EntityList.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
import java.util.stream.Stream;
77

88
/**
9+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ library in YOJ 3.0.0.
10+
* The {@code EntityList} class will be moved to {@code tech.ydb.yoj.repository.db.projection} package in
11+
* a separate library.
912
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
10-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
1113
*/
12-
@Deprecated(forRemoval = true)
1314
public class EntityList extends LinkedList<Entity<?>> {
1415
public static EntityList create() {
1516
return new EntityList();

repository/src/main/java/tech/ydb/yoj/repository/db/cache/TransactionLocal.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public <X> X instance(@NonNull Supplier<X> supplier) {
4747
* <strong>Warning:</strong> Unlike {@link #log()}, this method is not intended to be used by end-users,
4848
* only by the YOJ implementation itself.
4949
*
50-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
50+
* @deprecated Projections will be moved from the core YOJ API in 3.0.0 to an optional module.
51+
* The {@code projectionCache()} method is an implementation detail, and will be removed.
5152
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
5253
*/
5354
@InternalApi

repository/src/main/java/tech/ydb/yoj/repository/db/projection/ProjectionCache.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import tech.ydb.yoj.repository.db.RepositoryTransaction;
66

77
/**
8-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
8+
* @deprecated Projections will be moved from the core YOJ API in 3.0.0 to an optional module.
9+
* The {@code ProjectionCache} interface is an implementation detail, and will be removed or moved to an internal package.
910
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
1011
*/
1112
@InternalApi

repository/src/main/java/tech/ydb/yoj/repository/db/projection/ProjectionMappings.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import static lombok.AccessLevel.PRIVATE;
2424

2525
/**
26+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ module in YOJ 3.0.0.
27+
* The {@code ProjectionMappings} class will be moved to a separate library.
2628
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
2729
*/
2830
public final class ProjectionMappings {
@@ -151,10 +153,10 @@ public static <P extends Entity<P>> ListViaProjection<P> listViaProjection(@NonN
151153
}
152154

153155
/**
156+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ module in YOJ 3.0.0.
157+
* The {@code ProjectionMappings.ListViaProjection} class will be moved to a separate library.
154158
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
155-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
156159
*/
157-
@Deprecated(forRemoval = true)
158160
@RequiredArgsConstructor(access = PRIVATE)
159161
public static final class ListViaProjection<P extends Entity<P>> {
160162
private final Class<P> projectionType;
@@ -185,10 +187,10 @@ public <T extends Entity<T>> Listing<T, P> entities(@NonNull ListRequest<T> requ
185187
}
186188

187189
/**
190+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ module in YOJ 3.0.0.
191+
* The {@code ProjectionMappings.Listing} class will be moved to a separate library.
188192
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
189-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
190193
*/
191-
@Deprecated(forRemoval = true)
192194
@RequiredArgsConstructor(access = PRIVATE)
193195
public static final class Listing<T extends Entity<T>, P extends Entity<P>> {
194196
private final ListRequest<T> request;
@@ -206,10 +208,10 @@ public ListResult<P> run(@NonNull Function<ListRequest<P>, ListResult<P>> listFu
206208
}
207209

208210
/**
211+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ module in YOJ 3.0.0.
212+
* The {@code ProjectionMappings.TransformedListing} class will be moved to a separate library.
209213
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
210-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
211214
*/
212-
@Deprecated(forRemoval = true)
213215
@RequiredArgsConstructor(access = PRIVATE)
214216
public static final class TransformedListing<T extends Entity<T>, P extends Entity<P>> {
215217
private final Listing<T, P> listing;

repository/src/main/java/tech/ydb/yoj/repository/db/projection/Projections.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import java.lang.annotation.Target;
99

1010
/**
11+
* <strong>Warning!</strong> Projections will be moved to a separate YOJ module in YOJ 3.0.0.
12+
* The {@code Projections} annotation interface will be moved to a separate library.
1113
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
1214
*/
1315
@Target(ElementType.TYPE)

repository/src/main/java/tech/ydb/yoj/repository/db/projection/RoProjectionCache.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import tech.ydb.yoj.repository.db.RepositoryTransaction;
66

77
/**
8-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
8+
* @deprecated Projections will be moved from the core YOJ API in 3.0.0 to an optional module.
9+
* The {@code RoProjectionCache} class is an implementation detail, and will be removed or moved to an internal package.
910
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
1011
*/
1112
@InternalApi

repository/src/main/java/tech/ydb/yoj/repository/db/projection/RwProjectionCache.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
import static java.util.stream.Collectors.toMap;
1515

1616
/**
17-
* @deprecated Projections will be removed from the core YOJ API in 3.0.0 and possibly reintroduced as an optional module.
17+
* @deprecated Projections will be moved from the core YOJ API in 3.0.0 to an optional module.
18+
* The {@code RwProjectionCache} class is an implementation detail, and will be removed or moved to an internal package.
19+
*
1820
* @see <a href="https://github.com/ydb-platform/yoj-project/issues/77">#77</a>
1921
*/
2022
@InternalApi

repository/src/main/java/tech/ydb/yoj/repository/db/projection/package-info.java

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)