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

            fieldState.lastRead = System.currentTimeMillis();
    }

    public void resetPersistenceContext(CmpEntityBeanContext ctx) {
        if (isReadTimedOut(ctx)) {
            JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
            FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
            if (fieldState != null)
                fieldState.reset();
        }
    }
View Full Code Here

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

        }
        cmrChainLink.setNextLink(nextCMRChainLink);
    }

    private FieldState getFieldState(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
        FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
        if (fieldState == null) {
            fieldState = new FieldState(jdbcCtx);
            jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
        }
        return fieldState;
    }
View Full Code Here

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

        return readInterval >= getReadTimeOut();
    }

    public void resetPersistenceContext(CmpEntityBeanContext ctx) {
        if (isReadTimedOut(ctx)) {
            JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
            FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
            if (fieldState != null)
                fieldState.reset();
        }
    }
View Full Code Here

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

    protected void setDirtyAfterGet(CmpEntityBeanContext ctx) {
        getFieldState(ctx).setCheckDirty();
    }

    private FieldState getFieldState(CmpEntityBeanContext ctx) {
        JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
        FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
        if (fieldState == null) {
            fieldState = new FieldState(jdbcCtx);
            jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
        }
        return fieldState;
    }
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.JDBCContext

   public void resetPersistenceContext(EntityEnterpriseContext ctx)
   {
      if(isReadTimedOut(ctx))
      {
         JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
         FieldState fieldState = (FieldState)jdbcCtx.getFieldState(jdbcContextIndex);
         if(fieldState != null)
            fieldState.reset();
      }
   }
View Full Code Here

Examples of xgenerator.jdbc.JdbcContext

      tables.add("EAP_ROLES");
      tables.add("EAP_MENUS");
      return tables;
    }
   
    JdbcContext jdbcContext = JdbcContext.getJdbcContext(dataSourceName);
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
      conn = jdbcContext.currentConnection();
      stmt = conn.createStatement();
      String sql = "SELECT T.TABLE_NAME FROM USER_TABLES T ORDER BY T.TABLE_NAME";
      //System.out.println(sql);
      rs = stmt.executeQuery(sql);
     
View Full Code Here

Examples of xgenerator.jdbc.JdbcContext

   * @see xgenerator.dao.impl.MetadataDaoJdbcAdapter#getTables(java.lang.String)
   */
  public Vector<String> getTables(String dataSourceName) {
    Vector<String> tableList = new Vector<String>();
   
    JdbcContext jdbcContext = JdbcContext.getJdbcContext(dataSourceName);
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
      conn = jdbcContext.currentConnection();
      stmt = conn.createStatement();
      String sql = "SELECT T.NAME FROM sysobjects T WHERE TYPE ='U' ORDER BY T.NAME";
      rs = stmt.executeQuery(sql);
     
      while(rs.next()) {
View Full Code Here

Examples of xgenerator.jdbc.JdbcContext

   * @see xgenerator.dao.impl.MetadataDaoJdbcAdapter#getTables(java.lang.String)
   */
  public Vector<String> getTables(String dataSourceName) {
    Vector<String> tableList = new Vector<String>();
   
    JdbcContext jdbcContext = JdbcContext.getJdbcContext(dataSourceName);
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
      conn = jdbcContext.currentConnection();
      String tableSchema = conn.getCatalog();
      stmt = conn.createStatement();
      String sql = "SELECT T.TABLE_NAME FROM INFORMATION_SCHEMA.TABLES T WHERE T.TABLE_CATALOG='DEF' AND TABLE_SCHEMA='" + tableSchema + "' ORDER BY T.TABLE_NAME";
      rs = stmt.executeQuery(sql);
     
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.