Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.OQLQuery.bind()


        LOG.info("Delete everything");
        _db.begin();
        oql = _db.getOQLQuery("SELECT p FROM "
                + PersistentObject.class.getName() + " p WHERE id=$1");
        oql.bind(PersistentObject.DEFAULT_ID);
        qres = oql.execute();
        while (qres.hasMore()) {
            _db.remove(qres.next());
        }
        oql.close();
View Full Code Here


        Database db = _category.getDatabase();
        db.begin();
       
        OQLQuery query = db.getOQLQuery("SELECT entity FROM "
                + AutostoreMain.class.getName() + " entity WHERE id = $1");
        query.bind(new Integer(1));
        QueryResults results = query.execute();
       
        AutostoreMain entity = (AutostoreMain) results.next();

        assertNotNull(entity);
View Full Code Here

        // the cache engine.
        _db.begin();
       
        OQLQuery oql = _db.getOQLQuery("SELECT object FROM "
                + Sample.class.getName() + " object WHERE id = $1");
        oql.bind(new Integer(Sample.DEFAULT_ID));
       
        QueryResults enumeration = oql.execute();
        while (enumeration.hasMore()) {
            enumeration.next();
        }
View Full Code Here

        LOG.debug("Delete everything");
        _db.begin();
        oql = _db.getOQLQuery("SELECT p FROM "
                + TimeStampableObject.class.getName() + " p WHERE id=$1");
        oql.bind(TimeStampableObject.DEFAULT_ID);
        qres = oql.execute();
        while (qres.hasMore()) {
            _db.remove(qres.next());
        }
        oql.close();
View Full Code Here

        // Find the first object and remove it
        //object = (TestKeyGenObject) _db.load( objClass, object.getId() );
        oql = _db.getOQLQuery();
        oql.create("SELECT object FROM " + objClass.getName()
                + " object WHERE id = $1");
        oql.bind(object.getId());
        enumeration = oql.execute();
        LOG.debug("Removing first object: " + object);
        if (enumeration.hasMore()) {
            object = (AbstractKeyGenObject) enumeration.next();
            _db.remove(object);
View Full Code Here

        LOG.debug("Delete everything");
        _db.begin();
        oql = _db.getOQLQuery("SELECT p FROM "
                + TimeStampableObject.class.getName() + " p WHERE id=$1");
        oql.bind(TimeStampableObject.DEFAULT_ID);
        qres = oql.execute();
        while (qres.hasMore()) {
            _db.remove(qres.next());
        }
        oql.close();
View Full Code Here

        // Find the second object and remove it
        //ext = (TestKeyGenObject) _db.load( extClass, ext.getId() );
        oql = _db.getOQLQuery();
        oql.create("SELECT ext FROM " + extClass.getName()
                + " ext WHERE id = $1");
        oql.bind(ext.getId());
        enumeration = oql.execute();
        LOG.debug("Removing second object: " + ext);
        if (enumeration.hasMore()) {
            ext = (AbstractKeyGenObject) enumeration.next();
            _db.remove(ext);
View Full Code Here

        // Find the first object and remove it
        //object = (TestKeyGenObject) _db.load( objClass, object.getId() );
        oql = _db.getOQLQuery();
        oql.create("SELECT object FROM " + objClass.getName()
                + " object WHERE id = $1");
        oql.bind(object.getId());
        enumeration = oql.execute();
        LOG.debug("Removing first object: " + object);
        if (enumeration.hasMore()) {
            object = (AbstractKeyGenObjectTypeString) enumeration.next();
            _db.remove(object);
View Full Code Here

        // Find the second object and remove it
        //ext = (TestKeyGenObject) _db.load( extClass, ext.getId() );
        oql = _db.getOQLQuery();
        oql.create("SELECT ext FROM " + extClass.getName()
                + " ext WHERE id = $1");
        oql.bind(ext.getId());
        enumeration = oql.execute();
        LOG.debug("Removing second object: " + ext);
        if (enumeration.hasMore()) {
            ext = (AbstractKeyGenObjectTypeString) enumeration.next();
            _db.remove(ext);
View Full Code Here

        LOG.info( "Begin transaction to remove Computer object" );
       
        // Look up the computer and if found in the database,
        // delete ethis object from the database
        computerOql = db.getOQLQuery( "SELECT c FROM myapp.Computer c WHERE c.id = $1" );
        computerOql.bind( 44 );
        results = computerOql.execute();

        while ( results.hasMore() )
        {
            computer = ( Computer ) results.next();
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.