Skip to content

Commit 27043f8

Browse files
committed
feat: create goal service
Signed-off-by: Otavio Santana <[email protected]>
1 parent e0461dd commit 27043f8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package os.expert.sample;
2+
3+
import jakarta.enterprise.context.ApplicationScoped;
4+
import jakarta.inject.Inject;
5+
import org.eclipse.jnosql.mapping.Database;
6+
import org.eclipse.jnosql.mapping.DatabaseType;
7+
8+
import java.util.List;
9+
10+
@ApplicationScoped
11+
public class GoalService {
12+
13+
private final NewYearWishes newYearWishes;
14+
15+
@Inject
16+
public GoalService(@Database(DatabaseType.DOCUMENT) NewYearWishes newYearWishes) {
17+
this.newYearWishes = newYearWishes;
18+
}
19+
20+
@Deprecated
21+
GoalService() {
22+
this(null);
23+
}
24+
25+
public List<Goal> findGoals(int page, int size) {
26+
return null;
27+
}
28+
29+
public Goal save(Goal goal) {
30+
return newYearWishes.save(goal);
31+
}
32+
}

0 commit comments

Comments
 (0)