FileDocCategorySizeDatePackage
AutoPersistentNewDeleted.javaAPI DocGlassfish v2 API4631Fri May 04 22:35:16 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.state

AutoPersistentNewDeleted

public class AutoPersistentNewDeleted extends LifeCycleState

Fields Summary
private static final ResourceBundle
messages
I18N message handler
Constructors Summary
public AutoPersistentNewDeleted()


      
        // these flags are set only in the constructor
        // and shouldn't be changed afterwards
        // (cannot make them final since they are declared in superclass
        // but their values are specific to subclasses)
        isPersistent = true;
        isPersistentInDataStore = false;
        isAutoPersistent = true;
        isTransactional = true;
        isDirty = true;
        isNew = true;
        isDeleted = true;
        isNavigable = false;
        isRefreshable = false;
        isBeforeImageUpdatable = false;
        needsRegister = true;
        needsReload = false;
        needsRestoreOnRollback = true;
        updateAction = ActionDesc.LOG_NOOP;

        // The following flag allows merge
        needMerge = false;

        stateType = AP_NEW_DELETED;
    
Methods Summary
public booleanneedsRestoreOnRollback(boolean retainValues)

        //
        // This is a special case where retores doesn't depend on
        // retainValues.
        //
        return needsRestoreOnRollback;
    
public LifeCycleStatetransitionCommit(boolean retainValues)

        return changeState(TRANSIENT);
    
public LifeCycleStatetransitionMakePersistent()

        return changeState(P_NEW_DELETED);
    
public LifeCycleStatetransitionReadField(boolean optimisitic, boolean nontransactonalRead, boolean transactionActive)

        // Cannot read a deleted object
        throw new JDOUserException(I18NHelper.getMessage(messages,
                "jdo.lifecycle.deleted.accessField")); // NOI18N
    
public LifeCycleStatetransitionRollback(boolean retainValues)

        return changeState(TRANSIENT);
    
public LifeCycleStatetransitionWriteField(boolean transactionActive)

        // Cannot update a deleted object
        throw new JDOUserException(I18NHelper.getMessage(messages,
                "jdo.lifecycle.deleted.accessField")); // NOI18N