Browse Source

REPORT-75140 抽象出一个多结果数据集

feature/x
rinoux 2 years ago
parent
commit
c6fea25528
  1. 2
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 9
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataNameWrapper.java
  4. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java
  5. 1
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java
  6. 1
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java

2
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -638,7 +638,7 @@ public abstract class DesignTableDataManager {
if (needLoadingBar) {
MultiResultTableDataWrapper.loadingBar.start();
}
return DataOperator.getInstance().previewRichTableData(tableData, parameterMap, 0);
return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0);
}
private static void showParaWindow(final Map<String, Object> parameterMap, ParameterProvider[] inParameters) {

9
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java

@ -3,7 +3,7 @@ package com.fr.design.data.datapane.preview;
import com.fr.cache.list.IntList;
import com.fr.data.AbstractDataModel;
import com.fr.data.impl.EmbeddedTableData.EmbeddedTDDataModel;
import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.data.impl.NameDataModel;
import com.fr.design.utils.DesignUtils;
import com.fr.general.data.DataModel;
import com.fr.general.data.TableDataException;
@ -32,8 +32,9 @@ public class PreviewTableModel extends AbstractTableModel {
}
public PreviewTableModel(DataModel sourceResultSet, int maxRowCount) {
if (sourceResultSet instanceof ProcedureDataModel) {
ProcedureDataModel rs = (ProcedureDataModel) sourceResultSet;
// 如果是这种NameDataModel,根据maxRowCount截断一下
if (sourceResultSet instanceof NameDataModel) {
NameDataModel rs = (NameDataModel) sourceResultSet;
try {
this.dataModel = createRowDataModel(rs, maxRowCount);
} catch (TableDataException e) {
@ -45,7 +46,7 @@ public class PreviewTableModel extends AbstractTableModel {
}
}
public static DataModel createRowDataModel(final ProcedureDataModel rs, int maxRowCount) throws TableDataException {
public static DataModel createRowDataModel(final NameDataModel rs, int maxRowCount) throws TableDataException {
int rowCount = rs.getRowCount();
if (maxRowCount == 0) {
maxRowCount = rowCount;

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataNameWrapper.java

@ -73,7 +73,7 @@ public final class MultiResultTableDataNameWrapper implements TableDataWrapper {
return BaseUtils.readIcon(creator.getIconPath());
}
}
return BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png");
return BaseUtils.readIcon("/com/fr/design/images/data/multi.png");
}
private void createResult(boolean needLoadingBar) {

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java

@ -151,7 +151,7 @@ public final class MultiResultTableDataWrapper implements TableDataWrapper {
return BaseUtils.readIcon(creator.getIconPath());
}
}
return BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png");
return BaseUtils.readIcon("/com/fr/design/images/data/multi.png");
}
/**

1
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java

@ -36,6 +36,7 @@ import java.util.concurrent.CancellationException;
*
* @author zhou
* @since 2012-4-12上午10:29:15
* @deprecated 请勿使用{@link MultiResultTableDataWrapper}
*/
@Deprecated
public final class StoreProcedureDataWrapper implements TableDataWrapper {

1
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java

@ -27,6 +27,7 @@ import java.util.List;
*
* @author zhou
* @since 2012-4-12上午10:29:15
* @deprecated 请勿使用{@link MultiResultTableDataNameWrapper}
*/
@Deprecated
public final class StoreProcedureNameWrapper implements TableDataWrapper {

Loading…
Cancel
Save