mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-30 18:33:42 +02:00
65 lines
1.5 KiB
Plaintext
65 lines
1.5 KiB
Plaintext
@startuml
|
|
|
|
skinparam linetype ortho
|
|
skinparam groupInheritance 2
|
|
|
|
package java.util {
|
|
class ArrayList
|
|
class Collection
|
|
class HashSet
|
|
class Optional
|
|
class Set
|
|
}
|
|
|
|
package catering {
|
|
package customer {
|
|
|
|
class Customer {
|
|
- id: int
|
|
+ Customer()
|
|
+ addCustomer(customer: Customer): boolean
|
|
+ save(customer: Customer): void
|
|
+ count(): long
|
|
+ removeCustomer(customerID: int): boolean
|
|
+ getCustomers(): Collection<Customer>
|
|
+ findById(id: int): Optional<Customer>
|
|
}
|
|
|
|
class CustomerController {
|
|
+ CustomerController(staffRepository: StaffRepository)
|
|
+ getCustomer(model Model): String
|
|
+ removeCustomer(customerID: int, model Model): String
|
|
+ editCustomer(id: int, model Model): String
|
|
+ updateCustomer(customer: Customer): String
|
|
}
|
|
|
|
class CustomerDataInitializer {
|
|
+ CustomerDataInitializer(customeRepository: CustomeRepository)
|
|
+ initialize(): void
|
|
}
|
|
|
|
class CustomerRepository {
|
|
+ CustomerRepository()
|
|
+ addCustomer(customer: Customer): boolean
|
|
+ save(customer: Customer): void
|
|
+ count(): long
|
|
+ removeStaff(staffID: int) boolean
|
|
+ getCustomer(): Collection<Customer>
|
|
+ findById(id: int): Optional<Customer>
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
CustomerRepository *-- Customer : -customer
|
|
CustomerController --> CustomerRepository : -customerRepository
|
|
CustomerDataInitializer --> CustomerRepository : -customerRepository
|
|
CustomerRepository --> Set : -customers
|
|
CustomerRepository --> HashSet : use
|
|
CustomerRepository --> Collection : use
|
|
CustomerRepository --> Optional : use
|
|
CustomerRepository --> ArrayList : use
|
|
|
|
|
|
@enduml
|