• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java CombinationLookupMeta类的典型用法和代码示例

java 12次浏览

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

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

示例1: ok

点赞 3

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;

	CombinationLookupMeta oldMetaState = (CombinationLookupMeta)input.clone();
	
	getInfo(input);
	stepname = wStepname.getText(); // return value

	if (transMeta.findDatabase(wConnection.getText())==null)
	{
		MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
		mb.setMessage(Messages.getString("CombinationLookupDialog.NoValidConnection.DialogMessage")); //$NON-NLS-1$
		mb.setText(Messages.getString("CombinationLookupDialog.NoValidConnection.DialogTitle")); //$NON-NLS-1$
		mb.open();
	}
	if ( ! input.equals(oldMetaState) )  
	{
		input.setChanged();
	}
	dispose();
}
 

开发者ID:icholy,
项目名称:geokettle-2.0,
代码行数:23,
代码来源:CombinationLookupDialog.java

示例2: ok

点赞 3

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;

	CombinationLookupMeta oldMetaState = (CombinationLookupMeta)input.clone();
	
	getInfo(input);
	stepname = wStepname.getText(); // return value

	if (transMeta.findDatabase(wConnection.getText())==null)
	{
		MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
		mb.setMessage(BaseMessages.getString(PKG, "CombinationLookupDialog.NoValidConnection.DialogMessage")); //$NON-NLS-1$
		mb.setText(BaseMessages.getString(PKG, "CombinationLookupDialog.NoValidConnection.DialogTitle")); //$NON-NLS-1$
		mb.open();
	}
	if ( ! input.equals(oldMetaState) )  
	{
		input.setChanged();
	}
	dispose();
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:23,
代码来源:CombinationLookupDialog.java

示例3: ok

点赞 3

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
private void ok() {
  if ( Utils.isEmpty( wStepname.getText() ) ) {
    return;
  }

  CombinationLookupMeta oldMetaState = (CombinationLookupMeta) input.clone();

  getInfo( input );
  stepname = wStepname.getText(); // return value

  if ( transMeta.findDatabase( wConnection.getText() ) == null ) {
    MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
    mb.setMessage( BaseMessages.getString( PKG, "CombinationLookupDialog.NoValidConnection.DialogMessage" ) );
    mb.setText( BaseMessages.getString( PKG, "CombinationLookupDialog.NoValidConnection.DialogTitle" ) );
    mb.open();
  }
  if ( !input.equals( oldMetaState ) ) {
    input.setChanged();
  }
  dispose();
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:22,
代码来源:CombinationLookupDialog.java

示例4: CombinationLookupDialog

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
public CombinationLookupDialog(Shell parent, Object in, TransMeta transMeta, String sname)
{
	super(parent, (BaseStepMeta)in, transMeta, sname);
	input=(CombinationLookupMeta)in;
       inputFields =new HashMap<String, Integer>();
}
 

开发者ID:icholy,
项目名称:geokettle-2.0,
代码行数:7,
代码来源:CombinationLookupDialog.java

示例5: getInfo

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
private void getInfo(CombinationLookupMeta in)
{
	int nrkeys         = wKey.nrNonEmpty();

	in.allocate(nrkeys);

	log.logDebug(toString(), Messages.getString("CombinationLookupDialog.Log.SomeKeysFound",String.valueOf(nrkeys))); //$NON-NLS-1$ //$NON-NLS-2$
	for (int i=0;i<nrkeys;i++)
	{
		TableItem item = wKey.getNonEmpty(i);
		in.getKeyLookup()[i] = item.getText(1);
		in.getKeyField()[i]  = item.getText(2);			
	}

	in.setUseAutoinc( wAutoinc.getSelection() && wAutoinc.isEnabled() );
	in.setReplaceFields( wReplace.getSelection() );
	in.setUseHash( wHashcode.getSelection() );
	in.setHashField( wHashfield.getText() );
       in.setSchemaName( wSchema.getText() );
	in.setTablename( wTable.getText() );
	in.setTechnicalKeyField( wTk.getText() );
	if ( wAutoinc.getSelection() == true )  
	{
		in.setTechKeyCreation(CombinationLookupMeta.CREATION_METHOD_AUTOINC);
		in.setUseAutoinc( true );   // for downwards compatibility
		in.setSequenceFrom( null );
	}
	else if ( wSeqButton.getSelection() == true )
	{
		in.setTechKeyCreation(CombinationLookupMeta.CREATION_METHOD_SEQUENCE);
		in.setUseAutoinc(false);
		in.setSequenceFrom( wSeq.getText() );
	}
	else  // all the rest
	{
		in.setTechKeyCreation(CombinationLookupMeta.CREATION_METHOD_TABLEMAX);
		in.setUseAutoinc( false );
		in.setSequenceFrom( null );
	}
	
	in.setDatabaseMeta( transMeta.findDatabase(wConnection.getText()) );

	in.setCommitSize( Const.toInt(wCommit.getText(), 0) );
	in.setCacheSize( Const.toInt(wCachesize.getText(), 0) );
	
	in.setLastUpdateField( wLastUpdateField.getText() );
}
 

开发者ID:icholy,
项目名称:geokettle-2.0,
代码行数:48,
代码来源:CombinationLookupDialog.java

示例6: getInfo

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
private void getInfo(CombinationLookupMeta in)
{
	int nrkeys         = wKey.nrNonEmpty();

	in.allocate(nrkeys);

	logDebug(BaseMessages.getString(PKG, "CombinationLookupDialog.Log.SomeKeysFound",String.valueOf(nrkeys))); //$NON-NLS-1$ //$NON-NLS-2$
	for (int i=0;i<nrkeys;i++)
	{
		TableItem item = wKey.getNonEmpty(i);
		in.getKeyLookup()[i] = item.getText(1);
		in.getKeyField()[i]  = item.getText(2);			
	}

	in.setUseAutoinc( wAutoinc.getSelection() && wAutoinc.isEnabled() );
	in.setReplaceFields( wReplace.getSelection() );
	in.setUseHash( wHashcode.getSelection() );
	in.setHashField( wHashfield.getText() );
       in.setSchemaName( wSchema.getText() );
	in.setTablename( wTable.getText() );
	in.setTechnicalKeyField( wTk.getText() );
	if ( wAutoinc.getSelection() == true )  
	{
		in.setTechKeyCreation(CombinationLookupMeta.CREATION_METHOD_AUTOINC);
		in.setUseAutoinc( true );   // for downwards compatibility
		in.setSequenceFrom( null );
	}
	else if ( wSeqButton.getSelection() == true )
	{
		in.setTechKeyCreation(CombinationLookupMeta.CREATION_METHOD_SEQUENCE);
		in.setUseAutoinc(false);
		in.setSequenceFrom( wSeq.getText() );
	}
	else  // all the rest
	{
		in.setTechKeyCreation(CombinationLookupMeta.CREATION_METHOD_TABLEMAX);
		in.setUseAutoinc( false );
		in.setSequenceFrom( null );
	}
	
	in.setDatabaseMeta( transMeta.findDatabase(wConnection.getText()) );

	in.setCommitSize( Const.toInt(wCommit.getText(), 0) );
	in.setCacheSize( Const.toInt(wCachesize.getText(), 0) );
	
	in.setLastUpdateField( wLastUpdateField.getText() );
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:48,
代码来源:CombinationLookupDialog.java

示例7: generateCombinationLookupStepFromLogicalTable

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
protected StepMeta generateCombinationLookupStepFromLogicalTable(DatabaseMeta databaseMeta, LogicalTable logicalTable) {
  String name = ConceptUtil.getName(logicalTable, locale);
  String description = ConceptUtil.getDescription(logicalTable, locale);
  String phTable = ConceptUtil.getString(logicalTable, DefaultIDs.LOGICAL_TABLE_PHYSICAL_TABLE_NAME);
  String schemaTable = databaseMeta.getQuotedSchemaTableCombination(null, Const.NVL(phTable, name));
  
  CombinationLookupMeta meta = new CombinationLookupMeta();
  meta.setDatabaseMeta(databaseMeta);
  meta.setSchemaName(null); // TODO
  meta.setTablename(schemaTable);
  meta.setUseAutoinc(databaseMeta.supportsAutoinc());
  meta.setCacheSize(5000);
  meta.setCommitSize(500);
  meta.setReplaceFields(true); // replace attribute fields with a TK
  
  // Find the technical key (if any defined)
  //
  LogicalColumn keyColumn = ConceptUtil.findLogicalColumn(logicalTable, AttributeType.TECHNICAL_KEY);;
  if (keyColumn!=null) {
    ValueMetaInterface keyValue = getValueForLogicalColumn(databaseMeta, keyColumn);
    meta.setTechnicalKeyField(keyValue.getName());
  }

  // Simply add all the attributes as key columns...
  //
  List<LogicalColumn> attributes = ConceptUtil.findLogicalColumns(logicalTable, AttributeType.ATTRIBUTE);
  meta.setKeyLookup(new String[attributes.size()]);
  meta.setKeyField(new String[attributes.size()]);
  for (int i=0;i<attributes.size();i++) {
    LogicalColumn logicalColumn = attributes.get(i);
    ValueMetaInterface valueMeta = getValueForLogicalColumn(databaseMeta, logicalColumn);
    meta.getKeyLookup()[i] = valueMeta.getName();
    meta.getKeyField()[i] = valueMeta.getName();
  }
  
  StepMeta stepMeta = new StepMeta(name, meta);
  stepMeta.drawStep();
  stepMeta.setDescription(description);

  return stepMeta;
}
 

开发者ID:jjeb,
项目名称:kettle-trunk,
代码行数:42,
代码来源:JobGenerator.java

示例8: CombinationLookupDialog

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
public CombinationLookupDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (CombinationLookupMeta) in;
  inputFields = new HashMap<String, Integer>();
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:6,
代码来源:CombinationLookupDialog.java

示例9: getInfo

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
private void getInfo( CombinationLookupMeta in ) {
  int nrkeys = wKey.nrNonEmpty();

  in.allocate( nrkeys );

  logDebug( BaseMessages.getString( PKG, "CombinationLookupDialog.Log.SomeKeysFound", String.valueOf( nrkeys ) ) );
  for ( int i = 0; i < nrkeys; i++ ) {
    TableItem item = wKey.getNonEmpty( i );
    //CHECKSTYLE:Indentation:OFF
    in.getKeyLookup()[i] = item.getText( 1 );
    in.getKeyField()[i] = item.getText( 2 );
  }

  in.setPreloadCache( wPreloadCache.getSelection() );
  in.setUseAutoinc( wAutoinc.getSelection() && wAutoinc.isEnabled() );
  in.setReplaceFields( wReplace.getSelection() );
  in.setUseHash( wHashcode.getSelection() );
  in.setHashField( wHashfield.getText() );
  in.setSchemaName( wSchema.getText() );
  in.setTablename( wTable.getText() );
  in.setTechnicalKeyField( wTk.getText() );
  if ( wAutoinc.getSelection() ) {
    in.setTechKeyCreation( CombinationLookupMeta.CREATION_METHOD_AUTOINC );
    in.setUseAutoinc( true ); // for downwards compatibility
    in.setSequenceFrom( null );
  } else if ( wSeqButton.getSelection() ) {
    in.setTechKeyCreation( CombinationLookupMeta.CREATION_METHOD_SEQUENCE );
    in.setUseAutoinc( false );
    in.setSequenceFrom( wSeq.getText() );
  } else { // all the rest
    in.setTechKeyCreation( CombinationLookupMeta.CREATION_METHOD_TABLEMAX );
    in.setUseAutoinc( false );
    in.setSequenceFrom( null );
  }

  in.setDatabaseMeta( transMeta.findDatabase( wConnection.getText() ) );

  in.setCommitSize( Const.toInt( wCommit.getText(), 0 ) );
  in.setCacheSize( Const.toInt( wCachesize.getText(), 0 ) );

  in.setLastUpdateField( wLastUpdateField.getText() );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:43,
代码来源:CombinationLookupDialog.java

示例10: generateCombinationLookupStepFromLogicalTable

点赞 2

import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; //导入依赖的package包/类
protected StepMeta generateCombinationLookupStepFromLogicalTable(DatabaseMeta databaseMeta, LogicalTable logicalTable) {
  String name = ConceptUtil.getName(logicalTable, locale);
  String description = ConceptUtil.getDescription(logicalTable, locale);
  String phTable = ConceptUtil.getString(logicalTable, DefaultIDs.LOGICAL_TABLE_PHYSICAL_TABLE_NAME);
  String schemaTable = databaseMeta.getQuotedSchemaTableCombination(null, Const.NVL(phTable, name));

  CombinationLookupMeta meta = new CombinationLookupMeta();
  meta.setDatabaseMeta(databaseMeta);
  meta.setSchemaName(null); // TODO
  meta.setTablename(schemaTable);
  meta.setUseAutoinc(databaseMeta.supportsAutoinc());
  meta.setCacheSize(5000);
  meta.setCommitSize(500);
  meta.setReplaceFields(true); // replace attribute fields with a TK

  // Find the technical key (if any defined)
  //
  LogicalColumn keyColumn = ConceptUtil.findLogicalColumn(logicalTable, AttributeType.TECHNICAL_KEY);
  if (keyColumn!=null) {
    ValueMetaInterface keyValue = getValueForLogicalColumn(databaseMeta, keyColumn);
    meta.setTechnicalKeyField(keyValue.getName());
  }

  // Simply add all the attributes as key columns...
  //
  List<LogicalColumn> attributes = ConceptUtil.findLogicalColumns(logicalTable, AttributeType.ATTRIBUTE);
  meta.setKeyLookup(new String[attributes.size()]);
  meta.setKeyField(new String[attributes.size()]);
  for (int i=0;i<attributes.size();i++) {
    LogicalColumn logicalColumn = attributes.get(i);
    ValueMetaInterface valueMeta = getValueForLogicalColumn(databaseMeta, logicalColumn);
    meta.getKeyLookup()[i] = valueMeta.getName();
    meta.getKeyField()[i] = valueMeta.getName();
  }

  StepMeta stepMeta = new StepMeta(name, meta);
  stepMeta.drawStep();
  stepMeta.setDescription(description);

  return stepMeta;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:42,
代码来源:JobGenerator.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)