Examples of fetchObjectField()


Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchObjectField()

        // fetch group 'g2'; make sure it is loaded
        int field = sm.getMetaData().getField("g").getIndex();
        try {
            assertTrue(sm.getLoaded().get(field));
            assertEquals(oid1,
                ((FetchGroupTestObject) sm.fetchObjectField(field)).getId());
        } catch (junit.framework.AssertionFailedError afe) {
            bug(623, afe, "One to one mappings do not work with custom "
                + "fetch groups");
        }
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchObjectField()

        // fetch group 'g2'; make sure it is loaded
        int field = sm.getMetaData().getField("g").getIndex();
        try {
            assertTrue(sm.getLoaded().get(field));
            assertEquals(oid1,
                ((FetchGroupTestObject) sm.fetchObjectField(field)).getId());
        } catch (junit.framework.AssertionFailedError afe) {
            bug(623, afe, "One to one mappings do not work with custom "
                + "fetch groups");
        }
    }
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.DetachFieldManager.fetchObjectField()

                if (loadedFields[i])
                {
                    try
                    {
                        // Just fetch the field since we are usually called in postCommit() so dont want to update it
                        detachFieldManager.fetchObjectField(i);
                    }
                    catch (EndOfFetchPlanGraphException eofpge)
                    {
                        Object value = provideField(i);
                        if (api.isPersistable(value))
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.DetachFieldManager.fetchObjectField()

                if (loadedFields[i])
                {
                    try
                    {
                        // Just fetch the field since we are usually called in postCommit() so dont want to update it
                        detachFieldManager.fetchObjectField(i);
                    }
                    catch (EndOfFetchPlanGraphException eofpge)
                    {
                        Object value = provideField(i);
                        if (api.isPersistable(value))
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.FieldManager.fetchObjectField()

                if (loadedFields[i])
                {
                    try
                    {
                        // Just fetch the field since we are usually called in postCommit() so dont want to update it
                        detachFieldManager.fetchObjectField(i);
                    }
                    catch (EndOfFetchPlanGraphException eofpge)
                    {
                        Object value = provideField(i);
                        if (api.isPersistable(value))
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.FieldManager.fetchObjectField()

            ec.getApiAdapter().isLoaded(sm, mmd.getAbsoluteFieldNumber());
        }

        FieldManager fm = new SingleValueFieldManager();
        sm.provideFields(new int[] {mmd.getAbsoluteFieldNumber()}, fm);
        return fm.fetchObjectField(mmd.getAbsoluteFieldNumber());
    }

    /**
     * Create an equality expression "(expr == id)" for an application identity using reflection
     * to retrieve values and generate the mappings.
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.FieldManager.fetchObjectField()

                // Make sure the field is loaded
                nucleusCtx.getApiAdapter().isLoaded(sm, mmd.getAbsoluteFieldNumber());
            }
            FieldManager fm = new SingleValueFieldManager();
            sm.provideFields(new int[] {mmd.getAbsoluteFieldNumber()}, fm);
            return fm.fetchObjectField(mmd.getAbsoluteFieldNumber());
        }
        else if (cmd.getIdentityType() == IdentityType.DATASTORE)
        {
            OID oid = (OID)nucleusCtx.getApiAdapter().getIdForObject(value);
            return oid != null ? oid.getKeyValue() : null;
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.FieldManager.fetchObjectField()

                // Make sure the field is loaded
                sm.isLoaded(mmd.getAbsoluteFieldNumber());
            }
            FieldManager fm = new SingleValueFieldManager();
            sm.provideFields(new int[] {mmd.getAbsoluteFieldNumber()}, fm);
            return fm.fetchObjectField(mmd.getAbsoluteFieldNumber());
        }
        else if (cmd.getIdentityType() == IdentityType.DATASTORE)
        {
            OID oid = (OID)nucleusCtx.getApiAdapter().getIdForObject(value);
            return oid != null ? oid.getKeyValue() : null;
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.FieldManager.fetchObjectField()

                if (loadedFields[i])
                {
                    try
                    {
                        // Just fetch the field since we are usually called in postCommit() so dont want to update it
                        detachFieldManager.fetchObjectField(i);
                    }
                    catch (EndOfFetchPlanGraphException eofpge)
                    {
                        Object value = provideField(i);
                        if (api.isPersistable(value))
View Full Code Here

Examples of org.datanucleus.store.fieldmanager.FieldManager.fetchObjectField()

            // we expect that primary key field are non null
            om.getApiAdapter().isLoaded(sm, fmd.getAbsoluteFieldNumber());
        }
        sm.provideFields(new int[] {fmd.getAbsoluteFieldNumber()},fm);

        return fm.fetchObjectField(fmd.getAbsoluteFieldNumber());
    }

    /**
     * Method to save a "raw" value that this literal represents.
     * This value differs from the literal value since that is of the same type as this literal.
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.