Package org.hibernate.test.sql.hand

Examples of org.hibernate.test.sql.hand.Person


  public void testSQLQueryInterface() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");

    s.persist(ifa);
    s.persist(jboss);
    s.persist(gavin);
View Full Code Here


  public void testResultSetMappingDefinition() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");

    s.persist(ifa);
    s.persist(jboss);
    s.persist(gavin);
View Full Code Here

  public void testMappedAliasStrategy() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");
    Serializable orgId = s.save(jboss);
    Serializable orgId2 = s.save(ifa);
    s.save(gavin);
    s.save(emp);
View Full Code Here

  /* test for native sql composite id joins which has never been implemented */
  public void testCompositeIdJoinsFailureExpected() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Person person = new Person();
    person.setName( "Noob" );

    Product product = new Product();
    product.setProductId( new Product.ProductId() );
    product.getProductId().setOrgid( "x" );
    product.getProductId().setProductnumber( "1234" );
View Full Code Here

  public void testAutoDetectAliasing() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");
    Serializable orgId = s.save(jboss);
    Serializable orgId2 = s.save(ifa);
    s.save(gavin);
    s.save(emp);
View Full Code Here

  public void testExplicitReturnAPI() {
    Session s = openSession();
    s.beginTransaction();
    Organization jboss = new Organization( "JBoss" );
    Person me = new Person( "Steve" );
    Employment emp = new Employment( me, jboss, "US" );
    Serializable jbossId = s.save( jboss );
    s.save( me );
    s.save( emp );
    s.getTransaction().commit();
View Full Code Here

  }

  public void testAddJoinForManyToMany() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Person gavin = new Person( "Gavin" );
    Person max = new Person( "Max" );
    Person pete = new Person( "Pete" );

    Group hibernate = new Group( "Hibernate" );
    Group seam = new Group( "Seam" );

    s.persist( gavin );
View Full Code Here

  public void testHandSQL() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization( "IFA" );
    Organization jboss = new Organization( "JBoss" );
    Person gavin = new Person( "Gavin" );
    Employment emp = new Employment( gavin, jboss, "AU" );
    Serializable orgId = s.save( jboss );
    s.save( ifa );
    s.save( gavin );
    s.save( emp );
    t.commit();

    t = s.beginTransaction();
    Person christian = new Person( "Christian" );
    s.save( christian );
    Employment emp2 = new Employment( christian, jboss, "EU" );
    s.save( emp2 );
    t.commit();
    s.close();
View Full Code Here

  public void testSQLQueryInterface() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");

    s.persist(ifa);
    s.persist(jboss);
    s.persist(gavin);
View Full Code Here

  public void testResultSetMappingDefinition() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");

    s.persist(ifa);
    s.persist(jboss);
    s.persist(gavin);
View Full Code Here

TOP

Related Classes of org.hibernate.test.sql.hand.Person

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.