Package org.hibernate.test.dynamicentity

Examples of org.hibernate.test.dynamicentity.Person


    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here


    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

TOP

Related Classes of org.hibernate.test.dynamicentity.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.