File tree Expand file tree Collapse file tree 4 files changed +66
-2
lines changed
dev/io.openliberty.jakarta.data.1.1/src/jakarta/data Expand file tree Collapse file tree 4 files changed +66
-2
lines changed Original file line number Diff line number Diff line change 1+ /*******************************************************************************
2+ * Copyright (c) 2026 IBM Corporation and others.
3+ * All rights reserved. This program and the accompanying materials
4+ * are made available under the terms of the Eclipse Public License 2.0
5+ * which accompanies this distribution, and is available at
6+ * http://www.eclipse.org/legal/epl-2.0/
7+ *
8+ * SPDX-License-Identifier: EPL-2.0
9+ *
10+ * Contributors:
11+ * IBM Corporation - initial API and implementation
12+ *******************************************************************************/
13+ package jakarta .data .event ;
14+
15+ public class PostUpsertEvent <E > extends LifecycleEvent <E > {
16+
17+ public PostUpsertEvent (E entity ) {
18+ super (entity );
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ /*******************************************************************************
2+ * Copyright (c) 2026 IBM Corporation and others.
3+ * All rights reserved. This program and the accompanying materials
4+ * are made available under the terms of the Eclipse Public License 2.0
5+ * which accompanies this distribution, and is available at
6+ * http://www.eclipse.org/legal/epl-2.0/
7+ *
8+ * SPDX-License-Identifier: EPL-2.0
9+ *
10+ * Contributors:
11+ * IBM Corporation - initial API and implementation
12+ *******************************************************************************/
13+ package jakarta .data .event ;
14+
15+ public class PreUpsertEvent <E > extends LifecycleEvent <E > {
16+
17+ public PreUpsertEvent (E entity ) {
18+ super (entity );
19+ }
20+ }
Original file line number Diff line number Diff line change 11/*******************************************************************************
2- * Copyright (c) 2024 IBM Corporation and others.
2+ * Copyright (c) 2024,2026 IBM Corporation and others.
33 * All rights reserved. This program and the accompanying materials
44 * are made available under the terms of the Eclipse Public License 2.0
55 * which accompanies this distribution, and is available at
@@ -33,6 +33,20 @@ public record CursoredPageRecord<T>(
3333 PageRequest previousPageRequest )
3434 implements CursoredPage <T > {
3535
36+ public CursoredPageRecord (List <T > content ,
37+ List <Cursor > cursors ,
38+ long totalElements ,
39+ PageRequest pageRequest ,
40+ PageRequest nextPageRequest ,
41+ PageRequest previousPageRequest ) {
42+ this .content = List .copyOf (content );
43+ this .cursors = List .copyOf (cursors );
44+ this .nextPageRequest = nextPageRequest ;
45+ this .pageRequest = pageRequest ;
46+ this .previousPageRequest = previousPageRequest ;
47+ this .totalElements = totalElements ;
48+ }
49+
3650 public CursoredPageRecord (List <T > content ,
3751 List <PageRequest .Cursor > cursors ,
3852 long totalElements ,
Original file line number Diff line number Diff line change 11/*******************************************************************************
2- * Copyright (c) 2024 IBM Corporation and others.
2+ * Copyright (c) 2024,2026 IBM Corporation and others.
33 * All rights reserved. This program and the accompanying materials
44 * are made available under the terms of the Eclipse Public License 2.0
55 * which accompanies this distribution, and is available at
@@ -29,6 +29,16 @@ public record PageRecord<T>(PageRequest pageRequest,
2929 boolean moreResults )
3030 implements Page <T > {
3131
32+ public PageRecord (PageRequest pageRequest ,
33+ List <T > content ,
34+ long totalElements ,
35+ boolean moreResults ) {
36+ this .content = List .copyOf (content );
37+ this .moreResults = moreResults ;
38+ this .pageRequest = pageRequest ;
39+ this .totalElements = totalElements ;
40+ }
41+
3242 public PageRecord (PageRequest req ,
3343 List <T > content ,
3444 long total ) {
You can’t perform that action at this time.
0 commit comments