Agrege los modelos que faltaban
de paso corregi errores de los anteriors
This commit is contained in:
BIN
biblioteca.vpp
BIN
biblioteca.vpp
Binary file not shown.
@@ -324,7 +324,6 @@ create table arriendo
|
|||||||
fecha_devolucion_estimada date not null,
|
fecha_devolucion_estimada date not null,
|
||||||
fecha_devolucion_real date,
|
fecha_devolucion_real date,
|
||||||
multa int,
|
multa int,
|
||||||
costo_total int,
|
|
||||||
inserted_at timestamp default CURRENT_TIMESTAMP,
|
inserted_at timestamp default CURRENT_TIMESTAMP,
|
||||||
foreign key (trabajador_id) references trabajador (id) on delete restrict on update cascade,
|
foreign key (trabajador_id) references trabajador (id) on delete restrict on update cascade,
|
||||||
foreign key (cliente_id) references cliente (id) on delete restrict on update cascade
|
foreign key (cliente_id) references cliente (id) on delete restrict on update cascade
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package xyz.danielcortes.controllers.libro;
|
package xyz.danielcortes.controllers.libro;
|
||||||
|
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.swing.DefaultListModel;
|
import javax.swing.DefaultListModel;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
@@ -54,10 +53,40 @@ public class LibroCreateController extends BaseController {
|
|||||||
this.setupListeners();
|
this.setupListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private void loadIdiomasList() {
|
||||||
public void show() {
|
List<Idioma> idiomas = this.idiomaRepository.getAll();
|
||||||
this.reload();
|
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
|
||||||
this.view.getIsbnField().requestFocus();
|
model.clear();
|
||||||
|
for (Idioma idioma : idiomas) {
|
||||||
|
model.addElement(idioma);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadCategoriasList() {
|
||||||
|
List<Categoria> categorias = this.categoriaRepository.getAll();
|
||||||
|
DefaultListModel<Categoria> model = this.view.getCategoriasModel();
|
||||||
|
model.clear();
|
||||||
|
for (Categoria categoria : categorias) {
|
||||||
|
model.addElement(categoria);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadAutorList() {
|
||||||
|
List<Autor> autores = this.autorRepository.getAll();
|
||||||
|
DefaultListModel<Autor> model = this.view.getAutoresModel();
|
||||||
|
model.clear();
|
||||||
|
for (Autor autor : autores) {
|
||||||
|
model.addElement(autor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadEditorialCombo() {
|
||||||
|
List<Editorial> editoriales = this.editorialRepository.getAll();
|
||||||
|
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
|
||||||
|
combobox.removeAllItems();
|
||||||
|
for (Editorial editorial : editoriales) {
|
||||||
|
combobox.addItem(editorial);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupListeners() {
|
private void setupListeners() {
|
||||||
@@ -138,9 +167,9 @@ public class LibroCreateController extends BaseController {
|
|||||||
libro.setNumeroPaginas(Integer.parseInt(numeroPaginas));
|
libro.setNumeroPaginas(Integer.parseInt(numeroPaginas));
|
||||||
libro.setAnoPublicacion(Year.of(Integer.parseInt(anoPublicacion)));
|
libro.setAnoPublicacion(Year.of(Integer.parseInt(anoPublicacion)));
|
||||||
libro.setPrecioReferencia(Integer.parseInt(precioReferencial));
|
libro.setPrecioReferencia(Integer.parseInt(precioReferencial));
|
||||||
libro.setIdiomas(new HashSet<>(idiomas));
|
libro.setIdiomas(idiomas);
|
||||||
libro.setAutores(new HashSet<>(autores));
|
libro.setAutores(autores);
|
||||||
libro.setCategorias(new HashSet<>(categorias));
|
libro.setCategorias(categorias);
|
||||||
libro.setEditorial(editorial);
|
libro.setEditorial(editorial);
|
||||||
|
|
||||||
this.libroRepository.save(libro);
|
this.libroRepository.save(libro);
|
||||||
@@ -148,6 +177,12 @@ public class LibroCreateController extends BaseController {
|
|||||||
this.getParentController().showCard(PanelName.LIBRO_SEARCH);
|
this.getParentController().showCard(PanelName.LIBRO_SEARCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show() {
|
||||||
|
this.reload();
|
||||||
|
this.view.getIsbnField().requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
private void reload() {
|
private void reload() {
|
||||||
this.loadIdiomasList();
|
this.loadIdiomasList();
|
||||||
this.loadCategoriasList();
|
this.loadCategoriasList();
|
||||||
@@ -155,42 +190,6 @@ public class LibroCreateController extends BaseController {
|
|||||||
this.loadEditorialCombo();
|
this.loadEditorialCombo();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadIdiomasList() {
|
|
||||||
List<Idioma> idiomas = this.idiomaRepository.getAll();
|
|
||||||
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
|
|
||||||
model.clear();
|
|
||||||
for (Idioma idioma : idiomas) {
|
|
||||||
model.addElement(idioma);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadCategoriasList() {
|
|
||||||
List<Categoria> categorias = this.categoriaRepository.getAll();
|
|
||||||
DefaultListModel<Categoria> model = this.view.getCategoriasModel();
|
|
||||||
model.clear();
|
|
||||||
for (Categoria categoria : categorias) {
|
|
||||||
model.addElement(categoria);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadAutorList() {
|
|
||||||
List<Autor> autores = this.autorRepository.getAll();
|
|
||||||
DefaultListModel<Autor> model = this.view.getAutoresModel();
|
|
||||||
model.clear();
|
|
||||||
for (Autor autor : autores) {
|
|
||||||
model.addElement(autor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadEditorialCombo() {
|
|
||||||
List<Editorial> editoriales = this.editorialRepository.getAll();
|
|
||||||
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
|
|
||||||
combobox.removeAllItems();
|
|
||||||
for (Editorial editorial : editoriales) {
|
|
||||||
combobox.addItem(editorial);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BasePanel getView() {
|
public BasePanel getView() {
|
||||||
return this.view;
|
return this.view;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package xyz.danielcortes.controllers.libro;
|
package xyz.danielcortes.controllers.libro;
|
||||||
|
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.swing.DefaultListModel;
|
import javax.swing.DefaultListModel;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
@@ -49,43 +48,10 @@ public class LibroUpdateController extends BaseController {
|
|||||||
this.setupListeners();
|
this.setupListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLibro(Libro libro) {
|
|
||||||
this.libro = libro;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void show() {
|
|
||||||
this.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupListeners() {
|
private void setupListeners() {
|
||||||
this.view.getActualizarButton().addActionListener(e -> this.update());
|
this.view.getActualizarButton().addActionListener(e -> this.update());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillLibro() {
|
|
||||||
if (this.libro == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this.view.getIsbnField().setText(this.libro.getIsbn());
|
|
||||||
this.view.getTituloField().setText(this.libro.getTitulo());
|
|
||||||
this.view.getPaginasField().setText(String.valueOf(this.libro.getNumeroPaginas()));
|
|
||||||
this.view.getAnoPublicacionField().setText(String.valueOf(this.libro.getAnoPublicacion()));
|
|
||||||
this.view.getPrecioReferenciaField().setText(String.valueOf(this.libro.getPrecioReferencia()));
|
|
||||||
JListUtils.setSelectedValues(
|
|
||||||
this.view.getIdiomasList(),
|
|
||||||
this.libro.getIdiomas()
|
|
||||||
);
|
|
||||||
JListUtils.setSelectedValues(
|
|
||||||
this.view.getAutoresList(),
|
|
||||||
this.libro.getAutores()
|
|
||||||
);
|
|
||||||
JListUtils.setSelectedValues(
|
|
||||||
this.view.getCategoriasList(),
|
|
||||||
this.libro.getCategorias()
|
|
||||||
);
|
|
||||||
this.view.getEditorialCombo().setSelectedItem(this.libro.getEditorial());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void update() {
|
private void update() {
|
||||||
ValidationResult libroValidation = this.validator.validateLibro(this.libro);
|
ValidationResult libroValidation = this.validator.validateLibro(this.libro);
|
||||||
if (libroValidation.hasError()) {
|
if (libroValidation.hasError()) {
|
||||||
@@ -164,15 +130,24 @@ public class LibroUpdateController extends BaseController {
|
|||||||
this.libro.setNumeroPaginas(Integer.parseInt(numeroPaginas));
|
this.libro.setNumeroPaginas(Integer.parseInt(numeroPaginas));
|
||||||
this.libro.setAnoPublicacion(Year.of(Integer.parseInt(anoPublicacion)));
|
this.libro.setAnoPublicacion(Year.of(Integer.parseInt(anoPublicacion)));
|
||||||
this.libro.setPrecioReferencia(Integer.parseInt(precioReferencial));
|
this.libro.setPrecioReferencia(Integer.parseInt(precioReferencial));
|
||||||
this.libro.setIdiomas(new HashSet<>(idiomas));
|
this.libro.setIdiomas(idiomas);
|
||||||
this.libro.setAutores(new HashSet<>(autores));
|
this.libro.setAutores(autores);
|
||||||
this.libro.setCategorias(new HashSet<>(categorias));
|
this.libro.setCategorias(categorias);
|
||||||
this.libro.setEditorial(editorial);
|
this.libro.setEditorial(editorial);
|
||||||
|
|
||||||
this.libroRepository.update(this.libro);
|
this.libroRepository.update(this.libro);
|
||||||
this.getParentController().showCard(PanelName.LIBRO_SEARCH);
|
this.getParentController().showCard(PanelName.LIBRO_SEARCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLibro(Libro libro) {
|
||||||
|
this.libro = libro;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show() {
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
|
||||||
private void reload() {
|
private void reload() {
|
||||||
this.loadAutorList();
|
this.loadAutorList();
|
||||||
this.loadCategoriasList();
|
this.loadCategoriasList();
|
||||||
@@ -181,12 +156,12 @@ public class LibroUpdateController extends BaseController {
|
|||||||
this.fillLibro();
|
this.fillLibro();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadIdiomasList() {
|
private void loadAutorList() {
|
||||||
List<Idioma> idiomas = this.idiomaRepository.getAll();
|
List<Autor> autores = this.autorRepository.getAll();
|
||||||
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
|
DefaultListModel<Autor> model = this.view.getAutoresModel();
|
||||||
model.clear();
|
model.clear();
|
||||||
for (Idioma idioma : idiomas) {
|
for (Autor autor : autores) {
|
||||||
model.addElement(idioma);
|
model.addElement(autor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,15 +174,6 @@ public class LibroUpdateController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadAutorList() {
|
|
||||||
List<Autor> autores = this.autorRepository.getAll();
|
|
||||||
DefaultListModel<Autor> model = this.view.getAutoresModel();
|
|
||||||
model.clear();
|
|
||||||
for (Autor autor : autores) {
|
|
||||||
model.addElement(autor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadEditorialCombo() {
|
private void loadEditorialCombo() {
|
||||||
List<Editorial> editoriales = this.editorialRepository.getAll();
|
List<Editorial> editoriales = this.editorialRepository.getAll();
|
||||||
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
|
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
|
||||||
@@ -217,6 +183,39 @@ public class LibroUpdateController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadIdiomasList() {
|
||||||
|
List<Idioma> idiomas = this.idiomaRepository.getAll();
|
||||||
|
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
|
||||||
|
model.clear();
|
||||||
|
for (Idioma idioma : idiomas) {
|
||||||
|
model.addElement(idioma);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillLibro() {
|
||||||
|
if (this.libro == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.view.getIsbnField().setText(this.libro.getIsbn());
|
||||||
|
this.view.getTituloField().setText(this.libro.getTitulo());
|
||||||
|
this.view.getPaginasField().setText(String.valueOf(this.libro.getNumeroPaginas()));
|
||||||
|
this.view.getAnoPublicacionField().setText(String.valueOf(this.libro.getAnoPublicacion()));
|
||||||
|
this.view.getPrecioReferenciaField().setText(String.valueOf(this.libro.getPrecioReferencia()));
|
||||||
|
JListUtils.setSelectedValues(
|
||||||
|
this.view.getIdiomasList(),
|
||||||
|
this.libro.getIdiomas()
|
||||||
|
);
|
||||||
|
JListUtils.setSelectedValues(
|
||||||
|
this.view.getAutoresList(),
|
||||||
|
this.libro.getAutores()
|
||||||
|
);
|
||||||
|
JListUtils.setSelectedValues(
|
||||||
|
this.view.getCategoriasList(),
|
||||||
|
this.libro.getCategorias()
|
||||||
|
);
|
||||||
|
this.view.getEditorialCombo().setSelectedItem(this.libro.getEditorial());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BasePanel getView() {
|
public BasePanel getView() {
|
||||||
return this.view;
|
return this.view;
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
package xyz.danielcortes.controllers.libro;
|
package xyz.danielcortes.controllers.libro;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.swing.DefaultListModel;
|
import javax.swing.DefaultListModel;
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import xyz.danielcortes.controllers.LaunchController;
|
import xyz.danielcortes.controllers.LaunchController;
|
||||||
import xyz.danielcortes.framework.BaseController;
|
import xyz.danielcortes.framework.BaseController;
|
||||||
import xyz.danielcortes.framework.BasePanel;
|
import xyz.danielcortes.framework.BasePanel;
|
||||||
import xyz.danielcortes.framework.JListUtils;
|
|
||||||
import xyz.danielcortes.framework.PanelName;
|
import xyz.danielcortes.framework.PanelName;
|
||||||
import xyz.danielcortes.models.Autor;
|
import xyz.danielcortes.models.Autor;
|
||||||
import xyz.danielcortes.models.Categoria;
|
import xyz.danielcortes.models.Categoria;
|
||||||
import xyz.danielcortes.models.Editorial;
|
|
||||||
import xyz.danielcortes.models.Idioma;
|
import xyz.danielcortes.models.Idioma;
|
||||||
import xyz.danielcortes.models.Libro;
|
import xyz.danielcortes.models.Libro;
|
||||||
import xyz.danielcortes.repository.AutorRepository;
|
import xyz.danielcortes.repository.AutorRepository;
|
||||||
@@ -40,29 +36,48 @@ public class LibroViewController extends BaseController {
|
|||||||
this.setupListeners();
|
this.setupListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void show() {
|
|
||||||
this.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLibro(Libro libro) {
|
|
||||||
this.libro = libro;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupListeners() {
|
private void setupListeners() {
|
||||||
this.view.getVolverButton().addActionListener(e -> {
|
this.view.getVolverButton().addActionListener(e -> {
|
||||||
this.getParentController().showCard(PanelName.LIBRO_SEARCH);
|
this.getParentController().showCard(PanelName.LIBRO_SEARCH);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show() {
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
|
||||||
private void reload() {
|
private void reload() {
|
||||||
this.loadAutorList();
|
this.loadAutorList();
|
||||||
this.loadCategoriasList();
|
this.loadCategoriasList();
|
||||||
this.loadEditorialCombo();
|
|
||||||
this.loadIdiomasList();
|
this.loadIdiomasList();
|
||||||
this.fillLibro();
|
this.fillLibro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadAutorList() {
|
||||||
|
DefaultListModel<Autor> model = this.view.getAutoresModel();
|
||||||
|
model.clear();
|
||||||
|
for (Autor autor : this.libro.getAutores()) {
|
||||||
|
model.addElement(autor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadCategoriasList() {
|
||||||
|
DefaultListModel<Categoria> model = this.view.getCategoriasModel();
|
||||||
|
model.clear();
|
||||||
|
for (Categoria categoria : this.libro.getCategorias()) {
|
||||||
|
model.addElement(categoria);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadIdiomasList() {
|
||||||
|
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
|
||||||
|
model.clear();
|
||||||
|
for (Idioma idioma : this.libro.getIdiomas()) {
|
||||||
|
model.addElement(idioma);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void fillLibro() {
|
private void fillLibro() {
|
||||||
if (this.libro == null)
|
if (this.libro == null)
|
||||||
return;
|
return;
|
||||||
@@ -72,50 +87,15 @@ public class LibroViewController extends BaseController {
|
|||||||
this.view.getPaginasField().setText(String.valueOf(this.libro.getNumeroPaginas()));
|
this.view.getPaginasField().setText(String.valueOf(this.libro.getNumeroPaginas()));
|
||||||
this.view.getAnoPublicacionField().setText(String.valueOf(this.libro.getAnoPublicacion()));
|
this.view.getAnoPublicacionField().setText(String.valueOf(this.libro.getAnoPublicacion()));
|
||||||
this.view.getPrecioReferenciaField().setText(String.valueOf(this.libro.getPrecioReferencia()));
|
this.view.getPrecioReferenciaField().setText(String.valueOf(this.libro.getPrecioReferencia()));
|
||||||
JListUtils.setSelectedValues(this.view.getIdiomasList(), this.libro.getIdiomas());
|
this.view.getEditorialField().setText(this.libro.getEditorial().toString());
|
||||||
JListUtils.setSelectedValues(this.view.getAutoresList(), this.libro.getAutores());
|
|
||||||
JListUtils.setSelectedValues(this.view.getCategoriasList(), this.libro.getCategorias());
|
|
||||||
this.view.getEditorialCombo().setSelectedItem(this.libro.getEditorial());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadIdiomasList() {
|
|
||||||
List<Idioma> idiomas = this.idiomaRepository.getAll();
|
|
||||||
DefaultListModel<Idioma> model = this.view.getIdiomasModel();
|
|
||||||
model.clear();
|
|
||||||
for (Idioma idioma : idiomas) {
|
|
||||||
model.addElement(idioma);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadCategoriasList() {
|
|
||||||
List<Categoria> categorias = this.categoriaRepository.getAll();
|
|
||||||
DefaultListModel<Categoria> model = this.view.getCategoriasModel();
|
|
||||||
model.clear();
|
|
||||||
for (Categoria categoria : categorias) {
|
|
||||||
model.addElement(categoria);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadAutorList() {
|
|
||||||
List<Autor> autores = this.autorRepository.getAll();
|
|
||||||
DefaultListModel<Autor> model = this.view.getAutoresModel();
|
|
||||||
model.clear();
|
|
||||||
for (Autor autor : autores) {
|
|
||||||
model.addElement(autor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadEditorialCombo() {
|
|
||||||
List<Editorial> editoriales = this.editorialRepository.getAll();
|
|
||||||
JComboBox<Editorial> combobox = this.view.getEditorialCombo();
|
|
||||||
combobox.removeAllItems();
|
|
||||||
for (Editorial editorial : editoriales) {
|
|
||||||
combobox.addItem(editorial);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BasePanel getView() {
|
public BasePanel getView() {
|
||||||
return this.view;
|
return this.view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLibro(Libro libro) {
|
||||||
|
this.libro = libro;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package xyz.danielcortes.framework;
|
package xyz.danielcortes.framework;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.Collection;
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import javax.persistence.PersistenceException;
|
import javax.persistence.PersistenceException;
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ public abstract class BaseRepository<E> {
|
|||||||
this.em.getTransaction().commit();
|
this.em.getTransaction().commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delete(List<E> entities) {
|
public void delete(Collection<E> entities) {
|
||||||
this.em.getTransaction().begin();
|
this.em.getTransaction().begin();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package xyz.danielcortes.framework;
|
package xyz.danielcortes.framework;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.List;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.ListModel;
|
import javax.swing.ListModel;
|
||||||
|
|
||||||
public class JListUtils {
|
public class JListUtils {
|
||||||
public static void setSelectedValues(JList list, Set values) {
|
|
||||||
|
public static void setSelectedValues(JList list, List values) {
|
||||||
list.clearSelection();
|
list.clearSelection();
|
||||||
for (Object value : values) {
|
for (Object value : values) {
|
||||||
int index = getIndex(list.getModel(), value);
|
int index = getIndex(list.getModel(), value);
|
||||||
|
|||||||
154
src/main/java/xyz/danielcortes/models/Arriendo.java
Normal file
154
src/main/java/xyz/danielcortes/models/Arriendo.java
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.ManyToMany;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "arriendo")
|
||||||
|
public class Arriendo {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id", nullable = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "costo_arriendo", nullable = false)
|
||||||
|
private Integer costoArriendo;
|
||||||
|
|
||||||
|
@Column(name = "fecha_arriendo", nullable = false)
|
||||||
|
private LocalDate fechaArriendo;
|
||||||
|
|
||||||
|
@Column(name = "fecha_devolucion_estimada", nullable = false)
|
||||||
|
private LocalDate fechaDevolucionEstimada;
|
||||||
|
|
||||||
|
@Column(name = "fecha_devolucion_real")
|
||||||
|
private LocalDate fechaDevolucionReal;
|
||||||
|
|
||||||
|
@Column(name = "multa")
|
||||||
|
private Integer multa;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "trabajador_id", nullable = false)
|
||||||
|
private Trabajador trabajador;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "cliente_id", nullable = false)
|
||||||
|
private Trabajador Cliente;
|
||||||
|
|
||||||
|
@ManyToMany
|
||||||
|
@JoinTable(
|
||||||
|
name = "ejemplar_arriendo",
|
||||||
|
joinColumns = @JoinColumn(name = "arriendo_id", referencedColumnName = "id"),
|
||||||
|
inverseJoinColumns = @JoinColumn(name = "ejemplar_id", referencedColumnName = "id"))
|
||||||
|
private List<Ejemplar> ejemplares;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCostoArriendo() {
|
||||||
|
return this.costoArriendo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostoArriendo(Integer costoArriendo) {
|
||||||
|
this.costoArriendo = costoArriendo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getFechaArriendo() {
|
||||||
|
return this.fechaArriendo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaArriendo(LocalDate fechaArriendo) {
|
||||||
|
this.fechaArriendo = fechaArriendo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getFechaDevolucionEstimada() {
|
||||||
|
return this.fechaDevolucionEstimada;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaDevolucionEstimada(LocalDate fechaDevolucionEstimada) {
|
||||||
|
this.fechaDevolucionEstimada = fechaDevolucionEstimada;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getFechaDevolucionReal() {
|
||||||
|
return this.fechaDevolucionReal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaDevolucionReal(LocalDate fechaDevolucionReal) {
|
||||||
|
this.fechaDevolucionReal = fechaDevolucionReal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMulta() {
|
||||||
|
return this.multa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMulta(Integer multa) {
|
||||||
|
this.multa = multa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Trabajador getTrabajador() {
|
||||||
|
return this.trabajador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrabajador(Trabajador trabajador) {
|
||||||
|
this.trabajador = trabajador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Trabajador getCliente() {
|
||||||
|
return this.Cliente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCliente(Trabajador cliente) {
|
||||||
|
this.Cliente = cliente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ejemplar> getEjemplares() {
|
||||||
|
if (this.ejemplares == null)
|
||||||
|
this.ejemplares = new ArrayList<>();
|
||||||
|
return this.ejemplares;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEjemplares(List<Ejemplar> ejemplares) {
|
||||||
|
this.ejemplares = ejemplares;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.costoArriendo, this.fechaArriendo, this.fechaDevolucionEstimada, this.fechaDevolucionReal, this.multa,
|
||||||
|
this.trabajador, this.Cliente, this.ejemplares);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Arriendo))
|
||||||
|
return false;
|
||||||
|
Arriendo arriendo = (Arriendo) o;
|
||||||
|
return Objects.equals(this.id, arriendo.id) &&
|
||||||
|
Objects.equals(this.costoArriendo, arriendo.costoArriendo) &&
|
||||||
|
Objects.equals(this.fechaArriendo, arriendo.fechaArriendo) &&
|
||||||
|
Objects.equals(this.fechaDevolucionEstimada, arriendo.fechaDevolucionEstimada) &&
|
||||||
|
Objects.equals(this.fechaDevolucionReal, arriendo.fechaDevolucionReal) &&
|
||||||
|
Objects.equals(this.multa, arriendo.multa) &&
|
||||||
|
Objects.equals(this.trabajador, arriendo.trabajador) &&
|
||||||
|
Objects.equals(this.Cliente, arriendo.Cliente) &&
|
||||||
|
Objects.equals(this.ejemplares, arriendo.ejemplares);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -29,7 +30,7 @@ public class Autor {
|
|||||||
private String apellidoMaterno;
|
private String apellidoMaterno;
|
||||||
|
|
||||||
@ManyToMany(mappedBy = "autores")
|
@ManyToMany(mappedBy = "autores")
|
||||||
private Set<Libro> libros;
|
private List<Libro> libros;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
@@ -63,17 +64,36 @@ public class Autor {
|
|||||||
this.apellidoMaterno = apellidoMaterno;
|
this.apellidoMaterno = apellidoMaterno;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Libro> getLibros() {
|
public List<Libro> getLibros() {
|
||||||
if (this.libros == null) {
|
if (this.libros == null) {
|
||||||
this.libros = new HashSet<>();
|
this.libros = new ArrayList<>();
|
||||||
}
|
}
|
||||||
return this.libros;
|
return this.libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLibros(Set<Libro> libros) {
|
public void setLibros(List<Libro> libros) {
|
||||||
this.libros = libros;
|
this.libros = libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.nombre, this.apellidoPaterno, this.apellidoMaterno, this.libros);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Autor))
|
||||||
|
return false;
|
||||||
|
Autor autor = (Autor) o;
|
||||||
|
return Objects.equals(this.id, autor.id) &&
|
||||||
|
Objects.equals(this.nombre, autor.nombre) &&
|
||||||
|
Objects.equals(this.apellidoPaterno, autor.apellidoPaterno) &&
|
||||||
|
Objects.equals(this.apellidoMaterno, autor.apellidoMaterno) &&
|
||||||
|
Objects.equals(this.libros, autor.libros);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.nombre + " " + this.apellidoPaterno + " " + this.apellidoMaterno;
|
return this.nombre + " " + this.apellidoPaterno + " " + this.apellidoMaterno;
|
||||||
|
|||||||
108
src/main/java/xyz/danielcortes/models/Boleta.java
Normal file
108
src/main/java/xyz/danielcortes/models/Boleta.java
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "boleta")
|
||||||
|
public class Boleta {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "folio")
|
||||||
|
private String folio;
|
||||||
|
|
||||||
|
@Column(name = "precio_neto")
|
||||||
|
private Integer precioNeto;
|
||||||
|
|
||||||
|
@Column(name = "precio_iva")
|
||||||
|
private Integer precioIVA;
|
||||||
|
|
||||||
|
@Column(name = "fecha_venta")
|
||||||
|
private LocalDate fechaVenta;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "boleta")
|
||||||
|
private List<Venta> ventas;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFolio() {
|
||||||
|
return this.folio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFolio(String folio) {
|
||||||
|
this.folio = folio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrecioNeto() {
|
||||||
|
return this.precioNeto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrecioNeto(Integer precioNeto) {
|
||||||
|
this.precioNeto = precioNeto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrecioIVA() {
|
||||||
|
return this.precioIVA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrecioIVA(Integer precioIVA) {
|
||||||
|
this.precioIVA = precioIVA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getFechaVenta() {
|
||||||
|
return this.fechaVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaVenta(LocalDate fechaVenta) {
|
||||||
|
this.fechaVenta = fechaVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Venta> getVentas() {
|
||||||
|
if (this.ventas == null)
|
||||||
|
this.ventas = new ArrayList<>();
|
||||||
|
return this.ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVentas(List<Venta> ventas) {
|
||||||
|
this.ventas = ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.folio, this.precioNeto, this.precioIVA, this.fechaVenta, this.ventas);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Boleta))
|
||||||
|
return false;
|
||||||
|
Boleta boleta = (Boleta) o;
|
||||||
|
return Objects.equals(this.id, boleta.id) &&
|
||||||
|
Objects.equals(this.folio, boleta.folio) &&
|
||||||
|
Objects.equals(this.precioNeto, boleta.precioNeto) &&
|
||||||
|
Objects.equals(this.precioIVA, boleta.precioIVA) &&
|
||||||
|
Objects.equals(this.fechaVenta, boleta.fechaVenta) &&
|
||||||
|
Objects.equals(this.ventas, boleta.ventas);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -23,7 +24,7 @@ public class Categoria {
|
|||||||
private String nombre;
|
private String nombre;
|
||||||
|
|
||||||
@ManyToMany(mappedBy = "categorias")
|
@ManyToMany(mappedBy = "categorias")
|
||||||
private Set<Libro> libros;
|
private List<Libro> libros;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
@@ -41,17 +42,34 @@ public class Categoria {
|
|||||||
this.nombre = nombre;
|
this.nombre = nombre;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Libro> getLibros() {
|
public List<Libro> getLibros() {
|
||||||
if (this.libros == null) {
|
if (this.libros == null) {
|
||||||
this.libros = new HashSet<>();
|
this.libros = new ArrayList<>();
|
||||||
}
|
}
|
||||||
return this.libros;
|
return this.libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLibros(Set<Libro> libros) {
|
public void setLibros(List<Libro> libros) {
|
||||||
this.libros = libros;
|
this.libros = libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.nombre, this.libros);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Categoria))
|
||||||
|
return false;
|
||||||
|
Categoria categoria = (Categoria) o;
|
||||||
|
return Objects.equals(this.id, categoria.id) &&
|
||||||
|
Objects.equals(this.nombre, categoria.nombre) &&
|
||||||
|
Objects.equals(this.libros, categoria.libros);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.nombre;
|
return this.nombre;
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ package xyz.danielcortes.models;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@@ -44,6 +46,9 @@ public class Cliente {
|
|||||||
@ManyToMany(mappedBy = "clientes")
|
@ManyToMany(mappedBy = "clientes")
|
||||||
private List<Direccion> direcciones;
|
private List<Direccion> direcciones;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "cliente")
|
||||||
|
private List<Venta> ventas;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
@@ -121,4 +126,40 @@ public class Cliente {
|
|||||||
public void setDirecciones(List<Direccion> direcciones) {
|
public void setDirecciones(List<Direccion> direcciones) {
|
||||||
this.direcciones = direcciones;
|
this.direcciones = direcciones;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Venta> getVentas() {
|
||||||
|
if (this.ventas == null)
|
||||||
|
this.ventas = new ArrayList<>();
|
||||||
|
return this.ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVentas(List<Venta> ventas) {
|
||||||
|
this.ventas = ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.rut, this.nombre, this.apellidoPaterno, this.apellidoMaterno, this.fechaNacimiento, this.correos,
|
||||||
|
this.telefonos,
|
||||||
|
this.direcciones, this.ventas);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Cliente))
|
||||||
|
return false;
|
||||||
|
Cliente cliente = (Cliente) o;
|
||||||
|
return Objects.equals(this.id, cliente.id) &&
|
||||||
|
Objects.equals(this.rut, cliente.rut) &&
|
||||||
|
Objects.equals(this.nombre, cliente.nombre) &&
|
||||||
|
Objects.equals(this.apellidoPaterno, cliente.apellidoPaterno) &&
|
||||||
|
Objects.equals(this.apellidoMaterno, cliente.apellidoMaterno) &&
|
||||||
|
Objects.equals(this.fechaNacimiento, cliente.fechaNacimiento) &&
|
||||||
|
Objects.equals(this.correos, cliente.correos) &&
|
||||||
|
Objects.equals(this.telefonos, cliente.telefonos) &&
|
||||||
|
Objects.equals(this.direcciones, cliente.direcciones) &&
|
||||||
|
Objects.equals(this.ventas, cliente.ventas);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
92
src/main/java/xyz/danielcortes/models/Compra.java
Normal file
92
src/main/java/xyz/danielcortes/models/Compra.java
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.ManyToMany;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "compra")
|
||||||
|
public class Compra {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "factura_id")
|
||||||
|
private Factura factura;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "distribuidor_id")
|
||||||
|
private Distribuidor distribuidor;
|
||||||
|
|
||||||
|
@ManyToMany
|
||||||
|
@JoinTable(
|
||||||
|
name = "ejemplar_compra",
|
||||||
|
joinColumns = @JoinColumn(name = "compra_id", referencedColumnName = "id"),
|
||||||
|
inverseJoinColumns = @JoinColumn(name = "ejemplar_id", referencedColumnName = "id"))
|
||||||
|
private List<Ejemplar> ejemplares;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Factura getFactura() {
|
||||||
|
return this.factura;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFactura(Factura factura) {
|
||||||
|
this.factura = factura;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Distribuidor getDistribuidor() {
|
||||||
|
return this.distribuidor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistribuidor(Distribuidor distribuidor) {
|
||||||
|
this.distribuidor = distribuidor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ejemplar> getEjemplares() {
|
||||||
|
if (this.ejemplares == null)
|
||||||
|
this.ejemplares = new ArrayList<>();
|
||||||
|
return this.ejemplares;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEjemplares(List<Ejemplar> ejemplares) {
|
||||||
|
this.ejemplares = ejemplares;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.factura, this.distribuidor, this.ejemplares);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Compra))
|
||||||
|
return false;
|
||||||
|
Compra compra = (Compra) o;
|
||||||
|
return Objects.equals(this.id, compra.id) &&
|
||||||
|
Objects.equals(this.factura, compra.factura) &&
|
||||||
|
Objects.equals(this.distribuidor, compra.distribuidor) &&
|
||||||
|
Objects.equals(this.ejemplares, compra.ejemplares);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package xyz.danielcortes.models;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -94,4 +95,23 @@ public class Correo {
|
|||||||
public void setClientes(List<Cliente> clientes) {
|
public void setClientes(List<Cliente> clientes) {
|
||||||
this.clientes = clientes;
|
this.clientes = clientes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.correo, this.trabajadores, this.distribuidores, this.clientes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Correo))
|
||||||
|
return false;
|
||||||
|
Correo correo1 = (Correo) o;
|
||||||
|
return Objects.equals(this.id, correo1.id) &&
|
||||||
|
Objects.equals(this.correo, correo1.correo) &&
|
||||||
|
Objects.equals(this.trabajadores, correo1.trabajadores) &&
|
||||||
|
Objects.equals(this.distribuidores, correo1.distribuidores) &&
|
||||||
|
Objects.equals(this.clientes, correo1.clientes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package xyz.danielcortes.models;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -105,4 +106,24 @@ public class Direccion {
|
|||||||
public void setClientes(List<Cliente> clientes) {
|
public void setClientes(List<Cliente> clientes) {
|
||||||
this.clientes = clientes;
|
this.clientes = clientes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.calle, this.numero, this.trabajadores, this.distribuidores, this.clientes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Direccion))
|
||||||
|
return false;
|
||||||
|
Direccion direccion = (Direccion) o;
|
||||||
|
return Objects.equals(this.id, direccion.id) &&
|
||||||
|
Objects.equals(this.calle, direccion.calle) &&
|
||||||
|
Objects.equals(this.numero, direccion.numero) &&
|
||||||
|
Objects.equals(this.trabajadores, direccion.trabajadores) &&
|
||||||
|
Objects.equals(this.distribuidores, direccion.distribuidores) &&
|
||||||
|
Objects.equals(this.clientes, direccion.clientes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -9,6 +11,7 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@@ -35,6 +38,9 @@ public class Distribuidor {
|
|||||||
@ManyToMany(mappedBy = "distribuidores")
|
@ManyToMany(mappedBy = "distribuidores")
|
||||||
private List<Direccion> direcciones;
|
private List<Direccion> direcciones;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "distribuidor")
|
||||||
|
private List<Compra> compras;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
@@ -60,6 +66,8 @@ public class Distribuidor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Correo> getCorreos() {
|
public List<Correo> getCorreos() {
|
||||||
|
if (this.correos == null)
|
||||||
|
this.correos = new ArrayList<>();
|
||||||
return this.correos;
|
return this.correos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,6 +76,8 @@ public class Distribuidor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Telefono> getTelefonos() {
|
public List<Telefono> getTelefonos() {
|
||||||
|
if (this.telefonos == null)
|
||||||
|
this.telefonos = new ArrayList<>();
|
||||||
return this.telefonos;
|
return this.telefonos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,10 +86,44 @@ public class Distribuidor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Direccion> getDirecciones() {
|
public List<Direccion> getDirecciones() {
|
||||||
|
if (this.direcciones == null)
|
||||||
|
this.direcciones = new ArrayList<>();
|
||||||
|
|
||||||
return this.direcciones;
|
return this.direcciones;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDirecciones(List<Direccion> direcciones) {
|
public void setDirecciones(List<Direccion> direcciones) {
|
||||||
this.direcciones = direcciones;
|
this.direcciones = direcciones;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Compra> getCompras() {
|
||||||
|
if (this.compras == null)
|
||||||
|
this.compras = new ArrayList<>();
|
||||||
|
return this.compras;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompras(List<Compra> compras) {
|
||||||
|
this.compras = compras;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.rut, this.empresa, this.correos, this.telefonos, this.direcciones, this.compras);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Distribuidor))
|
||||||
|
return false;
|
||||||
|
Distribuidor that = (Distribuidor) o;
|
||||||
|
return Objects.equals(this.id, that.id) &&
|
||||||
|
Objects.equals(this.rut, that.rut) &&
|
||||||
|
Objects.equals(this.empresa, that.empresa) &&
|
||||||
|
Objects.equals(this.correos, that.correos) &&
|
||||||
|
Objects.equals(this.telefonos, that.telefonos) &&
|
||||||
|
Objects.equals(this.direcciones, that.direcciones) &&
|
||||||
|
Objects.equals(this.compras, that.compras);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -52,6 +53,23 @@ public class Editorial {
|
|||||||
this.libros = libros;
|
this.libros = libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.nombre, this.libros);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Editorial))
|
||||||
|
return false;
|
||||||
|
Editorial editorial = (Editorial) o;
|
||||||
|
return Objects.equals(this.id, editorial.id) &&
|
||||||
|
Objects.equals(this.nombre, editorial.nombre) &&
|
||||||
|
Objects.equals(this.libros, editorial.libros);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.nombre;
|
return this.nombre;
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@@ -29,6 +33,15 @@ public class Ejemplar {
|
|||||||
@JoinColumn(name = "estado_id")
|
@JoinColumn(name = "estado_id")
|
||||||
private Estado estado;
|
private Estado estado;
|
||||||
|
|
||||||
|
@ManyToMany(mappedBy = "ejemplares")
|
||||||
|
private List<Arriendo> arriendos;
|
||||||
|
|
||||||
|
@ManyToMany(mappedBy = "ejemplares")
|
||||||
|
private List<Compra> compras;
|
||||||
|
|
||||||
|
@ManyToMany(mappedBy = "ejemplares")
|
||||||
|
private List<Venta> ventas;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
@@ -62,6 +75,57 @@ public class Ejemplar {
|
|||||||
this.estado = estado;
|
this.estado = estado;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Arriendo> getArriendos() {
|
||||||
|
if (this.arriendos == null)
|
||||||
|
this.arriendos = new ArrayList<>();
|
||||||
|
return this.arriendos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArriendos(List<Arriendo> arriendos) {
|
||||||
|
this.arriendos = arriendos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Compra> getCompras() {
|
||||||
|
if (this.compras == null)
|
||||||
|
this.compras = new ArrayList<>();
|
||||||
|
return this.compras;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompras(List<Compra> compras) {
|
||||||
|
this.compras = compras;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Venta> getVentas() {
|
||||||
|
if (this.ventas == null)
|
||||||
|
this.ventas = new ArrayList<>();
|
||||||
|
return this.ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVentas(List<Venta> ventas) {
|
||||||
|
this.ventas = ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.serie, this.libro, this.estado, this.arriendos, this.compras, this.ventas);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Ejemplar))
|
||||||
|
return false;
|
||||||
|
Ejemplar ejemplar = (Ejemplar) o;
|
||||||
|
return Objects.equals(this.id, ejemplar.id) &&
|
||||||
|
Objects.equals(this.serie, ejemplar.serie) &&
|
||||||
|
Objects.equals(this.libro, ejemplar.libro) &&
|
||||||
|
Objects.equals(this.estado, ejemplar.estado) &&
|
||||||
|
Objects.equals(this.arriendos, ejemplar.arriendos) &&
|
||||||
|
Objects.equals(this.compras, ejemplar.compras) &&
|
||||||
|
Objects.equals(this.ventas, ejemplar.ventas);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.serie + " " + this.estado.getNombre();
|
return this.serie + " " + this.estado.getNombre();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package xyz.danielcortes.models;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -52,6 +53,23 @@ public class Empresa {
|
|||||||
this.distribuidores = distribuidores;
|
this.distribuidores = distribuidores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.nombre, this.distribuidores);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Empresa))
|
||||||
|
return false;
|
||||||
|
Empresa empresa = (Empresa) o;
|
||||||
|
return Objects.equals(this.id, empresa.id) &&
|
||||||
|
Objects.equals(this.nombre, empresa.nombre) &&
|
||||||
|
Objects.equals(this.distribuidores, empresa.distribuidores);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.nombre;
|
return this.nombre;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -52,6 +53,23 @@ public class Estado {
|
|||||||
this.ejemplares = ejemplares;
|
this.ejemplares = ejemplares;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.nombre, this.ejemplares);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Estado))
|
||||||
|
return false;
|
||||||
|
Estado estado = (Estado) o;
|
||||||
|
return Objects.equals(this.id, estado.id) &&
|
||||||
|
Objects.equals(this.nombre, estado.nombre) &&
|
||||||
|
Objects.equals(this.ejemplares, estado.ejemplares);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.nombre;
|
return this.nombre;
|
||||||
|
|||||||
108
src/main/java/xyz/danielcortes/models/Factura.java
Normal file
108
src/main/java/xyz/danielcortes/models/Factura.java
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "factura")
|
||||||
|
public class Factura {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "folio")
|
||||||
|
private String folio;
|
||||||
|
|
||||||
|
@Column(name = "precio_neto")
|
||||||
|
private Integer precioNeto;
|
||||||
|
|
||||||
|
@Column(name = "precio_iva")
|
||||||
|
private Integer precioIVA;
|
||||||
|
|
||||||
|
@Column(name = "fecha_compra")
|
||||||
|
private LocalDate fechaVenta;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "factura")
|
||||||
|
private List<Compra> compras;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFolio() {
|
||||||
|
return this.folio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFolio(String folio) {
|
||||||
|
this.folio = folio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrecioNeto() {
|
||||||
|
return this.precioNeto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrecioNeto(Integer precioNeto) {
|
||||||
|
this.precioNeto = precioNeto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrecioIVA() {
|
||||||
|
return this.precioIVA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrecioIVA(Integer precioIVA) {
|
||||||
|
this.precioIVA = precioIVA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getFechaVenta() {
|
||||||
|
return this.fechaVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaVenta(LocalDate fechaVenta) {
|
||||||
|
this.fechaVenta = fechaVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Compra> getCompras() {
|
||||||
|
if (this.compras == null)
|
||||||
|
this.compras = new ArrayList<>();
|
||||||
|
return this.compras;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompras(List<Compra> compras) {
|
||||||
|
this.compras = compras;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.folio, this.precioNeto, this.precioIVA, this.fechaVenta, this.compras);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Factura))
|
||||||
|
return false;
|
||||||
|
Factura factura = (Factura) o;
|
||||||
|
return Objects.equals(this.id, factura.id) &&
|
||||||
|
Objects.equals(this.folio, factura.folio) &&
|
||||||
|
Objects.equals(this.precioNeto, factura.precioNeto) &&
|
||||||
|
Objects.equals(this.precioIVA, factura.precioIVA) &&
|
||||||
|
Objects.equals(this.fechaVenta, factura.fechaVenta) &&
|
||||||
|
Objects.equals(this.compras, factura.compras);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -23,7 +24,7 @@ public class Idioma {
|
|||||||
private String nombre;
|
private String nombre;
|
||||||
|
|
||||||
@ManyToMany(mappedBy = "idiomas")
|
@ManyToMany(mappedBy = "idiomas")
|
||||||
private Set<Libro> libros;
|
private List<Libro> libros;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
@@ -41,17 +42,34 @@ public class Idioma {
|
|||||||
this.nombre = nombre;
|
this.nombre = nombre;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Libro> getLibros() {
|
public List<Libro> getLibros() {
|
||||||
if (this.libros == null) {
|
if (this.libros == null) {
|
||||||
this.libros = new HashSet<>();
|
this.libros = new ArrayList<>();
|
||||||
}
|
}
|
||||||
return this.libros;
|
return this.libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLibros(Set<Libro> libros) {
|
public void setLibros(List<Libro> libros) {
|
||||||
this.libros = libros;
|
this.libros = libros;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.nombre, this.libros);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Idioma))
|
||||||
|
return false;
|
||||||
|
Idioma idioma = (Idioma) o;
|
||||||
|
return Objects.equals(this.id, idioma.id) &&
|
||||||
|
Objects.equals(this.nombre, idioma.nombre) &&
|
||||||
|
Objects.equals(this.libros, idioma.libros);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.nombre;
|
return this.nombre;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
import java.util.HashSet;
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Convert;
|
import javax.persistence.Convert;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -48,7 +49,7 @@ public class Libro {
|
|||||||
joinColumns = @JoinColumn(name = "libro_id", referencedColumnName = "id"),
|
joinColumns = @JoinColumn(name = "libro_id", referencedColumnName = "id"),
|
||||||
inverseJoinColumns = @JoinColumn(name = "idioma_id", referencedColumnName = "id")
|
inverseJoinColumns = @JoinColumn(name = "idioma_id", referencedColumnName = "id")
|
||||||
)
|
)
|
||||||
private Set<Idioma> idiomas;
|
private List<Idioma> idiomas;
|
||||||
|
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@JoinTable(
|
@JoinTable(
|
||||||
@@ -56,7 +57,7 @@ public class Libro {
|
|||||||
joinColumns = @JoinColumn(name = "libro_id", referencedColumnName = "id"),
|
joinColumns = @JoinColumn(name = "libro_id", referencedColumnName = "id"),
|
||||||
inverseJoinColumns = @JoinColumn(name = "autor_id", referencedColumnName = "id")
|
inverseJoinColumns = @JoinColumn(name = "autor_id", referencedColumnName = "id")
|
||||||
)
|
)
|
||||||
private Set<Autor> autores;
|
private List<Autor> autores;
|
||||||
|
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@JoinTable(
|
@JoinTable(
|
||||||
@@ -64,14 +65,14 @@ public class Libro {
|
|||||||
joinColumns = @JoinColumn(name = "libro_id", referencedColumnName = "id"),
|
joinColumns = @JoinColumn(name = "libro_id", referencedColumnName = "id"),
|
||||||
inverseJoinColumns = @JoinColumn(name = "categoria_id", referencedColumnName = "id")
|
inverseJoinColumns = @JoinColumn(name = "categoria_id", referencedColumnName = "id")
|
||||||
)
|
)
|
||||||
private Set<Categoria> categorias;
|
private List<Categoria> categorias;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "editorial_id")
|
@JoinColumn(name = "editorial_id")
|
||||||
private Editorial editorial;
|
private Editorial editorial;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "libro")
|
@OneToMany(mappedBy = "libro")
|
||||||
private Set<Ejemplar> ejemplares;
|
private List<Ejemplar> ejemplares;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
@@ -121,34 +122,34 @@ public class Libro {
|
|||||||
this.anoPublicacion = anoPublicacion;
|
this.anoPublicacion = anoPublicacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Idioma> getIdiomas() {
|
public List<Idioma> getIdiomas() {
|
||||||
if (this.idiomas == null)
|
if (this.idiomas == null)
|
||||||
this.idiomas = new HashSet<>();
|
this.idiomas = new ArrayList<>();
|
||||||
return this.idiomas;
|
return this.idiomas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIdiomas(Set<Idioma> idiomas) {
|
public void setIdiomas(List<Idioma> idiomas) {
|
||||||
this.idiomas = idiomas;
|
this.idiomas = idiomas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Autor> getAutores() {
|
public List<Autor> getAutores() {
|
||||||
if (this.autores == null)
|
if (this.autores == null)
|
||||||
this.autores = new HashSet<>();
|
this.autores = new ArrayList<>();
|
||||||
return this.autores;
|
return this.autores;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAutores(Set<Autor> autores) {
|
public void setAutores(List<Autor> autores) {
|
||||||
this.autores = autores;
|
this.autores = autores;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Categoria> getCategorias() {
|
public List<Categoria> getCategorias() {
|
||||||
if (this.categorias == null)
|
if (this.categorias == null)
|
||||||
this.categorias = new HashSet<>();
|
this.categorias = new ArrayList<>();
|
||||||
|
|
||||||
return this.categorias;
|
return this.categorias;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCategorias(Set<Categoria> categorias) {
|
public void setCategorias(List<Categoria> categorias) {
|
||||||
this.categorias = categorias;
|
this.categorias = categorias;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,21 +161,40 @@ public class Libro {
|
|||||||
this.editorial = editorial;
|
this.editorial = editorial;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Ejemplar> getEjemplares() {
|
public List<Ejemplar> getEjemplares() {
|
||||||
if (this.ejemplares == null)
|
if (this.ejemplares == null)
|
||||||
this.ejemplares = new HashSet<>();
|
this.ejemplares = new ArrayList<>();
|
||||||
return this.ejemplares;
|
return this.ejemplares;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEjemplares(Set<Ejemplar> ejemplar) {
|
public void setEjemplares(List<Ejemplar> ejemplar) {
|
||||||
this.ejemplares = ejemplar;
|
this.ejemplares = ejemplar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEjemplar(Ejemplar ejemplar) {
|
@Override
|
||||||
this.ejemplares.add(ejemplar);
|
public int hashCode() {
|
||||||
if (ejemplar.getLibro() != this) {
|
return Objects.hash(this.id, this.isbn, this.titulo, this.numeroPaginas, this.precioReferencia, this.anoPublicacion, this.idiomas, this.autores,
|
||||||
ejemplar.setLibro(this);
|
this.categorias, this.editorial, this.ejemplares);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Libro))
|
||||||
|
return false;
|
||||||
|
Libro libro = (Libro) o;
|
||||||
|
return this.numeroPaginas == libro.numeroPaginas &&
|
||||||
|
this.precioReferencia == libro.precioReferencia &&
|
||||||
|
Objects.equals(this.id, libro.id) &&
|
||||||
|
Objects.equals(this.isbn, libro.isbn) &&
|
||||||
|
Objects.equals(this.titulo, libro.titulo) &&
|
||||||
|
Objects.equals(this.anoPublicacion, libro.anoPublicacion) &&
|
||||||
|
Objects.equals(this.idiomas, libro.idiomas) &&
|
||||||
|
Objects.equals(this.autores, libro.autores) &&
|
||||||
|
Objects.equals(this.categorias, libro.categorias) &&
|
||||||
|
Objects.equals(this.editorial, libro.editorial) &&
|
||||||
|
Objects.equals(this.ejemplares, libro.ejemplares);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package xyz.danielcortes.models;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -94,4 +95,23 @@ public class Telefono {
|
|||||||
public void setClientes(List<Cliente> clientes) {
|
public void setClientes(List<Cliente> clientes) {
|
||||||
this.clientes = clientes;
|
this.clientes = clientes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.numero, this.trabajadores, this.distribuidores, this.clientes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Telefono))
|
||||||
|
return false;
|
||||||
|
Telefono telefono = (Telefono) o;
|
||||||
|
return Objects.equals(this.id, telefono.id) &&
|
||||||
|
Objects.equals(this.numero, telefono.numero) &&
|
||||||
|
Objects.equals(this.trabajadores, telefono.trabajadores) &&
|
||||||
|
Objects.equals(this.distribuidores, telefono.distribuidores) &&
|
||||||
|
Objects.equals(this.clientes, telefono.clientes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import javax.persistence.GeneratedValue;
|
|||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@@ -48,6 +49,12 @@ public class Trabajador {
|
|||||||
@ManyToMany(mappedBy = "trabajadores")
|
@ManyToMany(mappedBy = "trabajadores")
|
||||||
private List<Direccion> direcciones;
|
private List<Direccion> direcciones;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "trabajador")
|
||||||
|
private List<Venta> ventas;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "trabajador")
|
||||||
|
private List<Arriendo> arriendos;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
@@ -134,6 +141,33 @@ public class Trabajador {
|
|||||||
this.direcciones = direcciones;
|
this.direcciones = direcciones;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Venta> getVentas() {
|
||||||
|
if (this.ventas == null)
|
||||||
|
this.ventas = new ArrayList<>();
|
||||||
|
return this.ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVentas(List<Venta> ventas) {
|
||||||
|
this.ventas = ventas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Arriendo> getArriendos() {
|
||||||
|
if (this.arriendos == null)
|
||||||
|
this.arriendos = new ArrayList<>();
|
||||||
|
return this.arriendos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArriendos(List<Arriendo> arriendos) {
|
||||||
|
this.arriendos = arriendos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects
|
||||||
|
.hash(this.id, this.rut, this.nombre, this.apellidoPaterno, this.apellidoMaterno, this.fechaContrato, this.usuario, this.correos,
|
||||||
|
this.telefonos, this.direcciones, this.ventas, this.arriendos);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o)
|
||||||
@@ -149,13 +183,10 @@ public class Trabajador {
|
|||||||
Objects.equals(this.fechaContrato, that.fechaContrato) &&
|
Objects.equals(this.fechaContrato, that.fechaContrato) &&
|
||||||
Objects.equals(this.usuario, that.usuario) &&
|
Objects.equals(this.usuario, that.usuario) &&
|
||||||
Objects.equals(this.correos, that.correos) &&
|
Objects.equals(this.correos, that.correos) &&
|
||||||
Objects.equals(this.telefonos, that.telefonos);
|
Objects.equals(this.telefonos, that.telefonos) &&
|
||||||
}
|
Objects.equals(this.direcciones, that.direcciones) &&
|
||||||
|
Objects.equals(this.ventas, that.ventas) &&
|
||||||
@Override
|
Objects.equals(this.arriendos, that.arriendos);
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(this.id, this.rut, this.nombre, this.apellidoPaterno, this.apellidoMaterno, this.fechaContrato, this.usuario, this.correos,
|
|
||||||
this.telefonos);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package xyz.danielcortes.models;
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
@@ -69,4 +71,26 @@ public class Usuario {
|
|||||||
public void setTrabajador(Trabajador trabajador) {
|
public void setTrabajador(Trabajador trabajador) {
|
||||||
this.trabajador = trabajador;
|
this.trabajador = trabajador;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = Objects.hash(this.id, this.nombre, this.trabajador);
|
||||||
|
result = 31 * result + Arrays.hashCode(this.password);
|
||||||
|
result = 31 * result + Arrays.hashCode(this.salt);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Usuario))
|
||||||
|
return false;
|
||||||
|
Usuario usuario = (Usuario) o;
|
||||||
|
return Objects.equals(this.id, usuario.id) &&
|
||||||
|
Objects.equals(this.nombre, usuario.nombre) &&
|
||||||
|
Arrays.equals(this.password, usuario.password) &&
|
||||||
|
Arrays.equals(this.salt, usuario.salt) &&
|
||||||
|
Objects.equals(this.trabajador, usuario.trabajador);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
105
src/main/java/xyz/danielcortes/models/Venta.java
Normal file
105
src/main/java/xyz/danielcortes/models/Venta.java
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
package xyz.danielcortes.models;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.ManyToMany;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "venta")
|
||||||
|
public class Venta {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id", nullable = false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "cliente_id")
|
||||||
|
private Cliente cliente;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "trabajador_id")
|
||||||
|
private Trabajador trabajador;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "boleta_id")
|
||||||
|
private Boleta boleta;
|
||||||
|
|
||||||
|
@ManyToMany
|
||||||
|
@JoinTable(
|
||||||
|
name = "ejemplar_venta",
|
||||||
|
joinColumns = @JoinColumn(name = "venta_id", referencedColumnName = "id"),
|
||||||
|
inverseJoinColumns = @JoinColumn(name = "ejemplar_id", referencedColumnName = "id"))
|
||||||
|
private List<Ejemplar> ejemplares;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cliente getCliente() {
|
||||||
|
return this.cliente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCliente(Cliente cliente) {
|
||||||
|
this.cliente = cliente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Trabajador getTrabajador() {
|
||||||
|
return this.trabajador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrabajador(Trabajador trabajador) {
|
||||||
|
this.trabajador = trabajador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boleta getBoleta() {
|
||||||
|
return this.boleta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoleta(Boleta boleta) {
|
||||||
|
this.boleta = boleta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ejemplar> getEjemplares() {
|
||||||
|
if (this.ejemplares == null)
|
||||||
|
this.ejemplares = new ArrayList<>();
|
||||||
|
return this.ejemplares;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEjemplares(List<Ejemplar> ejemplares) {
|
||||||
|
this.ejemplares = ejemplares;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(this.id, this.cliente, this.trabajador, this.boleta, this.ejemplares);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (!(o instanceof Venta))
|
||||||
|
return false;
|
||||||
|
Venta venta = (Venta) o;
|
||||||
|
return Objects.equals(this.id, venta.id) &&
|
||||||
|
Objects.equals(this.cliente, venta.cliente) &&
|
||||||
|
Objects.equals(this.trabajador, venta.trabajador) &&
|
||||||
|
Objects.equals(this.boleta, venta.boleta) &&
|
||||||
|
Objects.equals(this.ejemplares, venta.ejemplares);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,6 +21,13 @@ public class AutorCreatePanel extends BasePanel {
|
|||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -46,13 +53,6 @@ public class AutorCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class AutorSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Autor> autorModel;
|
private BaseTableModel<Autor> autorModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -60,41 +67,10 @@ public class AutorSearchPanel extends BasePanel {
|
|||||||
return this.crearButton;
|
return this.crearButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public BaseTableModel<Autor> getAutorModel() {
|
public BaseTableModel<Autor> getAutorModel() {
|
||||||
return this.autorModel;
|
return this.autorModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createAutorTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createAutorTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.autorModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Nombre", "Apellido Paterno", "Apellido Materno", "Nº Libros"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getNombre();
|
|
||||||
case 1: return row.get(rowIndex).getApellidoPaterno();
|
|
||||||
case 2: return row.get(rowIndex).getApellidoMaterno();
|
|
||||||
case 3: return row.get(rowIndex).getLibros().size();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.autorTable = new JTable(this.autorModel);
|
|
||||||
this.autorTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -145,6 +121,29 @@ public class AutorSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createAutorTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createAutorTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.autorModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Nombre", "Apellido Paterno", "Apellido Materno", "Nº Libros"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getNombre();
|
||||||
|
case 1: return row.get(rowIndex).getApellidoPaterno();
|
||||||
|
case 2: return row.get(rowIndex).getApellidoMaterno();
|
||||||
|
case 3: return row.get(rowIndex).getLibros().size();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.autorTable = new JTable(this.autorModel);
|
||||||
|
this.autorTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ public class AutorUpdatePanel extends BasePanel {
|
|||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -46,14 +53,6 @@ public class AutorUpdatePanel extends BasePanel {
|
|||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ public class AutorViewPanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -41,13 +48,6 @@ public class AutorViewPanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class CategoriaCreatePanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JButton getGuardarButton() {
|
public JButton getGuardarButton() {
|
||||||
return this.guardarButton;
|
return this.guardarButton;
|
||||||
}
|
}
|
||||||
@@ -36,13 +43,6 @@ public class CategoriaCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class CategoriaSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Categoria> categoriaModel;
|
private BaseTableModel<Categoria> categoriaModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -64,34 +71,6 @@ public class CategoriaSearchPanel extends BasePanel {
|
|||||||
return this.crearButton;
|
return this.crearButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createCategoriaTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createCategoriaTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.categoriaModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Nombre", "Nº Libros"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getNombre();
|
|
||||||
case 1: return row.get(rowIndex).getLibros().size();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.categoriaTable = new JTable(this.categoriaModel);
|
|
||||||
this.categoriaTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -147,6 +126,27 @@ public class CategoriaSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createCategoriaTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createCategoriaTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.categoriaModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Nombre", "Nº Libros"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getNombre();
|
||||||
|
case 1: return row.get(rowIndex).getLibros().size();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.categoriaTable = new JTable(this.categoriaModel);
|
||||||
|
this.categoriaTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class CategoriaUpdatePanel extends BasePanel {
|
|||||||
private JButton updateButton;
|
private JButton updateButton;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -36,14 +43,6 @@ public class CategoriaUpdatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class CategoriaViewPanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class CategoriaViewPanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public class ClienteCreatePanel extends BasePanel {
|
|||||||
private JTextField rutField;
|
private JTextField rutField;
|
||||||
private DatePicker fechaNacimientoPicker;
|
private DatePicker fechaNacimientoPicker;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -57,13 +64,6 @@ public class ClienteCreatePanel extends BasePanel {
|
|||||||
return this.fechaNacimientoPicker;
|
return this.fechaNacimientoPicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class ClienteSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Cliente> clienteModel;
|
private BaseTableModel<Cliente> clienteModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -64,37 +71,6 @@ public class ClienteSearchPanel extends BasePanel {
|
|||||||
return this.clienteModel;
|
return this.clienteModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createClienteTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createClienteTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.clienteModel= new BaseTableModel<>(
|
|
||||||
new String[]{"Rut", "Nombre", "Apellido Paterno", "Apellido Materno", "Fecha Nacimiento"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getRut();
|
|
||||||
case 1: return row.get(rowIndex).getNombre();
|
|
||||||
case 2: return row.get(rowIndex).getApellidoPaterno();
|
|
||||||
case 3: return row.get(rowIndex).getApellidoMaterno();
|
|
||||||
case 4: return row.get(rowIndex).getFechaNacimiento();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.clienteTable = new JTable(this.clienteModel);
|
|
||||||
this.clienteTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -145,6 +121,30 @@ public class ClienteSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createClienteTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createClienteTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.clienteModel= new BaseTableModel<>(
|
||||||
|
new String[]{"Rut", "Nombre", "Apellido Paterno", "Apellido Materno", "Fecha Nacimiento"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getRut();
|
||||||
|
case 1: return row.get(rowIndex).getNombre();
|
||||||
|
case 2: return row.get(rowIndex).getApellidoPaterno();
|
||||||
|
case 3: return row.get(rowIndex).getApellidoMaterno();
|
||||||
|
case 4: return row.get(rowIndex).getFechaNacimiento();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.clienteTable = new JTable(this.clienteModel);
|
||||||
|
this.clienteTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public class ClienteUpdatePanel extends BasePanel {
|
|||||||
private JTextField rutField;
|
private JTextField rutField;
|
||||||
private DatePicker fechaNacimientoField;
|
private DatePicker fechaNacimientoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -57,13 +64,6 @@ public class ClienteUpdatePanel extends BasePanel {
|
|||||||
return this.fechaNacimientoField;
|
return this.fechaNacimientoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -25,6 +25,13 @@ public class ClienteViewPanel extends BasePanel {
|
|||||||
private JButton telefonosButton;
|
private JButton telefonosButton;
|
||||||
private JTextField fechaNacimientoField;
|
private JTextField fechaNacimientoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -66,13 +73,6 @@ public class ClienteViewPanel extends BasePanel {
|
|||||||
return this.telefonosButton;
|
return this.telefonosButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class CorreoCreatePanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField correoField;
|
private JTextField correoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JButton getGuardarButton() {
|
public JButton getGuardarButton() {
|
||||||
return this.guardarButton;
|
return this.guardarButton;
|
||||||
}
|
}
|
||||||
@@ -36,13 +43,6 @@ public class CorreoCreatePanel extends BasePanel {
|
|||||||
return this.correoField;
|
return this.correoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ public class CorreoSearchPanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private BaseTableModel<Correo> correoModel;
|
private BaseTableModel<Correo> correoModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -69,33 +76,6 @@ public class CorreoSearchPanel extends BasePanel {
|
|||||||
return this.correoModel;
|
return this.correoModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.creatCorreoTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void creatCorreoTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.correoModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Correo"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getCorreo();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.correosTable = new JTable(this.correoModel);
|
|
||||||
this.correosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -156,6 +136,26 @@ public class CorreoSearchPanel extends BasePanel {
|
|||||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.creatCorreoTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void creatCorreoTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.correoModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Correo"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getCorreo();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.correosTable = new JTable(this.correoModel);
|
||||||
|
this.correosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class CorreoUpdatePanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField correoField;
|
private JTextField correoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JButton getActualizarButton() {
|
public JButton getActualizarButton() {
|
||||||
return this.actualizarButton;
|
return this.actualizarButton;
|
||||||
}
|
}
|
||||||
@@ -36,13 +43,6 @@ public class CorreoUpdatePanel extends BasePanel {
|
|||||||
return this.correoField;
|
return this.correoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -94,4 +94,5 @@ public class CorreoUpdatePanel extends BasePanel {
|
|||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class CorreoViewPanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField correoField;
|
private JTextField correoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class CorreoViewPanel extends BasePanel {
|
|||||||
return this.correoField;
|
return this.correoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -85,4 +85,5 @@ public class CorreoViewPanel extends BasePanel {
|
|||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.DistribuidorCreatePanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.distribuidor.DistribuidorCreatePanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public class DistribuidorCreatePanel extends BasePanel {
|
|||||||
private JComboBox<Empresa> empresaCombobox;
|
private JComboBox<Empresa> empresaCombobox;
|
||||||
private DefaultComboBoxModel<Empresa> empresaModel;
|
private DefaultComboBoxModel<Empresa> empresaModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -49,13 +56,6 @@ public class DistribuidorCreatePanel extends BasePanel {
|
|||||||
return this.empresaModel;
|
return this.empresaModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -109,15 +109,15 @@ public class DistribuidorCreatePanel extends BasePanel {
|
|||||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.empresaModel = new DefaultComboBoxModel<>();
|
||||||
|
this.empresaCombobox = new JComboBox<>(this.empresaModel);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.empresaModel = new DefaultComboBoxModel<>();
|
|
||||||
this.empresaCombobox = new JComboBox<>(this.empresaModel);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.DistribuidorSearchPanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.distribuidor.DistribuidorSearchPanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class DistribuidorSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Distribuidor> distribuidorModel;
|
private BaseTableModel<Distribuidor> distribuidorModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -64,34 +71,6 @@ public class DistribuidorSearchPanel extends BasePanel {
|
|||||||
return this.distribuidorModel;
|
return this.distribuidorModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createDistribuidorTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createDistribuidorTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.distribuidorModel= new BaseTableModel<>(
|
|
||||||
new String[]{"Rut", "Empresa"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getRut();
|
|
||||||
case 1: return row.get(rowIndex).getEmpresa().getNombre();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.distribuidorTable = new JTable(this.distribuidorModel);
|
|
||||||
this.distribuidorTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -142,6 +121,27 @@ public class DistribuidorSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createDistribuidorTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createDistribuidorTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.distribuidorModel= new BaseTableModel<>(
|
||||||
|
new String[]{"Rut", "Empresa"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getRut();
|
||||||
|
case 1: return row.get(rowIndex).getEmpresa().getNombre();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.distribuidorTable = new JTable(this.distribuidorModel);
|
||||||
|
this.distribuidorTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.DistribuidorUpdatePanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.distribuidor.DistribuidorUpdatePanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public class DistribuidorUpdatePanel extends BasePanel {
|
|||||||
private JComboBox<Empresa> empresaCombobox;
|
private JComboBox<Empresa> empresaCombobox;
|
||||||
private DefaultComboBoxModel<Empresa> empresaModel;
|
private DefaultComboBoxModel<Empresa> empresaModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -49,13 +56,6 @@ public class DistribuidorUpdatePanel extends BasePanel {
|
|||||||
return this.empresaModel;
|
return this.empresaModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -109,15 +109,15 @@ public class DistribuidorUpdatePanel extends BasePanel {
|
|||||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.empresaModel = new DefaultComboBoxModel<>();
|
||||||
|
this.empresaCombobox = new JComboBox<>(this.empresaModel);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.empresaModel = new DefaultComboBoxModel<>();
|
|
||||||
this.empresaCombobox = new JComboBox<>(this.empresaModel);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.DistribuidorViewPanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.distribuidor.DistribuidorViewPanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="7" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="7" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ public class DistribuidorViewPanel extends BasePanel {
|
|||||||
private JButton correosButton;
|
private JButton correosButton;
|
||||||
private JButton telefonosButton;
|
private JButton telefonosButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -51,13 +58,6 @@ public class DistribuidorViewPanel extends BasePanel {
|
|||||||
return this.telefonosButton;
|
return this.telefonosButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class EditorialCreatePanel extends BasePanel {
|
|||||||
private JButton guardarButton;
|
private JButton guardarButton;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -36,13 +43,6 @@ public class EditorialCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -26,6 +26,13 @@ public class EditorialSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Editorial> editorialModel;
|
private BaseTableModel<Editorial> editorialModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -63,33 +70,6 @@ public class EditorialSearchPanel extends BasePanel {
|
|||||||
return this.crearButton;
|
return this.crearButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createEditorialTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createEditorialTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.editorialModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Nombre", "Nº Libros"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch(colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getNombre();
|
|
||||||
case 1: return row.get(rowIndex).getLibros().size();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.editorialTable = new JTable(this.editorialModel);
|
|
||||||
// @formatter:on
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -145,6 +125,26 @@ public class EditorialSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createEditorialTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createEditorialTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.editorialModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Nombre", "Nº Libros"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch(colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getNombre();
|
||||||
|
case 1: return row.get(rowIndex).getLibros().size();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.editorialTable = new JTable(this.editorialModel);
|
||||||
|
// @formatter:on
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class EditorialUpdatePanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton actualizarButton;
|
private JButton actualizarButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class EditorialUpdatePanel extends BasePanel {
|
|||||||
return this.actualizarButton;
|
return this.actualizarButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class EditorialViewPanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class EditorialViewPanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -80,4 +80,5 @@ public class EditorialViewPanel extends BasePanel {
|
|||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class EmpresaCreatePanel extends BasePanel {
|
|||||||
private JButton guardarButton;
|
private JButton guardarButton;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -36,13 +43,6 @@ public class EmpresaCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -26,6 +26,13 @@ public class EmpresaSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Empresa> empresaModel;
|
private BaseTableModel<Empresa> empresaModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -63,33 +70,6 @@ public class EmpresaSearchPanel extends BasePanel {
|
|||||||
return this.crearButton;
|
return this.crearButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createEmpresaTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createEmpresaTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.empresaModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Nombre", "Nº Distribuidores"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch(colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getNombre();
|
|
||||||
case 1: return row.get(rowIndex).getDistribuidores().size();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.empresaTable = new JTable(this.empresaModel);
|
|
||||||
// @formatter:on
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -145,6 +125,26 @@ public class EmpresaSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createEmpresaTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createEmpresaTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.empresaModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Nombre", "Nº Distribuidores"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch(colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getNombre();
|
||||||
|
case 1: return row.get(rowIndex).getDistribuidores().size();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.empresaTable = new JTable(this.empresaModel);
|
||||||
|
// @formatter:on
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class EmpresaUpdatePanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton actualizarButton;
|
private JButton actualizarButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class EmpresaUpdatePanel extends BasePanel {
|
|||||||
return this.actualizarButton;
|
return this.actualizarButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class EmpresaViewPanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class EmpresaViewPanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -80,4 +80,5 @@ public class EmpresaViewPanel extends BasePanel {
|
|||||||
public JComponent $$$getRootComponent$$$() {
|
public JComponent $$$getRootComponent$$$() {
|
||||||
return contentPane;
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class IdiomaCreatePanel extends BasePanel {
|
|||||||
private JButton guardarButton;
|
private JButton guardarButton;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -36,13 +43,6 @@ public class IdiomaCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class IdiomaSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Idioma> idiomaTableModel;
|
private BaseTableModel<Idioma> idiomaTableModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -64,13 +71,6 @@ public class IdiomaSearchPanel extends BasePanel {
|
|||||||
return this.crearButton;
|
return this.crearButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -126,13 +126,6 @@ public class IdiomaSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @noinspection ALL
|
|
||||||
*/
|
|
||||||
public JComponent $$$getRootComponent$$$() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createUIComponents() {
|
private void createUIComponents() {
|
||||||
this.createIdiomaTable();
|
this.createIdiomaTable();
|
||||||
}
|
}
|
||||||
@@ -153,4 +146,11 @@ public class IdiomaSearchPanel extends BasePanel {
|
|||||||
this.idiomaTable = new JTable(this.idiomaTableModel);
|
this.idiomaTable = new JTable(this.idiomaTableModel);
|
||||||
this.idiomaTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
this.idiomaTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class IdiomaUpdatePanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton actualizarButton;
|
private JButton actualizarButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class IdiomaUpdatePanel extends BasePanel {
|
|||||||
return this.actualizarButton;
|
return this.actualizarButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class IdiomaViewPanel extends BasePanel {
|
|||||||
private JTextField nombreField;
|
private JTextField nombreField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class IdiomaViewPanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -41,6 +41,13 @@ public class LibroCreatePanel extends BasePanel {
|
|||||||
private JTextField precioReferenciaField;
|
private JTextField precioReferenciaField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -106,13 +113,6 @@ public class LibroCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -226,13 +226,6 @@ public class LibroCreatePanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @noinspection ALL
|
|
||||||
*/
|
|
||||||
public JComponent $$$getRootComponent$$$() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createUIComponents() {
|
private void createUIComponents() {
|
||||||
this.createIdiomasList();
|
this.createIdiomasList();
|
||||||
this.createAutoresList();
|
this.createAutoresList();
|
||||||
@@ -262,4 +255,11 @@ public class LibroCreatePanel extends BasePanel {
|
|||||||
this.editorialModel = new DefaultComboBoxModel<>();
|
this.editorialModel = new DefaultComboBoxModel<>();
|
||||||
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class LibroSearchPanel extends BasePanel {
|
|||||||
private JButton eliminarButton;
|
private JButton eliminarButton;
|
||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTable getLibrosTable() {
|
public JTable getLibrosTable() {
|
||||||
return this.librosTable;
|
return this.librosTable;
|
||||||
}
|
}
|
||||||
@@ -64,36 +71,6 @@ public class LibroSearchPanel extends BasePanel {
|
|||||||
return this.crearButton;
|
return this.crearButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createLibrosTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createLibrosTable() {
|
|
||||||
//@formatter:off
|
|
||||||
this.librosModel = new BaseTableModel<>(
|
|
||||||
new String[]{"ISBN", "Titulo", "Precio Referencial", "Stock"},
|
|
||||||
(rows, rowIndex, colIndex) -> {
|
|
||||||
switch(colIndex) {
|
|
||||||
case 0: return rows.get(rowIndex).getIsbn();
|
|
||||||
case 1: return rows.get(rowIndex).getTitulo();
|
|
||||||
case 2: return rows.get(rowIndex).getPrecioReferencia();
|
|
||||||
case 3: return rows.get(rowIndex).getEjemplares().size();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
//@formatter:on
|
|
||||||
this.librosTable = new JTable(this.librosModel);
|
|
||||||
this.librosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -149,6 +126,29 @@ public class LibroSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createLibrosTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createLibrosTable() {
|
||||||
|
//@formatter:off
|
||||||
|
this.librosModel = new BaseTableModel<>(
|
||||||
|
new String[]{"ISBN", "Titulo", "Precio Referencial", "Stock"},
|
||||||
|
(rows, rowIndex, colIndex) -> {
|
||||||
|
switch(colIndex) {
|
||||||
|
case 0: return rows.get(rowIndex).getIsbn();
|
||||||
|
case 1: return rows.get(rowIndex).getTitulo();
|
||||||
|
case 2: return rows.get(rowIndex).getPrecioReferencia();
|
||||||
|
case 3: return rows.get(rowIndex).getEjemplares().size();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
//@formatter:on
|
||||||
|
this.librosTable = new JTable(this.librosModel);
|
||||||
|
this.librosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -40,6 +40,13 @@ public class LibroUpdatePanel extends BasePanel {
|
|||||||
private DefaultComboBoxModel<Editorial> editorialModel;
|
private DefaultComboBoxModel<Editorial> editorialModel;
|
||||||
private JButton actualizarButton;
|
private JButton actualizarButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -101,43 +108,6 @@ public class LibroUpdatePanel extends BasePanel {
|
|||||||
return this.actualizarButton;
|
return this.actualizarButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createAutoresList();
|
|
||||||
this.createCategoriaList();
|
|
||||||
this.createEditorialCombo();
|
|
||||||
this.createIdiomasList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createIdiomasList() {
|
|
||||||
this.idiomasModel = new DefaultListModel<>();
|
|
||||||
this.idiomasList = new JList<>(this.idiomasModel);
|
|
||||||
this.idiomasList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createAutoresList() {
|
|
||||||
this.autoresModel = new DefaultListModel<>();
|
|
||||||
this.autoresList = new JList<>(this.autoresModel);
|
|
||||||
this.autoresList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createCategoriaList() {
|
|
||||||
this.categoriasModel = new DefaultListModel<>();
|
|
||||||
this.categoriasList = new JList<>(this.categoriasModel);
|
|
||||||
this.categoriasList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createEditorialCombo() {
|
|
||||||
this.editorialModel = new DefaultComboBoxModel<>();
|
|
||||||
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -240,6 +210,36 @@ public class LibroUpdatePanel extends BasePanel {
|
|||||||
null, null, null, 0, false));
|
null, null, null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createAutoresList();
|
||||||
|
this.createCategoriaList();
|
||||||
|
this.createEditorialCombo();
|
||||||
|
this.createIdiomasList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createAutoresList() {
|
||||||
|
this.autoresModel = new DefaultListModel<>();
|
||||||
|
this.autoresList = new JList<>(this.autoresModel);
|
||||||
|
this.autoresList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createCategoriaList() {
|
||||||
|
this.categoriasModel = new DefaultListModel<>();
|
||||||
|
this.categoriasList = new JList<>(this.categoriasModel);
|
||||||
|
this.categoriasList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createEditorialCombo() {
|
||||||
|
this.editorialModel = new DefaultComboBoxModel<>();
|
||||||
|
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createIdiomasList() {
|
||||||
|
this.idiomasModel = new DefaultListModel<>();
|
||||||
|
this.idiomasList = new JList<>(this.idiomasModel);
|
||||||
|
this.idiomasList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -49,14 +49,6 @@
|
|||||||
<editable value="false"/>
|
<editable value="false"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="f8b93" class="javax.swing.JComboBox" binding="editorialCombo" custom-create="true">
|
|
||||||
<constraints>
|
|
||||||
<grid row="17" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
|
||||||
<preferred-size width="400" height="-1"/>
|
|
||||||
</grid>
|
|
||||||
</constraints>
|
|
||||||
<properties/>
|
|
||||||
</component>
|
|
||||||
<component id="b355b" class="javax.swing.JButton" binding="volverButton">
|
<component id="b355b" class="javax.swing.JButton" binding="volverButton">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="18" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
<grid row="18" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||||
@@ -209,6 +201,14 @@
|
|||||||
<grid row="19" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="19" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</hspacer>
|
</hspacer>
|
||||||
|
<component id="4887a" class="javax.swing.JTextField" binding="editorialField">
|
||||||
|
<constraints>
|
||||||
|
<grid row="17" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="400" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -5,10 +5,8 @@ import com.intellij.uiDesigner.core.GridLayoutManager;
|
|||||||
import com.intellij.uiDesigner.core.Spacer;
|
import com.intellij.uiDesigner.core.Spacer;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import javax.swing.DefaultComboBoxModel;
|
|
||||||
import javax.swing.DefaultListModel;
|
import javax.swing.DefaultListModel;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
@@ -19,7 +17,6 @@ import javax.swing.ListSelectionModel;
|
|||||||
import xyz.danielcortes.framework.BasePanel;
|
import xyz.danielcortes.framework.BasePanel;
|
||||||
import xyz.danielcortes.models.Autor;
|
import xyz.danielcortes.models.Autor;
|
||||||
import xyz.danielcortes.models.Categoria;
|
import xyz.danielcortes.models.Categoria;
|
||||||
import xyz.danielcortes.models.Editorial;
|
|
||||||
import xyz.danielcortes.models.Idioma;
|
import xyz.danielcortes.models.Idioma;
|
||||||
|
|
||||||
public class LibroViewPanel extends BasePanel {
|
public class LibroViewPanel extends BasePanel {
|
||||||
@@ -35,10 +32,16 @@ public class LibroViewPanel extends BasePanel {
|
|||||||
private DefaultListModel<Autor> autoresModel;
|
private DefaultListModel<Autor> autoresModel;
|
||||||
private JList<Categoria> categoriasList;
|
private JList<Categoria> categoriasList;
|
||||||
private DefaultListModel<Categoria> categoriasModel;
|
private DefaultListModel<Categoria> categoriasModel;
|
||||||
private JComboBox<Editorial> editorialCombo;
|
|
||||||
private DefaultComboBoxModel<Editorial> editorialModel;
|
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField precioReferenciaField;
|
private JTextField precioReferenciaField;
|
||||||
|
private JTextField editorialField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
@@ -89,23 +92,12 @@ public class LibroViewPanel extends BasePanel {
|
|||||||
return this.categoriasModel;
|
return this.categoriasModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JComboBox<Editorial> getEditorialCombo() {
|
|
||||||
return this.editorialCombo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DefaultComboBoxModel<Editorial> getEditorialModel() {
|
|
||||||
return this.editorialModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JButton getVolverButton() {
|
public JButton getVolverButton() {
|
||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
public JTextField getEditorialField() {
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
return this.editorialField;
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -138,9 +130,6 @@ public class LibroViewPanel extends BasePanel {
|
|||||||
contentPane.add(anoPublicacionField,
|
contentPane.add(anoPublicacionField,
|
||||||
new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
|
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
|
||||||
contentPane.add(editorialCombo,
|
|
||||||
new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW,
|
|
||||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
|
|
||||||
volverButton = new JButton();
|
volverButton = new JButton();
|
||||||
volverButton.setText("Volver");
|
volverButton.setText("Volver");
|
||||||
contentPane.add(volverButton, new GridConstraints(18, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
contentPane.add(volverButton, new GridConstraints(18, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||||
@@ -214,20 +203,16 @@ public class LibroViewPanel extends BasePanel {
|
|||||||
contentPane.add(spacer3,
|
contentPane.add(spacer3,
|
||||||
new GridConstraints(19, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1,
|
new GridConstraints(19, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1,
|
||||||
null, null, null, 0, false));
|
null, null, null, 0, false));
|
||||||
}
|
editorialField = new JTextField();
|
||||||
|
contentPane.add(editorialField,
|
||||||
/**
|
new GridConstraints(17, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||||
* @noinspection ALL
|
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(400, -1), null, 0, false));
|
||||||
*/
|
|
||||||
public JComponent $$$getRootComponent$$$() {
|
|
||||||
return contentPane;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
private void createUIComponents() {
|
||||||
this.createIdiomasList();
|
this.createIdiomasList();
|
||||||
this.createAutoresList();
|
this.createAutoresList();
|
||||||
this.createCategoriaList();
|
this.createCategoriaList();
|
||||||
this.createEditorialCombo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createIdiomasList() {
|
private void createIdiomasList() {
|
||||||
@@ -248,8 +233,11 @@ public class LibroViewPanel extends BasePanel {
|
|||||||
this.categoriasList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
this.categoriasList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createEditorialCombo() {
|
/**
|
||||||
this.editorialModel = new DefaultComboBoxModel<>();
|
* @noinspection ALL
|
||||||
this.editorialCombo = new JComboBox<>(this.editorialModel);
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class TelefonoCreatePanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField numeroField;
|
private JTextField numeroField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JButton getGuardarButton() {
|
public JButton getGuardarButton() {
|
||||||
return this.guardarButton;
|
return this.guardarButton;
|
||||||
}
|
}
|
||||||
@@ -36,13 +43,6 @@ public class TelefonoCreatePanel extends BasePanel {
|
|||||||
return this.numeroField;
|
return this.numeroField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ public class TelefonoSearchPanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private BaseTableModel<Telefono> telefonoModel;
|
private BaseTableModel<Telefono> telefonoModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -69,33 +76,6 @@ public class TelefonoSearchPanel extends BasePanel {
|
|||||||
return this.telefonoModel;
|
return this.telefonoModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.creatTelefonoTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void creatTelefonoTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.telefonoModel = new BaseTableModel<>(
|
|
||||||
new String[]{"Numero"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getNumero();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.telefonosTable = new JTable(this.telefonoModel);
|
|
||||||
this.telefonosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -156,6 +136,26 @@ public class TelefonoSearchPanel extends BasePanel {
|
|||||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.creatTelefonoTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void creatTelefonoTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.telefonoModel = new BaseTableModel<>(
|
||||||
|
new String[]{"Numero"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getNumero();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.telefonosTable = new JTable(this.telefonoModel);
|
||||||
|
this.telefonosTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public class TelefonoUpdatePanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField telefonoField;
|
private JTextField telefonoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JButton getActualizarButton() {
|
public JButton getActualizarButton() {
|
||||||
return this.actualizarButton;
|
return this.actualizarButton;
|
||||||
}
|
}
|
||||||
@@ -36,13 +43,6 @@ public class TelefonoUpdatePanel extends BasePanel {
|
|||||||
return this.telefonoField;
|
return this.telefonoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ public class TelefonoViewPanel extends BasePanel {
|
|||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
private JTextField telefonoField;
|
private JTextField telefonoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -31,13 +38,6 @@ public class TelefonoViewPanel extends BasePanel {
|
|||||||
return this.telefonoField;
|
return this.telefonoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.TrabajadorCreatePanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.trabajador.TrabajadorCreatePanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="12" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="12" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public class TrabajadorCreatePanel extends BasePanel {
|
|||||||
private JTextField rutField;
|
private JTextField rutField;
|
||||||
private DatePicker fechaContratoPicker;
|
private DatePicker fechaContratoPicker;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -57,13 +64,6 @@ public class TrabajadorCreatePanel extends BasePanel {
|
|||||||
return this.fechaContratoPicker;
|
return this.fechaContratoPicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.TrabajadorSearchPanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.trabajador.TrabajadorSearchPanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class TrabajadorSearchPanel extends BasePanel {
|
|||||||
private JButton crearButton;
|
private JButton crearButton;
|
||||||
private BaseTableModel<Trabajador> trabajadorModel;
|
private BaseTableModel<Trabajador> trabajadorModel;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -64,37 +71,6 @@ public class TrabajadorSearchPanel extends BasePanel {
|
|||||||
return this.trabajadorModel;
|
return this.trabajadorModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
|
||||||
this.createTrabajadorTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createTrabajadorTable() {
|
|
||||||
// @formatter:off
|
|
||||||
this.trabajadorModel= new BaseTableModel<>(
|
|
||||||
new String[]{"Rut", "Nombre", "Apellido Paterno", "Apellido Materno", "Fecha Contrato"},
|
|
||||||
(row, rowIndex, colIndex) -> {
|
|
||||||
switch (colIndex) {
|
|
||||||
case 0: return row.get(rowIndex).getRut();
|
|
||||||
case 1: return row.get(rowIndex).getNombre();
|
|
||||||
case 2: return row.get(rowIndex).getApellidoPaterno();
|
|
||||||
case 3: return row.get(rowIndex).getApellidoMaterno();
|
|
||||||
case 4: return row.get(rowIndex).getFechaContrato();
|
|
||||||
default: return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// @formatter:on
|
|
||||||
this.trabajadorTable = new JTable(this.trabajadorModel);
|
|
||||||
this.trabajadorTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
@@ -145,6 +121,30 @@ public class TrabajadorSearchPanel extends BasePanel {
|
|||||||
null, 0, false));
|
null, 0, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createUIComponents() {
|
||||||
|
this.createTrabajadorTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createTrabajadorTable() {
|
||||||
|
// @formatter:off
|
||||||
|
this.trabajadorModel= new BaseTableModel<>(
|
||||||
|
new String[]{"Rut", "Nombre", "Apellido Paterno", "Apellido Materno", "Fecha Contrato"},
|
||||||
|
(row, rowIndex, colIndex) -> {
|
||||||
|
switch (colIndex) {
|
||||||
|
case 0: return row.get(rowIndex).getRut();
|
||||||
|
case 1: return row.get(rowIndex).getNombre();
|
||||||
|
case 2: return row.get(rowIndex).getApellidoPaterno();
|
||||||
|
case 3: return row.get(rowIndex).getApellidoMaterno();
|
||||||
|
case 4: return row.get(rowIndex).getFechaContrato();
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// @formatter:on
|
||||||
|
this.trabajadorTable = new JTable(this.trabajadorModel);
|
||||||
|
this.trabajadorTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection ALL
|
* @noinspection ALL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.TrabajadorUpdatePanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.trabajador.TrabajadorUpdatePanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="12" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="12" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public class TrabajadorUpdatePanel extends BasePanel {
|
|||||||
private JTextField rutField;
|
private JTextField rutField;
|
||||||
private DatePicker fechaContratoField;
|
private DatePicker fechaContratoField;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -57,13 +64,6 @@ public class TrabajadorUpdatePanel extends BasePanel {
|
|||||||
return this.fechaContratoField;
|
return this.fechaContratoField;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.cliente.TrabajadorViewPanel">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="xyz.danielcortes.views.trabajador.TrabajadorViewPanel">
|
||||||
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="13" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="contentPane" layout-manager="GridLayoutManager" row-count="13" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="20" left="20" bottom="20" right="20"/>
|
<margin top="20" left="20" bottom="20" right="20"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="500" height="468"/>
|
<xy x="20" y="20" width="540" height="468"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ public class TrabajadorViewPanel extends BasePanel {
|
|||||||
private JButton correosButton;
|
private JButton correosButton;
|
||||||
private JButton telefonosButton;
|
private JButton telefonosButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
public JTextField getNombreField() {
|
public JTextField getNombreField() {
|
||||||
return this.nombreField;
|
return this.nombreField;
|
||||||
}
|
}
|
||||||
@@ -56,7 +63,6 @@ public class TrabajadorViewPanel extends BasePanel {
|
|||||||
return this.fechaContratoPicker;
|
return this.fechaContratoPicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public JButton getUsuarioButton() {
|
public JButton getUsuarioButton() {
|
||||||
return this.usuarioButton;
|
return this.usuarioButton;
|
||||||
}
|
}
|
||||||
@@ -73,13 +79,6 @@ public class TrabajadorViewPanel extends BasePanel {
|
|||||||
return this.telefonosButton;
|
return this.telefonosButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ public class UsuarioCreatePanel extends BasePanel {
|
|||||||
private JPasswordField passField;
|
private JPasswordField passField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -42,13 +49,6 @@ public class UsuarioCreatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ public class UsuarioUpdatePanel extends BasePanel {
|
|||||||
private JPasswordField passField;
|
private JPasswordField passField;
|
||||||
private JButton volverButton;
|
private JButton volverButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -42,13 +49,6 @@ public class UsuarioUpdatePanel extends BasePanel {
|
|||||||
return this.volverButton;
|
return this.volverButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ public class UsuarioViewPanel extends BasePanel {
|
|||||||
private JButton editarButton;
|
private JButton editarButton;
|
||||||
private JButton eliminarButton;
|
private JButton eliminarButton;
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
this.$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getContentPane() {
|
public JPanel getContentPane() {
|
||||||
return this.contentPane;
|
return this.contentPane;
|
||||||
@@ -41,13 +48,6 @@ public class UsuarioViewPanel extends BasePanel {
|
|||||||
return this.eliminarButton;
|
return this.eliminarButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
|
||||||
// >>> IMPORTANT!! <<<
|
|
||||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
|
||||||
this.$$$setupUI$$$();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user