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

Hollow

public class Hollow extends LifeCycleState

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


      
        // 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 = true;
        isTransactional = false;
        isDirty = false;
        isNew = false;
        isDeleted = false;
        isBeforeImageUpdatable = false;
        isRefreshable = false;
        needsRegister = false;
        needsReload = true;
        needsRestoreOnRollback = false;
        updateAction = ActionDesc.LOG_NOOP;

        stateType = HOLLOW;
    
Methods Summary
public booleanneedsReload(boolean optimistic, boolean nontransactionalRead, boolean transactionActive)

        //
        // Don't allow reload in the transaction is not active
        // and nontransactionalRead is false.
        //
        if (!transactionActive && !nontransactionalRead) {
            return false;
        }

        return true;
    
public LifeCycleStatetransitionDeletePersistent()
Operations that cause life cycle state transitions

        return changeState(P_DELETED);
    
public LifeCycleStatetransitionReadField(boolean optimistic, boolean nontransactionalRead, boolean transactionActive)

        if (!nontransactionalRead) {
            assertTransaction(transactionActive);
        }

        if (optimistic || (nontransactionalRead && !transactionActive)) {
            return changeState(P_NON_TX);
        } else {
            return changeState(P_CLEAN);
        }
    
public LifeCycleStatetransitionWriteField(boolean transactionActive)

        assertTransaction(transactionActive);
        return changeState(P_DIRTY);