diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9b80b7c..2202e20 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,23 +4,13 @@
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
@@ -52,29 +42,30 @@
- {
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "last_opened_file_path": "C:/ProyectosInteliJ/CarreraRelevos",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.15",
+ "project.structure.side.proportion": "0.2",
+ "settings.editor.selected.configurable": "reference.settingsdialog.IDE.editor.colors.XML",
+ "spring.configuration.checksum": "dccd70c6d19ca6662595f61d544cf394"
}
-}]]>
+}
+
@@ -116,7 +107,9 @@
-
+
+
+
1669371969480
@@ -174,7 +167,14 @@
1669481268777
-
+
+ 1669492553112
+
+
+
+ 1669492553112
+
+
@@ -200,7 +200,8 @@
-
+
+
diff --git a/DiagramaProductoServicios.png b/DiagramaProductoServicios.png
new file mode 100644
index 0000000..94e7e2f
Binary files /dev/null and b/DiagramaProductoServicios.png differ
diff --git a/README.md b/README.md
index e940303..0abb525 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
# Servicio de productos
### Introduccion
Creo un SpringCore Con el servicio de consultar productos
-con sus precios y todas las caracteristicas.
+con sus precios y todas las caracteristicas.
+Añado más servicios aunque no los termino de utilizar en el main.
+Añado el diagrama en el proyecto y lo adjunto al README.md
### Documentacion
### Files
- *Parser* Clase que se encarga de leeer el archivo CSV donde estan guardados los datos
@@ -66,3 +68,8 @@ id=7
Process finished with exit code 0
~~~
+
+# Diagrama
+
+
+
diff --git a/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java b/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java
index 1fe76c9..a983181 100644
--- a/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java
+++ b/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java
@@ -13,14 +13,13 @@ import org.springframework.context.annotation.PropertySource;
public class AppConfig {
@Value("${file.path}")
private String file;
-
@Value("${file.csv.separator}")
private String separator;
+
public String getFile() {
return file;
}
-
public String getSeparator() {
return separator;
}
diff --git a/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java b/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java
index 62a49a7..ef964d6 100644
--- a/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java
+++ b/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java
@@ -11,7 +11,25 @@ public class ProductoService{
@Autowired
private ProductosDao productoDAO;
+ public Producto productoByPosition(int pos){
+ return productoDAO.findByIndex(pos);
+ }
+ public void insert(Producto producto){
+ productoDAO.insert(producto);
+ }
+ public void edit(int pos, Producto producto){
+ productoDAO.edit(pos,producto);
+ }
+ public void delete(int pos){
+ productoDAO.delete(pos);
+ }
+ public void delete(Producto producto){
+ productoDAO.delete(producto);
+ }
public Collection productoList(){
return productoDAO.findAll();
}
+
}
+
+
diff --git a/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java b/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java
index 25806d0..453434e 100644
--- a/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java
+++ b/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java
@@ -7,7 +7,6 @@ import java.util.Collection;
public interface ProductosDao {
Producto findByIndex(int index);
Collection findAll();
-
void insert(Producto producto);
void edit(int index, Producto producto);
void delete(int index);