Examples of PlanetCheatSheet


Examples of org.hibernate.test.annotations.id.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.PlanetCheatSheet

  }

  public void testEnumAsId() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    PlanetCheatSheet mercury = new PlanetCheatSheet();
    mercury.setPlanet(Planet.MERCURY);
    mercury.setMass(3.303e+23);
    mercury.setRadius(2.4397e6);
    mercury.setNumberOfInhabitants(0);
    s.persist(mercury);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    PlanetCheatSheet mercuryFromDb = (PlanetCheatSheet) s.get(PlanetCheatSheet.class, mercury.getPlanet());
    assertNotNull(mercuryFromDb);
    log.debug(mercuryFromDb.toString());
    s.delete(mercuryFromDb);
    tx.commit();
    s.close();
   
    s = openSession();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.