Skip to content

Commit 51bcee5

Browse files
committed
add Queries and Commands Interfaces
1 parent 15a25f0 commit 51bcee5

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.iluwatar.cqrs.commandes;
2+
3+
public interface ICommandService {
4+
5+
public abstract void authorCreated(String username, String name, String email);
6+
7+
public abstract void bookAddedToAuthor(String title, double price, String username);
8+
9+
public abstract void authorNameUpdated(String username, String name);
10+
11+
public abstract void authorUsernameUpdated(String oldUsername, String newUsername);
12+
13+
public abstract void authorEmailUpdated(String username, String email);
14+
15+
public abstract void bookTitleUpdated(String oldTitle, String newTitle);
16+
17+
public abstract void bookPriceUpdated(String title, double price);
18+
19+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.iluwatar.cqrs.queries;
2+
3+
import java.util.List;
4+
5+
import com.iluwatar.cqrs.dto.AuthorDTO;
6+
import com.iluwatar.cqrs.dto.BookDTO;
7+
8+
public interface IQueryService {
9+
10+
public abstract AuthorDTO getAuthorByUsername(String username);
11+
12+
public abstract Double getBookPrice(String title);
13+
14+
public abstract List<BookDTO> getAuthorBooks(String username);
15+
16+
public abstract long getAuthorBooksCount(String username);
17+
18+
public abstract long getAuthorsCount();
19+
20+
}

0 commit comments

Comments
 (0)