public IntersectionType match(ITableProperties firstProperties, ITableProperties secondProperties) { P firstValue = getPropertyValue(firstProperties); P secondValue = getPropertyValue(secondProperties); return matchValues(firstValue, secondValue); }
public MatchingOpenMethodDispatcher(IOpenMethod method, XlsModuleOpenClass moduleOpenClass) { super(); decorate(method); this.moduleOpenClass = moduleOpenClass; }
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.CaRegionsEnum[] firstValue, org.openl.rules.enumeration.CaRegionsEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
public MatchingResult match(ITableProperties properties, IRulesRuntimeContext context) { C contextValue = getContextValue(context); P propertyValue = getPropertyValue(properties); return matchValues(propertyValue, contextValue); }
private OpenMethodDispatcher getOpenMethodDispatcher(IOpenMethod method) { OpenMethodDispatcher decorator; IOpenMethod decorated = undecorateForMultimoduleDispatching(method); if (useDescisionTableDispatcher) { decorator = new OverloadedMethodsDispatcherTable(decorated, this); } else { decorator = new MatchingOpenMethodDispatcher(decorated, this); } return decorator; }
@Override protected IntersectionType matchNotNulls(java.lang.String[] firstValue, java.lang.String[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(java.lang.String firstValue, java.lang.String secondValue) { return intersectionForEQ(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.CountriesEnum[] firstValue, org.openl.rules.enumeration.CountriesEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.UsRegionsEnum[] firstValue, org.openl.rules.enumeration.UsRegionsEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.RegionsEnum[] firstValue, org.openl.rules.enumeration.RegionsEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
protected IntersectionType matchValues(P firstValue, P secondValue) { if (firstValue == secondValue) { return IntersectionType.EQUALS; } if (firstValue == null) { return IntersectionType.CONTAINS; } if (secondValue == null) { return IntersectionType.NESTED; } return matchNotNulls(firstValue, secondValue); }
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.CurrenciesEnum[] firstValue, org.openl.rules.enumeration.CurrenciesEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.LanguagesEnum[] firstValue, org.openl.rules.enumeration.LanguagesEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.CaProvincesEnum[] firstValue, org.openl.rules.enumeration.CaProvincesEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
@Override protected IntersectionType matchNotNulls(org.openl.rules.enumeration.UsStatesEnum[] firstValue, org.openl.rules.enumeration.UsStatesEnum[] secondValue) { return intersectionForCONTAINS(firstValue, secondValue); } });
/** * As all methods in group have the similar signature, so it is possible do get any member and get it`s signature. * * @return method signature of the method in group. */ private IMethodSignature getMethodSignature() { return dispatcher.getSignature(); }
public int compareNotNulls(org.openl.rules.enumeration.OriginsEnum propertyValue1, org.openl.rules.enumeration.OriginsEnum propertyValue2) { return MAX(propertyValue1, propertyValue2); } });
@Override public IOpenMethod getDecisionTableOpenMethod() { return delegate.getDecisionTableOpenMethod(); }
@Override public String getName() { return delegate.getName(); }
@Override public List<IOpenMethod> getCandidates() { return delegate.getCandidates(); }