Package com.founder.fix.bpmn2extensions.sqlmappingconfig

Examples of com.founder.fix.bpmn2extensions.sqlmappingconfig.DataBaseTable


   * @param queryLocation
   * @return
   */
  public static String getTableSelect(String tableId,QueryLocation queryLocation){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    if(!StringUtil.getBoolean(processEngineConfigurationImpl.getPigeonholeConfig().getIsEnable())){
      return dataBaseTable.getTableValue();
    }
    String tableName = "";
    if(QueryLocation.HIS.equals(queryLocation)){
      tableName =  dataBaseTable.getArchiveTable();
    }else if(QueryLocation.RUN_HIS.equals(queryLocation)){
      StringBuilder sbColumn = new StringBuilder();
      for(Column column :dataBaseTable.getColumn()){
        sbColumn.append(column.getColumn());
        sbColumn.append(",");
      }
      String columnString = sbColumn.toString().substring(0,sbColumn.toString().length()-1);
      tableName = dataBaseTable.getTableValue();
      String hisTableName = dataBaseTable.getArchiveTable();
     
      tableName = "(select "+columnString+" from "+tableName+" union all select "+columnString+" from "+hisTableName+")";
    }else{
      tableName = dataBaseTable.getTableValue();
    }
    return tableName;
  }
View Full Code Here


   * @param tableId
   * @return
   */
  public static String getDefaultTableName(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    return dataBaseTable.getTableValue();
  }
View Full Code Here

   * @param tableId
   * @return
   */
  public static String getArchiveTableName(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    return dataBaseTable.getArchiveTable();
  }
View Full Code Here

   * @param tableId
   * @return
   */
  public static String getColumnString(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    return getColumnString(dataBaseTable);
  }
View Full Code Here

    return columnString;
  }
 
  public static String getColumnStringWithOutArchiveTime(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    StringBuilder sbColumn = new StringBuilder();
    for(Column column :dataBaseTable.getColumn()){
      if(!column.getColumn().equals("ARCHIVE_TIME")){
        sbColumn.append(column.getColumn());
        sbColumn.append(",");
      }
    }
View Full Code Here

   * @param queryLocation
   * @return
   */
  public static String getTableSelect(String tableId,QueryLocation queryLocation){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    if(!StringUtil.getBoolean(processEngineConfigurationImpl.getPigeonholeConfig().getIsEnable())){
      return dataBaseTable.getTableValue();
    }
    String tableName = "";
    if(QueryLocation.HIS.equals(queryLocation)){
      tableName =  dataBaseTable.getArchiveTable();
    }else if(QueryLocation.RUN_HIS.equals(queryLocation)){
      StringBuilder sbColumn = new StringBuilder();
      for(Column column :dataBaseTable.getColumn()){
        sbColumn.append(column.getColumn());
        sbColumn.append(",");
      }
      String columnString = sbColumn.toString().substring(0,sbColumn.toString().length()-1);
      tableName = dataBaseTable.getTableValue();
      String hisTableName = dataBaseTable.getArchiveTable();
     
      tableName = "(select "+columnString+" from "+tableName+" union all select "+columnString+" from "+hisTableName+")";
    }else{
      tableName = dataBaseTable.getTableValue();
    }
    return tableName;
  }
View Full Code Here

   * @param tableId
   * @return
   */
  public static String getDefaultTableName(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    return dataBaseTable.getTableValue();
  }
View Full Code Here

   * @param tableId
   * @return
   */
  public static String getArchiveTableName(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    return dataBaseTable.getArchiveTable();
  }
View Full Code Here

   * @param tableId
   * @return
   */
  public static String getColumnString(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    return getColumnString(dataBaseTable);
  }
View Full Code Here

    return columnString;
  }
 
  public static String getColumnStringWithOutArchiveTime(String tableId){
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = ProcessEngineManagement.getDefaultProcessEngine().getProcessEngineConfiguration();
    DataBaseTable dataBaseTable = processEngineConfigurationImpl.getDataBaseTable(tableId);
    if(dataBaseTable == null){
      throw new FixFlowException("未找到id为"+tableId+"的table配置");
    }
    StringBuilder sbColumn = new StringBuilder();
    for(Column column :dataBaseTable.getColumn()){
      if(!column.getColumn().equals("ARCHIVE_TIME")){
        sbColumn.append(column.getColumn());
        sbColumn.append(",");
      }
    }
View Full Code Here

TOP

Related Classes of com.founder.fix.bpmn2extensions.sqlmappingconfig.DataBaseTable

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.