Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.Database.begin()


    OQLQuery      computerOql;
    QueryResults  results;

    db = _jdo.getDatabase();

    db.begin();
    writer.println( "Begin transaction" );

    // Look up the product and if found in the database,
    // delete this object from the database
    productOql = db.getOQLQuery( "SELECT p FROM myapp.Product p WHERE id = $1" );
View Full Code Here


    // Checkpoint commits all the updates to the database
    // but leaves the transaction (and locks) open
    writer.println( "Transaction checkpoint" );
    db.commit();

    db.begin();
    // If no such group exists in the database, create a new
    // object and persist it
    groupOql.bind( 3 );
    results = groupOql.execute();
    if ( ! results.hasMore() ) {
View Full Code Here

    Marshaller     marshaller;

    marshaller = new Marshaller( writer );
    marshaller.setMapping( _mapping );

    db.begin();
    marshaller.marshal( db.load( Product.class, new Integer( 4 ) ) );
    computerOql = db.getOQLQuery( "SELECT c FROM myapp.Computer c" );
    results = computerOql.execute();
    while( results.hasMore() )
      marshaller.marshal( results.next() );
View Full Code Here

    public void testReadWriteEmpty() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.getCacheManager().expireCache();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "SELECT o FROM " + Service.class.getName() + " o order by o.id");
View Full Code Here

   
    public void testReadWriteCached() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "SELECT o FROM " + Service.class.getName() + " o order by o.id");
View Full Code Here

    public void testReadOnlyEmpty() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.getCacheManager().expireCache();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "SELECT o FROM " + Service.class.getName() + " o order by o.id");
View Full Code Here

   
    public void testReadOnlyCached() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "SELECT o FROM " + Service.class.getName() + " o order by o.id");
View Full Code Here

    public void testReadWriteOidEmpty() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.getCacheManager().expireCache();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "CALL SQL select PTF_SERVICE.ID as ID "
View Full Code Here

   
    public void testReadWriteOidCached() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "CALL SQL select PTF_SERVICE.ID as ID "
View Full Code Here

    public void testReadOnlyOidEmpty() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.getCacheManager().expireCache();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "CALL SQL select PTF_SERVICE.ID as ID "
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.