Package org.hibernate

Examples of org.hibernate.Session.persist()


    Address mainStreet = new Address();
    mainStreet.setId( 1L );
    mainStreet.setCity( "London" );
    mainStreet.setStreet( "Main Street" );
    session.persist( mainStreet );

    Author alfred = new Author();
    alfred.setId( 1L );
    alfred.setName( "alfred" );
    alfred.setAddress( mainStreet );
View Full Code Here


    Author alfred = new Author();
    alfred.setId( 1L );
    alfred.setName( "alfred" );
    alfred.setAddress( mainStreet );
    session.persist( alfred );

    Author alma = new Author();
    alma.setId( 2L );
    alma.setName( "alma" );
    alma.setAddress( mainStreet );
View Full Code Here

    Author alma = new Author();
    alma.setId( 2L );
    alma.setName( "alma" );
    alma.setAddress( mainStreet );
    session.persist( alma );

    Author withoutName = new Author();
    withoutName.setId( 3L );
    withoutName.setName( null );
    withoutName.setAddress( mainStreet );
View Full Code Here

    Author withoutName = new Author();
    withoutName.setId( 3L );
    withoutName.setName( null );
    withoutName.setAddress( mainStreet );
    session.persist( withoutName );

    Calendar calendar = Calendar.getInstance( TimeZone.getTimeZone( "GMT" ) );
    calendar.clear();
    calendar.set( 2012, 8, 25 );
View Full Code Here

    Hypothesis socrates = new Hypothesis();
    socrates.setId( "13" );
    socrates.setDescription( "There are more than two dimensions over the shadows we see out of the cave" );
    socrates.setPosition( 1 );
    socrates.setDate( calendar.getTime() );
    session.persist( socrates );

    calendar.set( Calendar.YEAR, 2011 );
    Hypothesis peano = new Hypothesis();
    peano.setId( "14" );
    peano.setDescription( "Peano's curve and then Hilbert's space filling curve proof the connection from mono-dimensional to bi-dimensional space" );
View Full Code Here

    peano.setId( "14" );
    peano.setDescription( "Peano's curve and then Hilbert's space filling curve proof the connection from mono-dimensional to bi-dimensional space" );
    peano.setPosition( 2 );
    peano.setDate( calendar.getTime() );
    peano.setAuthor( alma );
    session.persist( peano );

    calendar.set( Calendar.YEAR, 2010 );
    Hypothesis sanne = new Hypothesis();
    sanne.setId( "15" );
    sanne.setDescription( "Hilbert's proof of connection to 2 dimensions can be induced to reason on N dimensions" );
View Full Code Here

    Hypothesis sanne = new Hypothesis();
    sanne.setId( "15" );
    sanne.setDescription( "Hilbert's proof of connection to 2 dimensions can be induced to reason on N dimensions" );
    sanne.setPosition( 3 );
    sanne.setDate( calendar.getTime() );
    session.persist( sanne );

    calendar.set( Calendar.YEAR, 2009 );
    Hypothesis shortOne = new Hypothesis();
    shortOne.setId( "16" );
    shortOne.setDescription( "stuff works" );
View Full Code Here

    shortOne.setId( "16" );
    shortOne.setDescription( "stuff works" );
    shortOne.setPosition( 4 );
    shortOne.setDate( calendar.getTime() );
    shortOne.setAuthor( alfred );
    session.persist( shortOne );

    calendar.set( Calendar.YEAR, 2008 );
    Hypothesis truth = new Hypothesis();
    truth.setId( "17" );
    truth.setDescription( "Is the truth out there?" );
View Full Code Here

    Hypothesis truth = new Hypothesis();
    truth.setId( "17" );
    truth.setDescription( "Is the truth out there?" );
    truth.setPosition( 5 );
    truth.setDate( calendar.getTime() );
    session.persist( truth );

    calendar.set( Calendar.YEAR, 2007 );
    Hypothesis truthAnswer = new Hypothesis();
    truthAnswer.setId( "18" );
    truthAnswer.setDescription( "The truth out there." );
View Full Code Here

    Hypothesis truthAnswer = new Hypothesis();
    truthAnswer.setId( "18" );
    truthAnswer.setDescription( "The truth out there." );
    truthAnswer.setPosition( 6 );
    truthAnswer.setDate( calendar.getTime() );
    session.persist( truthAnswer );

    calendar.set( Calendar.YEAR, 2006 );
    Hypothesis noDescription = new Hypothesis();
    noDescription.setId( "19" );
    noDescription.setDescription( null );
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.