• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DataRow类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.reporting.engine.classic.core.DataRow的典型用法代码示例。如果您正苦于以下问题:Java DataRow类的具体用法?Java DataRow怎么用?Java DataRow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataRow类属于org.pentaho.reporting.engine.classic.core包,在下文中一共展示了DataRow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: itemsAdvanced

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
/**
 * Receives notification that a row of data is being processed. Reads the data from the field defined for this function and hides the field if the value is equal to the last value and the this is not the first row of the item group.
 * 
 * @param event
 *          Information about the event.
 */
public void itemsAdvanced(final ReportEvent event) {
  DataRow dataRow = event.getDataRow();
  final Object fieldValue = dataRow.get(getField());
  // is visible when last and current object are not equal
  // first element in group is always visible
  if (firstInGroup == true) {
    visible = true;
    firstInGroup = false;
  } else {
    visible = (ObjectUtilities.equal(lastObject, fieldValue) == false);
  }
  lastObject = fieldValue;
  final Element e = event.getReport().getItemBand().getElement(getElement());
  if (e != null) {
    e.setVisible(visible);
  }
}
 
开发者ID:pentaho,项目名称:pentaho-reportwizard-core,代码行数:24,代码来源:ItemHideFunction.java


示例2: QueryParametrizer

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
/**
 * Default Constructor.
 */
public QueryParametrizer(final DataRow parameters,
                         final Locale locale)
{
  if (locale == null)
  {
    throw new NullPointerException("Locale must not be null");
  }
  if (parameters == null)
  {
    throw new NullPointerException("Parameter datarow must not be null");
  }

  this.collectedFields = new LinkedHashSet<>();
  this.collectedParameter = new LinkedHashMap<>();
  this.parameters = parameters;
  this.locale = locale;
  setMarkerChar('$');
  setOpeningBraceChar('{');
  setClosingBraceChar('}');
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:24,代码来源:QueryParametrizer.java


示例3: getValue

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public Object getValue(final ExpressionRuntime runtime, final ReportElement element)
{
  // Elements can get their value from attributes directly, or can query a field and/or value via
  // the helper methods on the ElementTypeUtils class.
  final String message = ElementTypeUtils.getStringAttribute
      (element, SampleElementModule.NAMESPACE, TEMPLATE_STRING, "Hello, {0}");

  // The data-row grants access to all currently computed values. Use this to access fields from
  // the data-source or calculated measures from the named expressions and functions.
  final DataRow dataRow = runtime.getDataRow();
  final Object userName = dataRow.get("env::username");
  return MessageFormat.format(message, userName);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:14,代码来源:SampleTextElementType.java


示例4: getValue

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public Object getValue(final ExpressionRuntime runtime, final ReportElement element)
{
  // Elements can get their value from attributes directly, or can query a field and/or value via
  // the helper methods on the ElementTypeUtils class.
  final String message = ElementTypeUtils.getStringAttribute
      (element, SampleElementModule.NAMESPACE, TEMPLATE_STRING, "Hello, {0}");

  // The data-row grants access to all currently computed values. Use this to access fields from
  // the data-source or calculated measures from the named expressions and functions.
  final DataRow dataRow = runtime.getDataRow();
  final Object userName = dataRow.get("env::username");
  final String textToPrint = MessageFormat.format(message, userName);

  final Object backgroundImageRaw = element.getAttribute(SampleElementModule.NAMESPACE, BACKGROUND_IMAGE);
  final Object image = filter(runtime, element, backgroundImageRaw);
  if (image instanceof DefaultImageReference)
  {
    return new SampleGraphicsDrawable(textToPrint, (DefaultImageReference) image);
  }
  else if (image instanceof DrawableWrapper)
  {
    return new SampleGraphicsDrawable(textToPrint, (DrawableWrapper) image);
  }
  else
  {
    return new SampleGraphicsDrawable(textToPrint);
  }
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:29,代码来源:SampleGraphicsElementType.java


示例5: produce

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public TableModel produce(final DataRow dataRow,
                          final DataFactoryContext dataFactoryContext) throws ReportDataFactoryException
{
  String backendQuery = (String) getParameter(BACKEND_QUERY);
  String displayName = (String) getParameter(ALL_PARAMETER_TEXT);
  String displayValue = (String) getParameter(ALL_PARAMETER_VALUE);

  TableModel tableModel = dataFactoryContext.getContextDataFactory().queryData(backendQuery, dataRow);
  if (tableModel.getColumnCount() < 1)
  {
    throw new ReportDataFactoryException("The base table-model has not enough columns");
  }

  try
  {
    TypedTableModel retval = new TypedTableModel();
    retval.addColumn(tableModel.getColumnName(0), tableModel.getColumnClass(0));
    retval.setValueAt(convertStringToTypedObject(displayValue, tableModel.getColumnClass(0)), 0, 0);
    for (int row = 0; row < tableModel.getRowCount(); row += 1)
    {
      retval.addRow(tableModel.getValueAt(row, 0));
    }

    if (tableModel.getColumnCount() > 1)
    {
      retval.addColumn(tableModel.getColumnName(1), tableModel.getColumnClass(1));
      retval.setValueAt(convertStringToTypedObject(displayName, tableModel.getColumnClass(1)), 0, 1);
      for (int row = 0; row < tableModel.getRowCount(); row += 1)
      {
        retval.setValueAt(tableModel.getValueAt(row, 1), row + 1, 1);
      }
    }
    return retval;
  }
  catch (BeanException be)
  {
    throw new ReportDataFactoryException("Failed to convert value to result-set type", be);
  }
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:40,代码来源:SampleDataSequence.java


示例6: getReferencedFieldsInternal

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
protected String[] getReferencedFieldsInternal(final String query,
                                               final DataRow parameters) throws ReportDataFactoryException
{
  QueryParametrizer parametrizer = new QueryParametrizer(parameters, Locale.US);
  parametrizer.translateAndLookup(query);

  LinkedHashSet<String> collectedFields = parametrizer.getCollectedFields();
  return collectedFields.toArray(new String[collectedFields.size()]);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:10,代码来源:SampleDataFactory.java


示例7: getQueryHashInternal

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
protected Object getQueryHashInternal(final String realQuery,
                                      final DataRow parameter) throws ReportDataFactoryException
{
  ArrayList<String> hash = new ArrayList<>();
  hash.add(realQuery);
  hash.add(urlPattern);
  return hash;

}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:10,代码来源:SampleDataFactory.java


示例8: getReferencedFields

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public String[] getReferencedFields(final DataFactoryMetaData dataFactoryMetaData,
                                    final DataFactory dataFactory,
                                    final String query,
                                    final DataRow dataRow)
{
  SampleDataFactory sampleDataFactory = (SampleDataFactory) dataFactory;
  return sampleDataFactory.getReferencedFields(query, dataRow);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:9,代码来源:SampleDataFactoryCore.java


示例9: getReferencedResources

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public ResourceReference[] getReferencedResources(final DataFactoryMetaData dataFactoryMetaData,
                                                  final DataFactory dataFactory,
                                                  final ResourceManager resourceManager,
                                                  final String query,
                                                  final DataRow dataRow)
{
  return new ResourceReference[0];
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:9,代码来源:SampleDataFactoryCore.java


示例10: getQueryHash

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public Object getQueryHash(final DataFactoryMetaData dataFactoryMetaData,
                           final DataFactory dataFactory,
                           final String query,
                           final DataRow dataRow)
{
  SampleDataFactory sampleDataFactory = (SampleDataFactory) dataFactory;
  return sampleDataFactory.getQueryHash(query, dataRow);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:9,代码来源:SampleDataFactoryCore.java


示例11: queryData

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public final TableModel queryData(final String query, final DataRow parameters) throws ReportDataFactoryException
{
  if (query == null)
  {
    throw new NullPointerException("Query is null."); //$NON-NLS-1$
  }
  final String realQuery = scriptingSupport.computeQuery(query, parameters);
  if (realQuery == null)
  {
    throw new ReportDataFactoryException("Query '" + query + "' is not recognized."); //$NON-NLS-1$ //$NON-NLS-2$
  }

  return queryDataInternal(realQuery, parameters);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:15,代码来源:AbstractScriptableDataFactory.java


示例12: getReferencedFields

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public final String[] getReferencedFields(final String query,
                                          final DataRow parameter)
{
  try
  {
    final String[] additionalFields = scriptingSupport.computeAdditionalQueryFields(query, parameter);
    if (additionalFields == null)
    {
      return null;
    }

    final String realQuery = scriptingSupport.computeQuery(query, parameter);
    if (realQuery == null)
    {
      throw new ReportDataFactoryException("Query '" + query + "' is not recognized."); //$NON-NLS-1$ //$NON-NLS-2$
    }

    String[] referencedFieldsInternal = getReferencedFieldsInternal(realQuery, parameter);
    if (referencedFieldsInternal == null)
    {
      return null;
    }

    final LinkedHashSet<String> fields = new LinkedHashSet<>();
    fields.addAll(Arrays.asList(referencedFieldsInternal));
    fields.addAll(Arrays.asList(additionalFields));
    return fields.toArray(new String[fields.size()]);
  }
  catch (ReportDataFactoryException rx)
  {
    logger.debug("Failed to compute referenced fields", rx); // NON-NLS
    return null;
  }
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:35,代码来源:AbstractScriptableDataFactory.java


示例13: getQueryHash

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public final Object getQueryHash(final String query, final DataRow parameter)
{
  try
  {
    final String realQuery = scriptingSupport.computeQuery(query, parameter);
    if (realQuery == null)
    {
      throw new ReportDataFactoryException("Query '" + query + "' is not recognized."); //$NON-NLS-1$ //$NON-NLS-2$
    }

    Object queryHashInternal = getQueryHashInternal(realQuery, parameter);
    if (queryHashInternal == null)
    {
      return null;
    }

    final ArrayList<Object> queryHash = new ArrayList<>();
    queryHash.add(getClass().getName());
    queryHash.add(queryHashInternal);
    queryHash.add(scriptingSupport.getScriptingLanguage(query));
    queryHash.add(scriptingSupport.getScript(query));
    return queryHash;
  }
  catch (ReportDataFactoryException rx)
  {
    logger.debug("Failed to compute query hash", rx); // NON-NLS
    return null;
  }
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:30,代码来源:AbstractScriptableDataFactory.java


示例14: TransJobDrawable

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public TransJobDrawable(DataRow dataRow, boolean pixelateImages) {
  this.dataRow = dataRow;
  this.pixelateImages = pixelateImages;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:5,代码来源:TransJobDrawable.java


示例15: getDataRow

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
/**
 * @return the dataRow
 */
public DataRow getDataRow() {
  return dataRow;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:7,代码来源:TransJobDrawable.java


示例16: setDataRow

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
/**
 * @param dataRow the dataRow to set
 */
public void setDataRow(DataRow dataRow) {
  this.dataRow = dataRow;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:7,代码来源:TransJobDrawable.java


示例17: TransJobDrawable

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public TransJobDrawable( DataRow dataRow, boolean pixelateImages ) {
  this.dataRow = dataRow;
  this.pixelateImages = pixelateImages;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:TransJobDrawable.java


示例18: isQueryExecutable

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
public boolean isQueryExecutable(final String query, final DataRow dataRow)
{
  return scriptingSupport.containsQuery(query);
}
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:5,代码来源:AbstractScriptableDataFactory.java


示例19: getReferencedFieldsInternal

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
protected abstract String[] getReferencedFieldsInternal(final String query,
final DataRow parameters) throws ReportDataFactoryException;
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:3,代码来源:AbstractScriptableDataFactory.java


示例20: getQueryHashInternal

import org.pentaho.reporting.engine.classic.core.DataRow; //导入依赖的package包/类
protected abstract Object getQueryHashInternal(final String realQuery,
final DataRow parameter) throws ReportDataFactoryException;
 
开发者ID:tmorgner,项目名称:pentaho-reporting-oem-sdk,代码行数:3,代码来源:AbstractScriptableDataFactory.java



注:本文中的org.pentaho.reporting.engine.classic.core.DataRow类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GeoJsonPoint类代码示例发布时间:2022-05-23
下一篇:
Java HighPerformanceTiledSpriteVertexBufferObject类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap