当前位置: 首页>>代码示例>>Java>>正文


Java Validation类代码示例

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


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

示例1: ValidatorDialog

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
public ValidatorDialog(Shell parent, Object in, TransMeta tr, String sname)
{
	super(parent, (BaseStepMeta)in, tr, sname);
	input=(ValidatorMeta)in;

	// Just to make sure everything is nicely in sync...
	//
	java.util.List<StreamInterface> infoStreams = input.getStepIOMeta().getInfoStreams();
	for (int i=0;i<infoStreams.size();i++) {
		input.getValidations().get(i).setSourcingStepName(infoStreams.get(i).getStepname());
	}

	selectedField = null;
	selectionList = new ArrayList<Validation>();

	// Copy the data from the input into the map...
	//
	for (Validation field : input.getValidations()) {
		selectionList.add(field.clone());
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:ValidatorDialog.java

示例2: ok

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

	stepname = wStepname.getText(); // return value
	
	saveChanges();
	input.setChanged();
	input.setValidatingAll(wValidateAll.getSelection());
	input.setConcatenatingErrors(wConcatErrors.getSelection());
	input.setConcatenationSeparator(wConcatSeparator.getText());
	
	Validation[] fields = selectionList.toArray(new Validation[selectionList.size()]);
	input.setValidations(fields);
	
	dispose();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:18,代码来源:ValidatorDialog.java

示例3: ValidatorDialog

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
public ValidatorDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (ValidatorMeta) in;

  // Just to make sure everything is nicely in sync...
  //
  java.util.List<StreamInterface> infoStreams = input.getStepIOMeta().getInfoStreams();
  for ( int i = 0; i < infoStreams.size(); i++ ) {
    input.getValidations().get( i ).setSourcingStepName( infoStreams.get( i ).getStepname() );
  }

  selectedField = null;
  selectionList = new ArrayList<Validation>();

  // Copy the data from the input into the map...
  //
  for ( Validation field : input.getValidations() ) {
    selectionList.add( field.clone() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:ValidatorDialog.java

示例4: ValidatorDialog

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
public ValidatorDialog(Shell parent, Object in, TransMeta tr, String sname)
{
	super(parent, (BaseStepMeta)in, tr, sname);
	input=(ValidatorMeta)in;
	
	selectedField = null;
	selectionList = new ArrayList<Validation>();
	
	// Copy the data from the input into the map...
	//
	for (Validation field : input.getValidations()) {
		selectionList.add(field.clone());
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:ValidatorDialog.java

示例5: getValidatorFieldData

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void getValidatorFieldData(Validation field) {
	
	wDescription.setText(Const.NVL(field.getName(), ""));
	wFieldName.setText(Const.NVL(field.getFieldName(), ""));

	wErrorCode.setText(Const.NVL(field.getErrorCode(), ""));
	wErrorDescription.setText(Const.NVL(field.getErrorDescription(), ""));

	wDataTypeVerified.setSelection(field.isDataTypeVerified());
	wDataType.setText(ValueMeta.getTypeDesc(field.getDataType()));
	wConversionMask.setText(Const.NVL(field.getConversionMask(), ""));
	wDecimalSymbol.setText(Const.NVL(field.getDecimalSymbol(), ""));
	wGroupingSymbol.setText(Const.NVL(field.getGroupingSymbol(), ""));
	
	wNullAllowed.setSelection(field.isNullAllowed());
	wOnlyNullAllowed.setSelection(field.isOnlyNullAllowed());
	wOnlyNumeric.setSelection(field.isOnlyNumericAllowed());
	
	if (field.getMaximumLength()>=0) wMaxLength.setText(Integer.toString(field.getMaximumLength())); else wMaxLength.setText(""); 
	if (field.getMinimumLength()>=0) wMinLength.setText(Integer.toString(field.getMinimumLength())); else wMinLength.setText(""); 
	wMaxValue.setText(Const.NVL(field.getMaximumValue(), ""));
	wMinValue.setText(Const.NVL(field.getMinimumValue(), ""));
	wStartStringExpected.setText(Const.NVL(field.getStartString(), ""));
	wEndStringExpected.setText(Const.NVL(field.getEndString(), ""));
	wStartStringDisallowed.setText(Const.NVL(field.getStartStringNotAllowed(), ""));
	wEndStringDisallowed.setText(Const.NVL(field.getEndStringNotAllowed(), ""));
	wRegExpExpected.setText(Const.NVL(field.getRegularExpression(), ""));
	wRegExpDisallowed.setText(Const.NVL(field.getRegularExpressionNotAllowed(), ""));
	
	wAllowedValues.removeAll();
	if (field.getAllowedValues()!=null) {
		for (String allowedValue : field.getAllowedValues()) {
			wAllowedValues.add(Const.NVL(allowedValue, ""));
		}
	}
	
	wSourceValues.setSelection(field.isSourcingValues());
	wSourceStep.setText( field.getSourcingStep()!=null ? field.getSourcingStep().getName() : "" );
	wSourceField.setText(Const.NVL(field.getSourcingField(), ""));
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:41,代码来源:ValidatorDialog.java

示例6: getData

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */ 
public void getData()
{
	// Populate the list of validations...
	//
	refreshValidationsList();
	enableFields();
	
	wValidateAll.setSelection(input.isValidatingAll());
	wConcatErrors.setSelection(input.isConcatenatingErrors());
	wConcatSeparator.setText(Const.NVL(input.getConcatenationSeparator(), ""));
	
	// Select the first available field...
	//
	if (input.getValidations().length>0) {
		Validation validatorField = input.getValidations()[0];
		String description = validatorField.getName();
		int index = wValidationsList.indexOf(description);
		if (index>=0) {
			wValidationsList.select(index);
			showSelectedValidatorField(description);
		}
	}
	
	setFlags();
	
	wStepname.selectAll();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:31,代码来源:ValidatorDialog.java

示例7: getValidatorFieldData

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void getValidatorFieldData(Validation field) {
	
	wDescription.setText(Const.NVL(field.getName(), ""));
	wFieldName.setText(Const.NVL(field.getFieldName(), ""));

	wErrorCode.setText(Const.NVL(field.getErrorCode(), ""));
	wErrorDescription.setText(Const.NVL(field.getErrorDescription(), ""));

	wDataTypeVerified.setSelection(field.isDataTypeVerified());
	wDataType.setText(ValueMeta.getTypeDesc(field.getDataType()));
	wConversionMask.setText(Const.NVL(field.getConversionMask(), ""));
	wDecimalSymbol.setText(Const.NVL(field.getDecimalSymbol(), ""));
	wGroupingSymbol.setText(Const.NVL(field.getGroupingSymbol(), ""));
	
	wNullAllowed.setSelection(field.isNullAllowed());
	wOnlyNullAllowed.setSelection(field.isOnlyNullAllowed());
	wOnlyNumeric.setSelection(field.isOnlyNumericAllowed());
	wMaxLength.setText(Const.NVL(field.getMaximumLength(), ""));
	wMinLength.setText(Const.NVL(field.getMinimumLength(), ""));
	wMaxValue.setText(Const.NVL(field.getMaximumValue(), ""));
	wMinValue.setText(Const.NVL(field.getMinimumValue(), ""));
	wStartStringExpected.setText(Const.NVL(field.getStartString(), ""));
	wEndStringExpected.setText(Const.NVL(field.getEndString(), ""));
	wStartStringDisallowed.setText(Const.NVL(field.getStartStringNotAllowed(), ""));
	wEndStringDisallowed.setText(Const.NVL(field.getEndStringNotAllowed(), ""));
	wRegExpExpected.setText(Const.NVL(field.getRegularExpression(), ""));
	wRegExpDisallowed.setText(Const.NVL(field.getRegularExpressionNotAllowed(), ""));
	
	wAllowedValues.removeAll();
	if (field.getAllowedValues()!=null) {
		for (String allowedValue : field.getAllowedValues()) {
			wAllowedValues.add(Const.NVL(allowedValue, ""));
		}
	}
	
	wSourceValues.setSelection(field.isSourcingValues());
	wSourceStep.setText( Const.NVL(field.getSourcingStepName(), "") );
	wSourceField.setText(Const.NVL(field.getSourcingField(), ""));
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:40,代码来源:ValidatorDialog.java

示例8: getData

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */ 
public void getData()
{
	// Populate the list of validations...
	//
	refreshValidationsList();
	enableFields();
	
	wValidateAll.setSelection(input.isValidatingAll());
	wConcatErrors.setSelection(input.isConcatenatingErrors());
	wConcatSeparator.setText(Const.NVL(input.getConcatenationSeparator(), ""));

	// Select the first available field...
	//
	if (input.getValidations().size()>0) {
		Validation validatorField = input.getValidations().get(0);
		String description = validatorField.getName();
		int index = wValidationsList.indexOf(description);
		if (index>=0) {
			wValidationsList.select(index);
			showSelectedValidatorField(description);
		}
	}
	
	setFlags();
	
	wStepname.selectAll();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:ValidatorDialog.java

示例9: getValidatorFieldData

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void getValidatorFieldData( Validation field ) {

    wDescription.setText( Const.NVL( field.getName(), "" ) );
    wFieldName.setText( Const.NVL( field.getFieldName(), "" ) );

    wErrorCode.setText( Const.NVL( field.getErrorCode(), "" ) );
    wErrorDescription.setText( Const.NVL( field.getErrorDescription(), "" ) );

    wDataTypeVerified.setSelection( field.isDataTypeVerified() );
    wDataType.setText( ValueMetaFactory.getValueMetaName( field.getDataType() ) );
    wConversionMask.setText( Const.NVL( field.getConversionMask(), "" ) );
    wDecimalSymbol.setText( Const.NVL( field.getDecimalSymbol(), "" ) );
    wGroupingSymbol.setText( Const.NVL( field.getGroupingSymbol(), "" ) );

    wNullAllowed.setSelection( field.isNullAllowed() );
    wOnlyNullAllowed.setSelection( field.isOnlyNullAllowed() );
    wOnlyNumeric.setSelection( field.isOnlyNumericAllowed() );
    wMaxLength.setText( Const.NVL( field.getMaximumLength(), "" ) );
    wMinLength.setText( Const.NVL( field.getMinimumLength(), "" ) );
    wMaxValue.setText( Const.NVL( field.getMaximumValue(), "" ) );
    wMinValue.setText( Const.NVL( field.getMinimumValue(), "" ) );
    wStartStringExpected.setText( Const.NVL( field.getStartString(), "" ) );
    wEndStringExpected.setText( Const.NVL( field.getEndString(), "" ) );
    wStartStringDisallowed.setText( Const.NVL( field.getStartStringNotAllowed(), "" ) );
    wEndStringDisallowed.setText( Const.NVL( field.getEndStringNotAllowed(), "" ) );
    wRegExpExpected.setText( Const.NVL( field.getRegularExpression(), "" ) );
    wRegExpDisallowed.setText( Const.NVL( field.getRegularExpressionNotAllowed(), "" ) );

    wAllowedValues.removeAll();
    if ( field.getAllowedValues() != null ) {
      for ( String allowedValue : field.getAllowedValues() ) {
        wAllowedValues.add( Const.NVL( allowedValue, "" ) );
      }
    }

    wSourceValues.setSelection( field.isSourcingValues() );
    wSourceStep.setText( Const.NVL( field.getSourcingStepName(), "" ) );
    wSourceField.setText( Const.NVL( field.getSourcingField(), "" ) );
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:ValidatorDialog.java

示例10: getData

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
  // Populate the list of validations...
  //
  refreshValidationsList();
  enableFields();

  wValidateAll.setSelection( input.isValidatingAll() );
  wConcatErrors.setSelection( input.isConcatenatingErrors() );
  wConcatSeparator.setText( Const.NVL( input.getConcatenationSeparator(), "" ) );

  // Select the first available field...
  //
  if ( input.getValidations().size() > 0 ) {
    Validation validatorField = input.getValidations().get( 0 );
    String description = validatorField.getName();
    int index = wValidationsList.indexOf( description );
    if ( index >= 0 ) {
      wValidationsList.select( index );
      showSelectedValidatorField( description );
    }
  }

  setFlags();

  wStepname.selectAll();
  wStepname.setFocus();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:ValidatorDialog.java

示例11: refreshValidationsList

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void refreshValidationsList() {
	wValidationsList.removeAll();
	for (Validation validation : selectionList) {
		wValidationsList.add(validation.getName());
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:7,代码来源:ValidatorDialog.java

示例12: refreshValidationsList

import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void refreshValidationsList() {
  wValidationsList.removeAll();
  for ( Validation validation : selectionList ) {
    wValidationsList.add( validation.getName() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:7,代码来源:ValidatorDialog.java


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