Examples of JDBCContext


Examples of org.jboss.as.cmp.jdbc.JDBCContext

    public boolean isDirty(CmpEntityBeanContext ctx) {
        return foreignKeyFields == null ? relationManager.isDirty() : false;
    }

    public boolean invalidateCache(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
        return fieldState == null ? false : fieldState.isChanged();
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    /**
     * Gets the field state object from the persistence context.
     */
    private FieldState getFieldState(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
        if (fieldState == null) {
            fieldState = new FieldState(ctx);
            jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
        }
        return fieldState;
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    public FieldIterator getLockedIterator(CmpEntityBeanContext ctx) {
        return getEntityState(ctx).getLockedIterator(ctx);
    }

    public void initPersistenceContext(CmpEntityBeanContext ctx) {
        ctx.setPersistenceContext(new JDBCContext(jdbcContextSize, new EntityState()));
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    public boolean isScheduledForBatchCascadeDelete(CmpEntityBeanContext ctx) {
        return getEntityState(ctx).isScheduledForBatchCascadeDelete();
    }

    private static EntityState getEntityState(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        EntityState entityState = jdbcCtx.getEntityState();
        if (entityState == null)
            throw new IllegalStateException("Entity state is null.");
        return entityState;
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

        if (!isReadTimedOut(ctx)) {
            return;
        }

        // clear the field state
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        // invalidate current field state
        /*
     FieldState currentFieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
     if(currentFieldState != null)
        currentFieldState.invalidate();
        */
        jdbcCtx.setFieldState(jdbcContextIndex, null);

        if (foreignKeyFields == null) {
            return;
        }

View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    public boolean isDirty(CmpEntityBeanContext ctx) {
        return foreignKeyFields == null ? relationManager.isDirty() : false;
    }

    public boolean invalidateCache(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
        return fieldState == null ? false : fieldState.isChanged();
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    /**
     * Gets the field state object from the persistence context.
     */
    private FieldState getFieldState(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
        if (fieldState == null) {
            fieldState = new FieldState(ctx);
            jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
        }
        return fieldState;
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    public FieldIterator getLockedIterator(CmpEntityBeanContext ctx) {
        return getEntityState(ctx).getLockedIterator(ctx);
    }

    public void initPersistenceContext(CmpEntityBeanContext ctx) {
        ctx.setPersistenceContext(new JDBCContext(jdbcContextSize, new EntityState()));
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

    public boolean isScheduledForBatchCascadeDelete(CmpEntityBeanContext ctx) {
        return getEntityState(ctx).isScheduledForBatchCascadeDelete();
    }

    private static EntityState getEntityState(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        EntityState entityState = jdbcCtx.getEntityState();
        if (entityState == null)
            throw MESSAGES.entityStateIsNull();
        return entityState;
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.JDBCContext

        if (!isReadTimedOut(ctx)) {
            return;
        }

        // clear the field state
        JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
        // invalidate current field state
        /*
     FieldState currentFieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
     if(currentFieldState != null)
        currentFieldState.invalidate();
        */
        jdbcCtx.setFieldState(jdbcContextIndex, null);

        if (foreignKeyFields == null) {
            return;
        }

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.