Skip to content

Commit

Permalink
Cambio nombre de paquete carrito a modelo
Browse files Browse the repository at this point in the history
  • Loading branch information
Juancard committed Dec 4, 2015
1 parent d8fe156 commit 2eed638
Show file tree
Hide file tree
Showing 26 changed files with 122 additions and 103 deletions.
49 changes: 24 additions & 25 deletions UML.ucls
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.8" icons="true" always-add-relationships="false" generalizations="true" realizations="true"
associations="true" dependencies="false" nesting-relationships="true">
<class id="1" language="java" name="carrito.Cliente" project="CarritoCompras"
file="/CarritoCompras/src/carrito/Cliente.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="132" y="964"/>
<class id="1" language="java" name="modelo.Cliente" project="CarritoCompras"
file="/CarritoCompras/src/modelo/Cliente.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="101" y="945"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="2" language="java" name="carrito.Producto" project="CarritoCompras"
file="/CarritoCompras/src/carrito/Producto.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="363" y="665"/>
<class id="2" language="java" name="modelo.Producto" project="CarritoCompras"
file="/CarritoCompras/src/modelo/Producto.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="364" y="624"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="3" language="java" name="carrito.CarritoCompras" project="CarritoCompras"
file="/CarritoCompras/src/carrito/CarritoCompras.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="344" y="364"/>
<class id="3" language="java" name="modelo.CarritoCompras" project="CarritoCompras"
file="/CarritoCompras/src/modelo/CarritoCompras.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="352" y="335"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="4" language="java" name="carrito.DetalleVenta" project="CarritoCompras"
file="/CarritoCompras/src/carrito/DetalleVenta.java" binary="false" corner="BOTTOM_RIGHT">
<class id="4" language="java" name="modelo.DetalleVenta" project="CarritoCompras"
file="/CarritoCompras/src/modelo/DetalleVenta.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="102" y="621"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
Expand All @@ -39,7 +39,7 @@
</class>
<class id="5" language="java" name="vista.VistaPrincipal" project="CarritoCompras"
file="/CarritoCompras/src/vista/VistaPrincipal.java" binary="false" corner="BOTTOM_RIGHT">
<position height="279" width="280" x="519" y="178"/>
<position height="279" width="280" x="513" y="172"/>
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
Expand Down Expand Up @@ -91,9 +91,9 @@
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<class id="11" language="java" name="carrito.Venta" project="CarritoCompras"
file="/CarritoCompras/src/carrito/Venta.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="444" y="960"/>
<class id="11" language="java" name="modelo.Venta" project="CarritoCompras"
file="/CarritoCompras/src/modelo/Venta.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="359" y="914"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
Expand All @@ -120,7 +120,7 @@
</class>
<class id="14" language="java" name="controlador.ControladorCliente" project="CarritoCompras"
file="/CarritoCompras/src/controlador/ControladorCliente.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="656" y="772"/>
<position height="-1" width="-1" x="578" y="771"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
Expand All @@ -129,7 +129,7 @@
</class>
<class id="15" language="java" name="controlador.ControladorCarrito" project="CarritoCompras"
file="/CarritoCompras/src/controlador/ControladorCarrito.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="651" y="568"/>
<position height="-1" width="-1" x="603" y="564"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
Expand Down Expand Up @@ -206,10 +206,10 @@
<association id="35">
<end type="SOURCE" refId="11" navigable="false">
<attribute id="36" name="cliente">
<position height="0" width="0" x="-1052" y="3"/>
<position height="0" width="0" x="-1083" y="-16"/>
</attribute>
<multiplicity id="37" minimum="0" maximum="1">
<position height="0" width="0" x="-1052" y="3"/>
<position height="0" width="0" x="-1083" y="-16"/>
</multiplicity>
</end>
<end type="TARGET" refId="1" navigable="true"/>
Expand All @@ -218,10 +218,10 @@
<association id="38">
<end type="SOURCE" refId="4" navigable="false">
<attribute id="39" name="producto">
<position height="0" width="0" x="-160" y="-248"/>
<position height="0" width="0" x="-159" y="-289"/>
</attribute>
<multiplicity id="40" minimum="0" maximum="1">
<position height="0" width="0" x="-160" y="-248"/>
<position height="0" width="0" x="-159" y="-289"/>
</multiplicity>
</end>
<end type="TARGET" refId="2" navigable="true"/>
Expand All @@ -236,13 +236,12 @@
<display labels="true" multiplicity="true"/>
</association>
<association id="44">
<bendpoint x="291" y="813"/>
<end type="SOURCE" refId="4" navigable="false">
<attribute id="45" name="venta">
<position height="0" width="0" x="-540" y="0"/>
<position height="0" width="0" x="-625" y="-46"/>
</attribute>
<multiplicity id="46" minimum="0" maximum="1">
<position height="0" width="0" x="-540" y="0"/>
<position height="0" width="0" x="-625" y="-46"/>
</multiplicity>
</end>
<end type="TARGET" refId="11" navigable="true"/>
Expand Down Expand Up @@ -273,7 +272,7 @@
<display labels="true" multiplicity="true"/>
</association>
<association id="53">
<bendpoint x="329" y="120"/>
<bendpoint x="324" y="115"/>
<end type="SOURCE" refId="5" navigable="false">
<attribute id="54" name="tablaCarrito">
<position height="0" width="0" x="-345" y="-387"/>
Expand Down
12 changes: 6 additions & 6 deletions src/controlador/ControladorCarrito.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import carrito.CarritoCompras;
import carrito.Cliente;
import carrito.DetalleVenta;
import carrito.Producto;
import carrito.Venta;
import carrito.VentaBD;
import modelo.CarritoCompras;
import modelo.Cliente;
import modelo.DetalleVenta;
import modelo.Producto;
import modelo.Venta;
import modelo.VentaBD;
import vista.InterfazVista;

public class ControladorCarrito implements ActionListener{
Expand Down
7 changes: 3 additions & 4 deletions src/controlador/ControladorCliente.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import carrito.Cliente;
import carrito.ClienteBD;
import modelo.Cliente;
import modelo.ClienteBD;
import vista.InterfazVista;

public class ControladorCliente implements ActionListener {
Expand Down Expand Up @@ -33,8 +33,7 @@ public void actionPerformed(ActionEvent evento) {
if(accion.equals(InterfazVista.INSERTAR_CLIENTE)){
vista.abrirFormularioCliente(accion,this);
vista.setValoresDefectoCliente("AUTOGENERADO", "");
}
if(accion.equals(vista.CONFIRMAR_INSERTAR_CLIENTE)){
} else if(accion.equals(vista.CONFIRMAR_INSERTAR_CLIENTE)){
confirmarInsertarCliente();
} else if(accion.equals(vista.CANCELAR_INSERTAR_CLIENTE)){
vista.cerrarFormulario(vista.INSERTAR_CLIENTE);
Expand Down
4 changes: 2 additions & 2 deletions src/controlador/ControladorProducto.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import carrito.Producto;
import carrito.ProductoBD;
import modelo.Producto;
import modelo.ProductoBD;
import vista.InterfazVista;

public class ControladorProducto implements ActionListener {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;

import java.util.ArrayList;

Expand Down
4 changes: 2 additions & 2 deletions src/carrito/Cliente.java → src/modelo/Cliente.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package carrito;
package modelo;

import carrito.anotaciones.JTableConfig;
import modelo.anotaciones.JTableConfig;


public class Cliente {
Expand Down
2 changes: 1 addition & 1 deletion src/carrito/ClienteBD.java → src/modelo/ClienteBD.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;

import java.sql.*;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;

import java.sql.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;


public class DetalleVenta {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;

import java.sql.CallableStatement;
import java.sql.Connection;
Expand Down
4 changes: 2 additions & 2 deletions src/carrito/Producto.java → src/modelo/Producto.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package carrito;
package modelo;

import carrito.anotaciones.JTableConfig;
import modelo.anotaciones.JTableConfig;


public class Producto {
Expand Down
2 changes: 1 addition & 1 deletion src/carrito/ProductoBD.java → src/modelo/ProductoBD.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;
import java.sql.*;
import java.util.ArrayList;

Expand Down
2 changes: 1 addition & 1 deletion src/carrito/Venta.java → src/modelo/Venta.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;
import java.sql.Timestamp;

public class Venta {
Expand Down
2 changes: 1 addition & 1 deletion src/carrito/VentaBD.java → src/modelo/VentaBD.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito;
package modelo;

import java.sql.CallableStatement;
import java.sql.Connection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package carrito.anotaciones;
package modelo.anotaciones;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand Down
14 changes: 7 additions & 7 deletions src/tests/TestBD.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import java.util.ArrayList;

import carrito.Cliente;
import carrito.ClienteBD;
import carrito.DetalleVenta;
import carrito.Producto;
import carrito.ProductoBD;
import carrito.Venta;
import carrito.VentaBD;
import modelo.Cliente;
import modelo.ClienteBD;
import modelo.DetalleVenta;
import modelo.Producto;
import modelo.ProductoBD;
import modelo.Venta;
import modelo.VentaBD;
import junit.framework.Assert;


Expand Down
7 changes: 3 additions & 4 deletions src/tests/TestCarritoCompras.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package tests;

import junit.framework.Assert;
import modelo.CarritoCompras;
import modelo.DetalleVenta;
import modelo.Producto;

import org.junit.Test;

import carrito.CarritoCompras;
import carrito.DetalleVenta;
import carrito.Producto;

public class TestCarritoCompras {

@Test
Expand Down
3 changes: 1 addition & 2 deletions src/tests/TestCliente.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package tests;

import modelo.Cliente;
import junit.framework.Assert;

import carrito.Cliente;

public class TestCliente {

@org.junit.Test
Expand Down
5 changes: 2 additions & 3 deletions src/tests/TestDetalleVenta.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package tests;

import modelo.DetalleVenta;
import modelo.Producto;
import junit.framework.Assert;

import carrito.DetalleVenta;
import carrito.Producto;

public class TestDetalleVenta {

@org.junit.Test
Expand Down
3 changes: 1 addition & 2 deletions src/tests/TestProducto.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package tests;

import modelo.Producto;
import junit.framework.Assert;

import carrito.Producto;

public class TestProducto {

@org.junit.Test
Expand Down
5 changes: 2 additions & 3 deletions src/tests/TestVenta.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import java.sql.Timestamp;
import java.util.Date;

import modelo.Cliente;
import modelo.Venta;
import junit.framework.Assert;

import carrito.Cliente;
import carrito.Venta;

public class TestVenta {

@org.junit.Test
Expand Down
6 changes: 3 additions & 3 deletions src/vista/InterfazVista.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import java.util.ArrayList;

import carrito.Cliente;
import carrito.DetalleVenta;
import carrito.Producto;
import modelo.Cliente;
import modelo.DetalleVenta;
import modelo.Producto;
import controlador.ControladorCarrito;
import controlador.ControladorCliente;
import controlador.ControladorProducto;
Expand Down
2 changes: 1 addition & 1 deletion src/vista/TablaCarrito.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import javax.swing.table.AbstractTableModel;

import carrito.DetalleVenta;
import modelo.DetalleVenta;

public class TablaCarrito extends AbstractTableModel{

Expand Down
4 changes: 2 additions & 2 deletions src/vista/TablaModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import javax.swing.table.AbstractTableModel;

import carrito.anotaciones.JTableConfig;
import modelo.anotaciones.JTableConfig;

@SuppressWarnings("unchecked") // Permitir casteo a genérico
public class TablaModel<T> extends AbstractTableModel{
Expand Down Expand Up @@ -92,7 +92,7 @@ private void reflexion(String nombreGenerico) {
nombreColumnas[i] = f.getName();
getters[i] = null;
for (Annotation a : f.getAnnotations()){
if (a.toString().startsWith("@carrito.anotaciones.JTableConfig(")){
if (a.toString().startsWith("@modelo.anotaciones.JTableConfig(")){
nombreColumnas[i] = ((JTableConfig) a).nombre();
}
}
Expand Down
Loading

0 comments on commit 2eed638

Please sign in to comment.