Rename the project and the package name in config, db, models modules.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.config.env;
|
||||
package space.kklochko.spring_rest_example.config.env;
|
||||
|
||||
import io.github.cdimascio.dotenv.Dotenv;
|
||||
import lombok.Getter;
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package space.kklochko.jpa_hospital_example.config.factories;
|
||||
package space.kklochko.spring_rest_example.config.factories;
|
||||
|
||||
import lombok.NonNull;
|
||||
import space.kklochko.jpa_hospital_example.config.env.DataBaseEnvConfig;
|
||||
import space.kklochko.jpa_hospital_example.config.models.DataBaseConfig;
|
||||
import space.kklochko.spring_rest_example.config.env.DataBaseEnvConfig;
|
||||
import space.kklochko.spring_rest_example.config.models.DataBaseConfig;
|
||||
|
||||
public class LoadDataBaseConfigFromEnvFile {
|
||||
public DataBaseConfig load(@NonNull String filename) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.config.models;
|
||||
package space.kklochko.spring_rest_example.config.models;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.Properties;
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package space.kklochko.jpa_hospital_example.db.factories;
|
||||
package space.kklochko.spring_rest_example.db.factories;
|
||||
|
||||
import lombok.Setter;
|
||||
import space.kklochko.jpa_hospital_example.config.models.DataBaseConfig;
|
||||
import space.kklochko.spring_rest_example.config.models.DataBaseConfig;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.db.factories;
|
||||
package space.kklochko.spring_rest_example.db.factories;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.db.factories;
|
||||
package space.kklochko.spring_rest_example.db.factories;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
@@ -14,7 +14,7 @@ public class EntityManagerConnection {
|
||||
}
|
||||
|
||||
public EntityManagerConnection() {
|
||||
setUnitName("jpa_hospital_example");
|
||||
setUnitName("spring_rest_example");
|
||||
}
|
||||
|
||||
public EntityManager connect() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories;
|
||||
package space.kklochko.spring_rest_example.db.repositories;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import lombok.Setter;
|
||||
+6
-6
@@ -1,13 +1,13 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories;
|
||||
package space.kklochko.spring_rest_example.db.repositories;
|
||||
|
||||
import jakarta.persistence.EntityGraph;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.TypedQuery;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalInsert;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalRemove;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalUpdate;
|
||||
import space.kklochko.jpa_hospital_example.models.Department;
|
||||
import space.kklochko.jpa_hospital_example.models.Patient;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalInsert;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalRemove;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalUpdate;
|
||||
import space.kklochko.spring_rest_example.models.Department;
|
||||
import space.kklochko.spring_rest_example.models.Patient;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories;
|
||||
package space.kklochko.spring_rest_example.db.repositories;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.TypedQuery;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalInsert;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalRemove;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalUpdate;
|
||||
import space.kklochko.jpa_hospital_example.models.Indicator;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalInsert;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalRemove;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalUpdate;
|
||||
import space.kklochko.spring_rest_example.models.Indicator;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories;
|
||||
package space.kklochko.spring_rest_example.db.repositories;
|
||||
|
||||
import jakarta.persistence.EntityGraph;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.TypedQuery;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalInsert;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalRemove;
|
||||
import space.kklochko.jpa_hospital_example.db.repositories.blocks.TransactionalUpdate;
|
||||
import space.kklochko.jpa_hospital_example.models.Patient;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalInsert;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalRemove;
|
||||
import space.kklochko.spring_rest_example.db.repositories.blocks.TransactionalUpdate;
|
||||
import space.kklochko.spring_rest_example.models.Patient;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories.blocks;
|
||||
package space.kklochko.spring_rest_example.db.repositories.blocks;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
import jakarta.persistence.RollbackException;
|
||||
import space.kklochko.jpa_hospital_example.models.Department;
|
||||
import space.kklochko.jpa_hospital_example.models.Indicator;
|
||||
import space.kklochko.jpa_hospital_example.models.Patient;
|
||||
import space.kklochko.spring_rest_example.models.Department;
|
||||
import space.kklochko.spring_rest_example.models.Indicator;
|
||||
import space.kklochko.spring_rest_example.models.Patient;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories.blocks;
|
||||
package space.kklochko.spring_rest_example.db.repositories.blocks;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.RollbackException;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.db.repositories.blocks;
|
||||
package space.kklochko.spring_rest_example.db.repositories.blocks;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.RollbackException;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.models;
|
||||
package space.kklochko.spring_rest_example.models;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
+3
-1
@@ -1,8 +1,9 @@
|
||||
package space.kklochko.jpa_hospital_example.models;
|
||||
package space.kklochko.spring_rest_example.models;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.UUID;
|
||||
@@ -11,6 +12,7 @@ import java.util.UUID;
|
||||
@Entity
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Component
|
||||
public class Indicator {
|
||||
@Id
|
||||
@Column(nullable = true)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package space.kklochko.jpa_hospital_example.models;
|
||||
package space.kklochko.spring_rest_example.models;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
Reference in New Issue
Block a user