本文整理汇总了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;未经允许,请勿转载。 |
请发表评论