.github
abstract-document
abstract-factory
acyclic-visitor
adapter
aggregator-microservices
ambassador
api-gateway
arrange-act-assert
async-method-invocation
balking
bridge
builder
business-delegate
bytecode
caching
callback
chain
circuit-breaker
collection-pipeline
combinator
command
commander
composite
converter
cqrs
etc
cqrs.png
cqrs.ucls
cqrs.urm.puml
src
README.md
pom.xml
dao
data-bus
data-locality
data-mapper
data-transfer-object
decorator
delegation
dependency-injection
dirty-flag
double-buffer
double-checked-locking
double-dispatch
eip-aggregator
eip-message-channel
eip-publish-subscribe
eip-splitter
eip-wire-tap
etc
event-aggregator
event-asynchronous
event-driven-architecture
event-queue
event-sourcing
execute-around
extension-objects
facade
factory-kit
factory-method
feature-toggle
filterer
fluentinterface
flux
flyweight
front-controller
game-loop
guarded-suspension
half-sync-half-async
hexagonal
intercepting-filter
interpreter
iterator
layers
lazy-loading
leader-election
leader-followers
marker
master-worker-pattern
mediator
memento
model-view-controller
model-view-presenter
module
monad
monostate
multiton
mute-idiom
mutex
naked-objects
null-object
object-mother
object-pool
observer
page-object
partial-response
pipeline
poison-pill
priority-queue
private-class-data
producer-consumer
promise
property
prototype
proxy
queue-load-leveling
reactor
reader-writer-lock
repository
resource-acquisition-is-initialization
retry
role-object
saga
semaphore
servant
serverless
service-layer
service-locator
sharding
simple-factory
singleton
spatial-partition
specification
state
step-builder
strangler
strategy
subclass-sandbox
template-method
thread-pool
throttling
tls
tolerant-reader
trampoline
transaction-script
twin
typeobjectpattern
unit-of-work
update-method
value-object
visitor
zh
.all-contributorsrc
.gitignore
CONTRIBUTING.MD
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
checkstyle-suppressions.xml
license-plugin-header-style.xml
pom.xml
134 lines
3.9 KiB
Plaintext
134 lines
3.9 KiB
Plaintext
![]() |
@startuml
|
||
|
package com.iluwatar.cqrs.util {
|
||
|
class HibernateUtil {
|
||
|
- LOGGER : Logger {static}
|
||
|
- SESSIONFACTORY : SessionFactory {static}
|
||
|
+ HibernateUtil()
|
||
|
- buildSessionFactory() : SessionFactory {static}
|
||
|
+ getSessionFactory() : SessionFactory {static}
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.cqrs.app {
|
||
|
class App {
|
||
|
- LOGGER : Logger {static}
|
||
|
+ App()
|
||
|
+ main(args : String[]) {static}
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.cqrs.dto {
|
||
|
class Author {
|
||
|
- email : String
|
||
|
- name : String
|
||
|
- username : String
|
||
|
+ Author()
|
||
|
+ Author(name : String, email : String, username : String)
|
||
|
+ equals(obj : Object) : boolean
|
||
|
+ getEmail() : String
|
||
|
+ getName() : String
|
||
|
+ getUsername() : String
|
||
|
+ hashCode() : int
|
||
|
+ toString() : String
|
||
|
}
|
||
|
class Book {
|
||
|
- price : double
|
||
|
- title : String
|
||
|
+ Book()
|
||
|
+ Book(title : String, price : double)
|
||
|
+ equals(obj : Object) : boolean
|
||
|
+ getPrice() : double
|
||
|
+ getTitle() : String
|
||
|
+ hashCode() : int
|
||
|
+ toString() : String
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.cqrs.commandes {
|
||
|
class CommandServiceImpl {
|
||
|
- sessionFactory : SessionFactory
|
||
|
+ CommandServiceImpl()
|
||
|
+ authorCreated(username : String, name : String, email : String)
|
||
|
+ authorEmailUpdated(username : String, email : String)
|
||
|
+ authorNameUpdated(username : String, name : String)
|
||
|
+ authorUsernameUpdated(oldUsername : String, newUsername : String)
|
||
|
+ bookAddedToAuthor(title : String, price : double, username : String)
|
||
|
+ bookPriceUpdated(title : String, price : double)
|
||
|
+ bookTitleUpdated(oldTitle : String, newTitle : String)
|
||
|
- getAuthorByUsername(username : String) : Author
|
||
|
- getBookByTitle(title : String) : Book
|
||
|
}
|
||
|
interface ICommandService {
|
||
|
+ authorCreated(String, String, String) {abstract}
|
||
|
+ authorEmailUpdated(String, String) {abstract}
|
||
|
+ authorNameUpdated(String, String) {abstract}
|
||
|
+ authorUsernameUpdated(String, String) {abstract}
|
||
|
+ bookAddedToAuthor(String, double, String) {abstract}
|
||
|
+ bookPriceUpdated(String, double) {abstract}
|
||
|
+ bookTitleUpdated(String, String) {abstract}
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.cqrs.queries {
|
||
|
interface IQueryService {
|
||
|
+ getAuthorBooks(String) : List<Book> {abstract}
|
||
|
+ getAuthorBooksCount(String) : BigInteger {abstract}
|
||
|
+ getAuthorByUsername(String) : Author {abstract}
|
||
|
+ getAuthorsCount() : BigInteger {abstract}
|
||
|
+ getBook(String) : Book {abstract}
|
||
|
}
|
||
|
class QueryServiceImpl {
|
||
|
- sessionFactory : SessionFactory
|
||
|
+ QueryServiceImpl()
|
||
|
+ getAuthorBooks(username : String) : List<Book>
|
||
|
+ getAuthorBooksCount(username : String) : BigInteger
|
||
|
+ getAuthorByUsername(username : String) : Author
|
||
|
+ getAuthorsCount() : BigInteger
|
||
|
+ getBook(title : String) : Book
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.cqrs.constants {
|
||
|
class AppConstants {
|
||
|
+ E_EVANS : String {static}
|
||
|
+ J_BLOCH : String {static}
|
||
|
+ M_FOWLER : String {static}
|
||
|
+ USER_NAME : String {static}
|
||
|
+ AppConstants()
|
||
|
}
|
||
|
}
|
||
|
package com.iluwatar.cqrs.domain.model {
|
||
|
class Author {
|
||
|
- email : String
|
||
|
- id : long
|
||
|
- name : String
|
||
|
- username : String
|
||
|
# Author()
|
||
|
+ Author(username : String, name : String, email : String)
|
||
|
+ getEmail() : String
|
||
|
+ getId() : long
|
||
|
+ getName() : String
|
||
|
+ getUsername() : String
|
||
|
+ setEmail(email : String)
|
||
|
+ setId(id : long)
|
||
|
+ setName(name : String)
|
||
|
+ setUsername(username : String)
|
||
|
+ toString() : String
|
||
|
}
|
||
|
class Book {
|
||
|
- author : Author
|
||
|
- id : long
|
||
|
- price : double
|
||
|
- title : String
|
||
|
# Book()
|
||
|
+ Book(title : String, price : double, author : Author)
|
||
|
+ getAuthor() : Author
|
||
|
+ getId() : long
|
||
|
+ getPrice() : double
|
||
|
+ getTitle() : String
|
||
|
+ setAuthor(author : Author)
|
||
|
+ setId(id : long)
|
||
|
+ setPrice(price : double)
|
||
|
+ setTitle(title : String)
|
||
|
+ toString() : String
|
||
|
}
|
||
|
}
|
||
|
Book --> "-author" Author
|
||
|
CommandServiceImpl ..|> ICommandService
|
||
|
QueryServiceImpl ..|> IQueryService
|
||
|
@enduml
|