mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Add staff design model
This commit is contained in:
parent
dc1ff84824
commit
b6f774664f
70
src/main/asciidoc/models/design/staff.puml
Normal file
70
src/main/asciidoc/models/design/staff.puml
Normal file
|
@ -0,0 +1,70 @@
|
|||
@startuml
|
||||
|
||||
skinparam linetype ortho
|
||||
skinparam groupInheritance 2
|
||||
|
||||
package java.util {
|
||||
class ArrayList
|
||||
class Collection
|
||||
class HashSet
|
||||
class Optional
|
||||
class Set
|
||||
}
|
||||
|
||||
package catering {
|
||||
package staff {
|
||||
|
||||
class Staff {
|
||||
- id: int
|
||||
- surname: String
|
||||
- name: String
|
||||
- job: String
|
||||
+ Staff(name: String, surname: String, job: String)
|
||||
+ getId(): int
|
||||
+ getSurname(): String
|
||||
+ getName(): String
|
||||
+ getJob(): String
|
||||
+ setId(): void
|
||||
+ setSurname(): void
|
||||
+ setName(): void
|
||||
+ setJob(): void
|
||||
}
|
||||
|
||||
class StaffController {
|
||||
+ StaffController(staffRepository: StaffRepository)
|
||||
+ getStaff(model Model): String
|
||||
+ removeStaff(staffID: int, model Model): String
|
||||
+ addStaff(name: String, surname: String, job: String): String
|
||||
+ editStaff(id: int, model Model): String
|
||||
+ updateStaff(staff: Staff): String
|
||||
}
|
||||
|
||||
class StaffDataInitializer {
|
||||
+ StaffDataInitializer(staffRepository: StaffRepository)
|
||||
+ initialize(): void
|
||||
}
|
||||
|
||||
class StaffRepository {
|
||||
+ StaffRepository()
|
||||
+ addStaff(staff: Staff): boolean
|
||||
+ save(staff: Staff): void
|
||||
+ count(): long
|
||||
+ removeStaff(staffID: int) boolean
|
||||
+ getStaff(): Collection<Staff>
|
||||
+ findById(id: int): Optional<Staff>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
StaffRepository *-- Staff : -staff
|
||||
StaffController --> StaffRepository : -staffRepository
|
||||
StaffDataInitializer --> StaffRepository : -staffRepository
|
||||
StaffRepository --> Set : -staffs
|
||||
StaffRepository --> HashSet : use
|
||||
StaffRepository --> Collection : use
|
||||
StaffRepository --> Optional : use
|
||||
StaffRepository --> ArrayList : use
|
||||
|
||||
|
||||
@enduml
|
BIN
src/main/asciidoc/models/design/staff.svg
(Stored with Git LFS)
Normal file
BIN
src/main/asciidoc/models/design/staff.svg
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in a new issue