Package org.example.beans

Examples of org.example.beans.Cliente


  public static void main(String[] args) {
    XmlBeanFactory factory = new XmlBeanFactory(new FileSystemResource("spring/applicationContext.xml"));
   
    Sistema sistema = (Sistema)factory.getBean("Sistema");
   
    Cliente cliente4 = new Cliente();
   
    cliente4.setId(4);
    cliente4.setNome("Teste4");
   
    sistema.incluirCliente(cliente4);
   
    System.out.println(sistema.getClientes());
  }
View Full Code Here


public class HibernateClienteDAO implements ClienteDAO {
  private List<Cliente> clientes = new ArrayList<Cliente>();
 
  public HibernateClienteDAO() {
    Cliente cliente1 = new Cliente();
    Cliente cliente2 = new Cliente();
    Cliente cliente3 = new Cliente();
   
    cliente1.setId(1);
    cliente1.setNome("Teste1");
   
    cliente2.setId(2);
    cliente2.setNome("Teste2");
   
    cliente3.setId(3);
    cliente3.setNome("Teste3");
   
    clientes.add(cliente1);
    clientes.add(cliente2);
    clientes.add(cliente3);
  }
View Full Code Here

TOP

Related Classes of org.example.beans.Cliente

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.