Package javax.jdo.spi

Examples of javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier


        PersistenceCapable mock = newMock(PERSISTENT+TRANSACTIONAL+DIRTY);
        assertObjectState("persistent-dirty", ObjectState.PERSISTENT_DIRTY, mock);
    }

    public void testPersistentDeleted() {
        PersistenceCapable mock = newMock(PERSISTENT+TRANSACTIONAL+DIRTY+DELETED);
        assertObjectState("persistent-deleted", ObjectState.PERSISTENT_DELETED, mock);
    }
View Full Code Here


        PersistenceCapable mock = newMock(PERSISTENT+TRANSACTIONAL+DIRTY+DELETED);
        assertObjectState("persistent-deleted", ObjectState.PERSISTENT_DELETED, mock);
    }

    public void testPersistentNewDeleted() {
        PersistenceCapable mock = newMock(PERSISTENT+TRANSACTIONAL+NEW+DIRTY+DELETED);
        assertObjectState("persistent-new-deleted", ObjectState.PERSISTENT_NEW_DELETED, mock);
    }
View Full Code Here

        PersistenceCapable mock = newMock(PERSISTENT+TRANSACTIONAL+NEW+DIRTY+DELETED);
        assertObjectState("persistent-new-deleted", ObjectState.PERSISTENT_NEW_DELETED, mock);
    }

    public void testDetachedClean() {
        PersistenceCapable mock = newMock(DETACHED);
        assertObjectState("detached-clean", ObjectState.DETACHED_CLEAN, mock);
    }
View Full Code Here

        PersistenceCapable mock = newMock(DETACHED);
        assertObjectState("detached-clean", ObjectState.DETACHED_CLEAN, mock);
    }

    public void testDetachedDirty() {
        PersistenceCapable mock = newMock(DETACHED+DIRTY);
        assertObjectState("detached-dirty", ObjectState.DETACHED_DIRTY, mock);
    }
View Full Code Here

        }
    }

    public void postDelete( InstanceLifecycleEvent evt )
    {
        PersistenceCapable obj = ( (PersistenceCapable) evt.getSource() );

        if ( obj == null )
        {
            // Do not track null objects.
            // These events are typically a product of an internal lifecycle event.
View Full Code Here

        }
    }

    public void postDelete( InstanceLifecycleEvent evt )
    {
        PersistenceCapable obj = ( (PersistenceCapable) evt.getSource() );

        if ( obj == null )
        {
            // Do not track null objects.
            // These events are typically a product of an internal lifecycle event.
View Full Code Here

     * @param o the object to check
     */
    private void singleFieldIdentity(AbstractPCPointSingleField o) {
        assertPersistenceCapable(o);
        SingleFieldIdentity sfi = (SingleFieldIdentity) makePersistent(o);
        PersistenceCapable pc = (PersistenceCapable) o;
        ObjectIdFieldConsumer objectIdFieldConsumer =
            new ObjectIdFieldConsumer();
        pc.jdoCopyKeyFieldsFromObjectId(objectIdFieldConsumer, sfi);
        if (!objectIdFieldConsumer.equals(sfi)) {
            fail(ASSERTION_FAILED +
                    "pc.jdoCopyKeyFieldsFromObjectId copies unexpected " +
                    "fields into an object id field consumer using a " +
                    "single field indentity object id.");
View Full Code Here

     * on a persistent instance with its primary key field initialized,
     * @param o the object to check
     */
    private void singleFieldIdentityNotInitialized(AbstractPCPointSingleField o) {
        assertPersistenceCapable(o);
        PersistenceCapable pc = (PersistenceCapable) o;
        try {
            Object sfi = pc.jdoNewObjectIdInstance();
            String message = ASSERTION_A7_12_38_FAILED +
            "pc.jdoNewObjectIdInstance should throw " +
            "JDONullIdentityException if PK field is null, but it returned "+sfi;
            fail(message);
        } catch (JDONullIdentityException e) {
View Full Code Here

     * @param o the persistent instance to check
     */
    private void singleFieldIdentityInitialized(AbstractPCPointSingleField o) {
        assertPersistenceCapable(o);
        makePersistent(o);
        PersistenceCapable pc = (PersistenceCapable) o;
        SingleFieldIdentity sfi =
            (SingleFieldIdentity) pc.jdoNewObjectIdInstance();
        if (!o.equalsPKField(sfi)) {
            fail(ASSERTION_A7_12_39_FAILED +
                    "pc.jdoNewObjectIdInstance() returned unexpected " +
                    "single field identity object id.");
        }
View Full Code Here

        }
    }

    public void postDelete( InstanceLifecycleEvent evt )
    {
        PersistenceCapable obj = ( (PersistenceCapable) evt.getSource() );

        if ( obj == null )
        {
            // Do not track null objects.
            // These events are typically a product of an internal lifecycle event.
View Full Code Here

TOP

Related Classes of javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier

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.