Package javax.jdo

Examples of javax.jdo.Extent


        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildResult.class, true );
            pm.getFetchPlan().addGroup( BUILD_RESULT_WITH_DETAILS_FETCH_GROUP );

            Query query = pm.newQuery( extent );

            String parameters = "int projectId, long fromDate";
View Full Code Here


        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildResult.class, true );

            Query query = pm.newQuery( extent );

            query.declareParameters( "int projectId" );
View Full Code Here

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildResult.class, true );

            Query query = pm.newQuery( extent );

            query.declareParameters( "int projectId, int buildNumber" );
View Full Code Here

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildResult.class, true );

            Query query = pm.newQuery( extent );

            query.declareParameters( "int projectId" );
View Full Code Here

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildResult.class, true );

            Query query = pm.newQuery( extent );

            String filter = "this.project.buildNumber == this.buildNumber";
View Full Code Here

        BatchTestRunner.run(CloseOfExtentIteratorIsIteratorSpecific.class);
    }

    /** */
    public void test() {
        Extent ex = getExtent();
        beginTransaction();
        Iterator it1 = ex.iterator();
        ex.close(it1);
        int count = countIterator(ex.iterator());
        if (count != 2) {
            fail(ASSERTION_FAILED,
                 "iterating Employees after close of first iterator; counted " + count + " instances; should be 2");
        }
        Query q = getPM().newQuery(ex);
View Full Code Here

    /** */
    protected Collection getAllObjects(PersistenceManager pm, Class pcClass) {
        Collection col = new Vector() ;
        Query query = pm.newQuery();
        query.setClass(pcClass);
        Extent candidates = null;
        try {
            candidates = pm.getExtent(pcClass, false);
        } catch (JDOException ex) {
            if (debug) logger.debug("Exception thrown for getExtent of class " +
                    pcClass.getName());
View Full Code Here

            createAndModifyInstance();

            // iterate the extent and use the object in a new datastore transaction
            pm.currentTransaction().setOptimistic(false);
            pm.currentTransaction().begin();
            Extent e = pm.getExtent(StateTransitionObj.class, false);
            for (Iterator i = e.iterator(); i.hasNext();) {
                StateTransitionObj next = (StateTransitionObj)i.next();
                if (oid.equals(pm.getObjectId(next))) {
                    // found instance
                    int value = next.readField();
                    if (value != originalValue){
View Full Code Here

    private boolean doPersistentInstancesExist()
    {
        boolean ret;
        Transaction t = pm.currentTransaction();
        t.begin();
        Extent e = pm.getExtent(StateTransitionObj.class, false);
        Iterator iter = e.iterator();
        ret = iter.hasNext();
        t.rollback();
        return ret;
    }
View Full Code Here

    }

    /** */
    public StateTransitionObj getHollowInstance()
    {
        Extent extent = pm.getExtent(StateTransitionObj.class, false);
        Iterator iter = extent.iterator();
        if( !iter.hasNext() ){
            if (debug)
                logger.debug("Extent for StateTransitionObj should not be empty");
            return null;
        }
View Full Code Here

TOP

Related Classes of javax.jdo.Extent

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.