Package br.com.caelum.stella.hibernate.example

Examples of br.com.caelum.stella.hibernate.example.Modelo


import br.com.caelum.stella.hibernate.example.ModeloDAO;

public class HibernatePersistenceExample {

  public static void main(String[] args) {
    Modelo valido = criaModeloValido();
    save(valido);
    Modelo invalido = criaModeloInvalido();
    save(invalido);
    listaModelosPersistidos();
  }
View Full Code Here


    save(invalido);
    listaModelosPersistidos();
  }

  private static Modelo criaModeloInvalido() {
    Modelo modeloInvalido = new Modelo();
    modeloInvalido.setCpf("63101405078");
    modeloInvalido.setCnpj("5");
    return modeloInvalido;
  }
View Full Code Here

    modeloInvalido.setCnpj("5");
    return modeloInvalido;
  }

  private static Modelo criaModeloValido() {
    Modelo modeloValido = new Modelo();
    modeloValido.setCpf("63101405076");
    modeloValido.setCnpj("71693607000142");
    return modeloValido;
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.stella.hibernate.example.Modelo

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.