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

Java SortRowsMeta类代码示例

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

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



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

示例1: createSortRowsStep

import org.pentaho.di.trans.steps.sort.SortRowsMeta; //导入依赖的package包/类
/**
 * Create and return a SortRows step.
 * 
 * @param name
 * @param sortFields[]  Fields to sort by
 * @param ascending[]  Boolean indicating whether the corresponding field is to be sorted in ascending or descending order.
 * @param caseSensitive[]  Boolean indicating whether the corresponding field is to have case as a factor in the sort.
 * @param directory The directory in the file system where the sort is to take place if it can't fit into memory?
 * @param sortSize ??? 
 * @param pluginRegistry  The environment's Kettle plugin registry.
 * @return
 */
public static synchronized StepMeta createSortRowsStep(String name, 
                                                       String[] sortFields,
                                                       boolean[] ascending,
                                                       boolean[] caseSensitive,
                                                       String directory,
                                                       int sortSize,
                                                       PluginRegistry pluginRegistry) {
    
    SortRowsMeta sortRowsMeta = new SortRowsMeta();
    sortRowsMeta.setSortSize(Integer.toString(sortSize/10));
    sortRowsMeta.setFieldName(sortFields);
    sortRowsMeta.setAscending(ascending);
    sortRowsMeta.setCaseSensitive(caseSensitive);
    sortRowsMeta.setDirectory(directory);
    
    String sortRowsStepPid = pluginRegistry.getPluginId(StepPluginType.class, sortRowsMeta);
    StepMeta sortRowsStep = new StepMeta(sortRowsStepPid, name, (StepMetaInterface)sortRowsMeta);
    
    return sortRowsStep;
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:33,代码来源:TestUtilities.java


示例2: createSortRowsStep

import org.pentaho.di.trans.steps.sort.SortRowsMeta; //导入依赖的package包/类
/**
 * Create and return a SortRows step.
 *
 * @param name
 * @param sortFields     [] Fields to sort by
 * @param ascending      [] Boolean indicating whether the corresponding field is to be sorted in ascending or
 *                       descending order.
 * @param caseSensitive  [] Boolean indicating whether the corresponding field is to have case as a factor in the
 *                       sort.
 * @param directory      The directory in the file system where the sort is to take place if it can't fit into
 *                       memory?
 * @param sortSize       ???
 * @param pluginRegistry The environment's Kettle plugin registry.
 * @return
 */
public static synchronized StepMeta createSortRowsStep( String name, String[] sortFields, boolean[] ascending,
                                                        boolean[] caseSensitive, String directory, int sortSize,
                                                        PluginRegistry pluginRegistry ) {

  SortRowsMeta sortRowsMeta = new SortRowsMeta();
  sortRowsMeta.setSortSize( Integer.toString( sortSize / 10 ) );
  sortRowsMeta.setFieldName( sortFields );
  sortRowsMeta.setAscending( ascending );
  sortRowsMeta.setCaseSensitive( caseSensitive );
  sortRowsMeta.setDirectory( directory );

  String sortRowsStepPid = pluginRegistry.getPluginId( StepPluginType.class, sortRowsMeta );
  StepMeta sortRowsStep = new StepMeta( sortRowsStepPid, name, sortRowsMeta );

  return sortRowsStep;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:32,代码来源:TestUtilities.java


示例3: generateSortStep

import org.pentaho.di.trans.steps.sort.SortRowsMeta; //导入依赖的package包/类
private StepMeta generateSortStep(RowMetaInterface rowMeta) throws KettleException {
  List<SQLField> fields = sql.getOrderFields().getFields();
  List<SQLField> selectFields = sql.getSelectFields().getFields();

  SortRowsMeta meta = new SortRowsMeta();
  meta.allocate(fields.size());
  for (int i=0;i<fields.size();i++) {
    SQLField sqlField = fields.get(i);
    
    ValueMetaInterface valueMeta = rowMeta.searchValueMeta(sqlField.getField());
    if (valueMeta==null) {
      // This could be an alias used in an order by clause.
      // In that case, we need to find the correct original name in the selectFields...
      //
      SQLField selectField = SQLField.searchSQLFieldByFieldOrAlias(selectFields, sqlField.getField());
      if (selectField!=null) {
        // Yep, verify this original name...
        //
        valueMeta = rowMeta.searchValueMeta(selectField.getField());
      } else {
        valueMeta = rowMeta.searchValueMeta(sqlField.getAlias());
      }
      
    }
    if (valueMeta==null) {
      throw new KettleException("Unable to find field to sort on: "+sqlField.getField()+" nor the alias: "+sqlField.getAlias());
    }
    
    meta.getFieldName()[i] = valueMeta.getName();
    meta.getAscending()[i] = sqlField.isAscending();
    meta.getCaseSensitive()[i] = true;
  }
  meta.setSortSize("1000000");
  
  StepMeta stepMeta = new StepMeta("Sort rows", meta);
  stepMeta.setLocation(xLocation, 50);
  xLocation+=100;
  stepMeta.setDraw(true);
  return stepMeta;
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:41,代码来源:SqlTransMeta.java


示例4: SortRowsDialog

import org.pentaho.di.trans.steps.sort.SortRowsMeta; //导入依赖的package包/类
public SortRowsDialog(Shell parent, Object in, TransMeta transMeta, String sname)
{
	super(parent, (BaseStepMeta)in, transMeta, sname);
	input=(SortRowsMeta)in;
       inputFields =new HashMap<String, Integer>();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:7,代码来源:SortRowsDialog.java


示例5: SortRowsDialog

import org.pentaho.di.trans.steps.sort.SortRowsMeta; //导入依赖的package包/类
public SortRowsDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (SortRowsMeta) in;
  inputFields = new HashMap<String, Integer>();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:6,代码来源:SortRowsDialog.java


示例6: createSortRowsStep

import org.pentaho.di.trans.steps.sort.SortRowsMeta; //导入依赖的package包/类
/**
 * Create and return a SortRows step.
 * 
 * @param name
 * @param sortFields
 *          [] Fields to sort by
 * @param ascending
 *          [] Boolean indicating whether the corresponding field is to be sorted in ascending or descending order.
 * @param caseSensitive
 *          [] Boolean indicating whether the corresponding field is to have case as a factor in the sort.
 * @param directory
 *          The directory in the file system where the sort is to take place if it can't fit into memory?
 * @param sortSize
 *          ???
 * @param pluginRegistry
 *          The environment's Kettle plugin registry.
 * @return
 */
public static synchronized StepMeta createSortRowsStep( String name, String[] sortFields, boolean[] ascending,
    boolean[] caseSensitive, String directory, int sortSize, PluginRegistry pluginRegistry ) {

  SortRowsMeta sortRowsMeta = new SortRowsMeta();
  sortRowsMeta.setSortSize( Integer.toString( sortSize / 10 ) );
  sortRowsMeta.setFieldName( sortFields );
  sortRowsMeta.setAscending( ascending );
  sortRowsMeta.setCaseSensitive( caseSensitive );
  sortRowsMeta.setDirectory( directory );

  String sortRowsStepPid = pluginRegistry.getPluginId( StepPluginType.class, sortRowsMeta );
  StepMeta sortRowsStep = new StepMeta( sortRowsStepPid, name, sortRowsMeta );

  return sortRowsStep;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:34,代码来源:TestUtilities.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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