From c3142413ef9c3c9550f570ee30233055e15415c5 Mon Sep 17 00:00:00 2001 From: Sergejs Visockis Date: Mon, 1 Apr 2024 08:21:39 +0200 Subject: [PATCH] add plantUML diagram (#79) --- active-record/etc/active-record.urm.puml | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/active-record/etc/active-record.urm.puml b/active-record/etc/active-record.urm.puml index 5972f8095e2b..9dbb48b705f2 100644 --- a/active-record/etc/active-record.urm.puml +++ b/active-record/etc/active-record.urm.puml @@ -1,3 +1,47 @@ @startuml +package com.iluwatar.activerecord { + abstract class RecordBase> { + - dataSource : DataSource + - clazz : Class + + setDataSource(DataSource) : void + # getConnection() : Connection + # abstract getTableName() : String + # abstract setFieldsFromResultSet(ResultSet rs) : void + # abstract setPreparedStatementParams(PreparedStatement pstmt) : void + + findAll() : List + + findById(Long id): T + + save() : void + + delete() : void + - constructFindByIdQuery() : String + - constructFindAllQuery() : String + - getDeclaredClassInstance() : T + } + class Customer extends RecordBase { + - id : Long + - customerNumber : String + - firstName : String + - lastName : String + - List orders + + getId() : Long + + setId(Long id) : void + + getCustomerNumber() : String + + setCustomerNumber(String customerNumber) : void + + getfirstName() : String + + setFirstName(String firstName) : void + + getLastName() : String + + setLastName(String lastName) : void + + findByNumber(String customerNumber) : Customer + + addOrder(Order order) : void + } + + class Order extends RecordBase { + - id : Long + - orderNumber : String + + getId() : Long + + setId(Long id) : void + + getOrderNumber() : String + + setOrderNumber(String orderNumber) : String + } +} @enduml \ No newline at end of file