add Queries and Commands Interfaces

This commit is contained in:
Sabiq Ihab 2017-06-21 00:54:22 +00:00
parent 15a25f0ef3
commit 51bcee5d7d
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,19 @@
package com.iluwatar.cqrs.commandes;
public interface ICommandService {
public abstract void authorCreated(String username, String name, String email);
public abstract void bookAddedToAuthor(String title, double price, String username);
public abstract void authorNameUpdated(String username, String name);
public abstract void authorUsernameUpdated(String oldUsername, String newUsername);
public abstract void authorEmailUpdated(String username, String email);
public abstract void bookTitleUpdated(String oldTitle, String newTitle);
public abstract void bookPriceUpdated(String title, double price);
}

View File

@ -0,0 +1,20 @@
package com.iluwatar.cqrs.queries;
import java.util.List;
import com.iluwatar.cqrs.dto.AuthorDTO;
import com.iluwatar.cqrs.dto.BookDTO;
public interface IQueryService {
public abstract AuthorDTO getAuthorByUsername(String username);
public abstract Double getBookPrice(String title);
public abstract List<BookDTO> getAuthorBooks(String username);
public abstract long getAuthorBooksCount(String username);
public abstract long getAuthorsCount();
}