@Override public String getFieldName() { return condition.getFactField(); }
@Override public String getFieldName() { return condition.getFactField(); }
public ConditionColumnDetails(final ConditionCol52 column) { super( column ); this.factField = column.getFactField(); this.operator = column.getOperator(); }
public ConditionColumnDetails(final ConditionCol52 column) { super( column ); this.factField = column.getFactField(); this.operator = column.getOperator(); }
ConditionCol52 c = (ConditionCol52) col; if ( c.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_LITERAL ) { if ( c.getFactField() == null || c.getFactField().equals( "" ) ) { return false;
ConditionCol52 c = (ConditionCol52) col; if ( c.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_LITERAL ) { if ( c.getFactField() == null || c.getFactField().equals( "" ) ) { return false;
@Override FieldConstraint constructSingleFieldConstraint(ConditionCol52 c, List<DTCellValue52> columnData) { SingleFieldConstraint sfc = new SingleFieldConstraint( c.getFactField() ); sfc.setConstraintValueType( c.getConstraintValueType() ); sfc.setFieldType( c.getFieldType() ); sfc.setOperator( "not in" ); List<String> consumedValues = new ArrayList<String>(); StringBuilder value = new StringBuilder(); value.append( "( " ); for ( DTCellValue52 cv : columnData ) { //Ensure cell values start and end with quotes String scv = GuidedDTDRLUtilities.convertDTCellValueToString( cv ); if ( scv != null ) { if ( !consumedValues.contains( scv ) ) { value.append( scv ).append( ", " ); } consumedValues.add( scv ); } } value.delete( value.lastIndexOf( "," ), value.length() - 1 ); value.append( ")" ); sfc.setValue( value.toString() ); return sfc; }
@Override SingleFieldConstraint constructSingleFieldConstraint(ConditionCol52 c, List<DTCellValue52> columnData) { SingleFieldConstraint sfc = new SingleFieldConstraint( c.getFactField() ); sfc.setConstraintValueType( c.getConstraintValueType() ); sfc.setFieldType( c.getFieldType() ); sfc.setOperator( "in" ); List<String> consumedValues = new ArrayList<String>(); StringBuilder value = new StringBuilder(); value.append( "( " ); for ( DTCellValue52 cv : columnData ) { //Ensure cell values start and end with quotes String scv = GuidedDTDRLUtilities.convertDTCellValueToString( cv ); if ( scv != null ) { if ( !consumedValues.contains( scv ) ) { value.append( scv ).append( ", " ); } consumedValues.add( scv ); } } value.delete( value.lastIndexOf( "," ), value.length() - 1 ); value.append( ")" ); sfc.setValue( value.toString() ); return sfc; }
@Override FieldConstraint constructSingleFieldConstraint(ConditionCol52 c, List<DTCellValue52> columnData) { SingleFieldConstraint sfc = new SingleFieldConstraint( c.getFactField() ); sfc.setConstraintValueType( c.getConstraintValueType() ); sfc.setFieldType( c.getFieldType() ); sfc.setOperator( "not in" ); List<String> consumedValues = new ArrayList<String>(); StringBuilder value = new StringBuilder(); value.append( "( " ); for ( DTCellValue52 cv : columnData ) { //Ensure cell values start and end with quotes String scv = GuidedDTDRLUtilities.convertDTCellValueToString( cv ); if ( scv != null ) { if ( !consumedValues.contains( scv ) ) { value.append( scv ).append( ", " ); } consumedValues.add( scv ); } } value.delete( value.lastIndexOf( "," ), value.length() - 1 ); value.append( ")" ); sfc.setValue( value.toString() ); return sfc; }
@Override SingleFieldConstraint constructSingleFieldConstraint(ConditionCol52 c, List<DTCellValue52> columnData) { SingleFieldConstraint sfc = new SingleFieldConstraint( c.getFactField() ); sfc.setConstraintValueType( c.getConstraintValueType() ); sfc.setFieldType( c.getFieldType() ); sfc.setOperator( "in" ); List<String> consumedValues = new ArrayList<String>(); StringBuilder value = new StringBuilder(); value.append( "( " ); for ( DTCellValue52 cv : columnData ) { //Ensure cell values start and end with quotes String scv = GuidedDTDRLUtilities.convertDTCellValueToString( cv ); if ( scv != null ) { if ( !consumedValues.contains( scv ) ) { value.append( scv ).append( ", " ); } consumedValues.add( scv ); } } value.delete( value.lastIndexOf( "," ), value.length() - 1 ); value.append( ")" ); sfc.setValue( value.toString() ); return sfc; }
final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName,
SingleFieldConstraint pred = new SingleFieldConstraint(); pred.setConstraintValueType( c.getConstraintValueType() ); if ( c.getFactField() != null && c.getFactField().indexOf( "$param" ) > -1 ) { pred.setValue( c.getFactField().replace( "$param", cell ) ); } else {
SingleFieldConstraint pred = new SingleFieldConstraint(); pred.setConstraintValueType( c.getConstraintValueType() ); if ( c.getFactField() != null && c.getFactField().indexOf( "$param" ) > -1 ) { pred.setValue( c.getFactField().replace( "$param", cell ) ); } else {
private FieldConstraint makeSingleFieldConstraint(ConditionCol52 c, String cell) { SingleFieldConstraint sfc = new SingleFieldConstraint( c.getFactField() );
final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName,
private FieldConstraint makeSingleFieldConstraint(ConditionCol52 c, String cell) { SingleFieldConstraint sfc = new SingleFieldConstraint( c.getFactField() );
tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "age", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ) ).getFactType() ); tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ).getConstraintValueType() ); assertEquals( "rating", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ) ).getFactType() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "name", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Person", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "(not needed)", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Person2", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() );
tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "age", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getConstraintValueType() ); assertEquals( "rating", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ) ).getFactType() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "name", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Person", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ).getConstraintValueType() ); assertEquals( "(not needed)", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Person", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ) ).getFactType() );
tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "age", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getConstraintValueType() ); assertEquals( "name", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ) ).getFactType() ); tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ).getConstraintValueType() ); assertEquals( "rating", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ) ).getFactType() ); tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getConstraintValueType() ); assertEquals( "(not needed)", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getFactField() ); assertEquals( "Driver", tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() );
c1.getFactField() ) ); assertFalse( dt.hasValueList( c1 ) ); String[] r = sce.getEnums( p1.getFactType(), c1.getFactField(), currentValueMap ).fixedList; assertEquals( 2, c1_.getFactField() ) ); assertFalse( dt.hasValueList( c1_ ) ); r = sce.getEnums( p1_.getFactType(), c1_.getFactField(), currentValueMap ).fixedList; assertEquals( 2, c1__.getFactField() ) ); assertTrue( dt.hasValueList( c1__ ) ); r = dt.getValueList( c1__ ); c1___.getFactField() ) ); assertTrue( dt.hasValueList( c1___ ) ); r = dt.getValueList( c1___ );