// EQ
{
Matcher matcher = patternEq.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.EQUAL
,matcher.group(2)
);
}
}
// NE
{
Matcher matcher = patternNe.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.NOT_EQUAL
,matcher.group(2)
);
}
}
// GT
{
Matcher matcher = patternGt.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.GREATER_THAN
,matcher.group(2)
);
}
}
// GE
{
Matcher matcher = patternGe.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.GREATER_THAN_OR_EQUAL
,matcher.group(2)
);
}
}
// LT
{
Matcher matcher = patternLt.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.LESS_THAN
,matcher.group(2)
);
}
}
// LE
{
Matcher matcher = patternLe.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.LESS_THAN_OR_EQUAL
,matcher.group(2)
);
}
}
// NULL
{
Matcher matcher = patternNull.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.IS_NULL
,(Expression)null
);
}
}
// NOT NULL
{
Matcher matcher = patternNotNull.matcher(recordSelectorString);
if( matcher.matches() ) {
return new RecordSelectorComparison(
matcher.group(1)
,RecordSelectorComparison.Comparison.IS_NOT_NULL
,(Expression)null
);
}