From 2d2723d9cbf6a3596cd9b6dfabb7d50345c7880b Mon Sep 17 00:00:00 2001 From: Sergey Iryupin Date: Sun, 23 Jun 2024 15:36:19 +0200 Subject: [PATCH] java pizza project #2 update --- .../repository/db/CustomerDbRepository.java | 8 ++++---- .../repository/db/ExtComponentDbRepository.java | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/CustomerDbRepository.java b/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/CustomerDbRepository.java index b5a85da1..47da61be 100644 --- a/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/CustomerDbRepository.java +++ b/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/CustomerDbRepository.java @@ -25,10 +25,10 @@ public class CustomerDbRepository implements CrudRepository { /* CREATE TABLE IF NOT EXISTS customer ( - id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - name TEXT NOT NULL, - address TEXT, - phone TEXT + id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + name TEXT NOT NULL, + address TEXT, + phone TEXT ) */ diff --git a/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/ExtComponentDbRepository.java b/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/ExtComponentDbRepository.java index 2e4a9f08..bd72a6d2 100644 --- a/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/ExtComponentDbRepository.java +++ b/BerlinAIT/Cohort42.1project/JavaPizzaMvn/src/main/java/pizza/repository/db/ExtComponentDbRepository.java @@ -10,9 +10,24 @@ * Implementation of access methods to the ExtComponent data source * * @author Sergey Iryupin - * @version 22-Jun-24 + * @version 23-Jun-24 */ public class ExtComponentDbRepository implements CrudRepository { + + private String dbName; + + /* + CREATE TABLE IF NOT EXISTS ext_component ( + id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + name TEXT NOT NULL, + price INTEGER + ) + */ + + public ExtComponentDbRepository(String dbName) { + this.dbName = dbName; + } + @Override public ExtComponent save(ExtComponent value) { return null;