model,
dmo,
messages,
sfc.getValue() );
if ( value != null ) {
node = new ConstraintNodeImpl( className,
fieldName,
operator,
value );
}
} else {
node = new ConstraintNodeImpl( className,
fieldName );
}
} else if ( sfc.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_ENUM ) {
final String operator = sfc.getOperator();
final boolean isValueRequired = OperatorsOracle.isValueRequired( operator );
if ( isValueRequired ) {
final Value value = getValue( className,
fieldName,
model,
dmo,
messages,
sfc.getValue() );
if ( value != null ) {
node = new ConstraintNodeImpl( className,
fieldName,
operator,
value );
}
} else {
node = new ConstraintNodeImpl( className,
fieldName );
}
} else if ( sfc.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_UNDEFINED ) {
final String operator = sfc.getOperator();
final boolean isValueRequired = OperatorsOracle.isValueRequired( operator );
if ( isValueRequired ) {
node = new ConstraintNodeImpl( className,
fieldName );
} else {
node = new ConstraintNodeImpl( className,
fieldName,
operator,
null );
}