Package org.hibernate.test.sql.hand

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


  public void testTextTypeInSQLQuery() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    String description = buildLongString( 15000, 'a' );
    TextHolder holder = new TextHolder( description );
    s.persist( holder );
    t.commit();
    s.close();

    s = openSession();
View Full Code Here


  public void testTextProperty() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    String description = buildLongString( 15000, 'a' );
    TextHolder holder = new TextHolder( description );
    s.save( holder );
    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
    holder = ( TextHolder ) s.getTextHolder.class, holder.getId() );
    assertEquals( description, holder.getDescription() );
    description = buildLongString( 15000, 'b' );
    holder.setDescription( description );
    s.save( holder );
    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
    holder = ( TextHolder ) s.getTextHolder.class, holder.getId() );
    assertEquals( description, holder.getDescription() );
    s.delete( holder );
    t.commit();
    s.close();
  }
View Full Code Here

TOP

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

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.