congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ValidationRule.getRightSide
Code IndexAdd Tabnine to your IDE (free)

How to use
getRightSide
method
in
org.hisp.dhis.validation.ValidationRule

Best Java code snippets using org.hisp.dhis.validation.ValidationRule.getRightSide (Showing top 8 results out of 315)

origin: dhis2/dhis2-core

@Override
public Set<DataElement> getDataElements( ValidationRule validationRule )
{
  Set<DataElement> elements = new HashSet<>();
  elements.addAll( expressionService.getDataElementsInExpression( validationRule.getLeftSide().getExpression() ) );
  elements.addAll( expressionService.getDataElementsInExpression( validationRule.getRightSide().getExpression() ) );
  return elements;
}
origin: dhis2/dhis2-core

@Override
public void deleteExpression( Expression expression )
{
  Iterator<ValidationRule> iterator = validationRuleService.getAllValidationRules().iterator();
  
  while ( iterator.hasNext() )
  {
    ValidationRule rule = iterator.next();
    
    Expression leftSide = rule.getLeftSide();
    Expression rightSide = rule.getRightSide();
    if ( (leftSide != null && leftSide.equals( expression )) ||
       (rightSide != null && rightSide.equals( expression )) )
    {
      iterator.remove();
      validationRuleService.deleteValidationRule( rule );
    }
  }
}
 
origin: dhis2/dhis2-core

public ValidationRuleExtended( ValidationRule rule )
{
  this.rule = rule;
  this.organisationUnitLevels = new HashSet<>( rule.getOrganisationUnitLevels() );
  this.leftSlidingWindow = rule.getLeftSide().getSlidingWindow();
  this.rightSlidingWindow = rule.getRightSide().getSlidingWindow();
}
origin: dhis2/dhis2-core

@Override
public SortedMap<ValidationRule, String> getInvalidValidationRuleRightSideExpressions()
{
  SortedMap<ValidationRule, String> invalids = new TreeMap<>();
  I18n i18n = i18nManager.getI18n();
  for ( ValidationRule rule : validationRuleService.getAllValidationRules() )
  {
    ExpressionValidationOutcome result = expressionService.expressionIsValid( rule.getRightSide().getExpression() );
    if ( !result.isValid() )
    {
      invalids.put( rule, i18n.getString(result.getKey()) );
    }
  }
  return invalids;
}
origin: dhis2/dhis2-core

Map<String, Double> rightSideValues = getValuesForExpression( ruleX.getRule().getRightSide(),
  ruleX.getRightSlidingWindow() );
origin: dhis2/dhis2-core

@Override
public Collection<ValidationRule> getValidationRulesForDataSet( DataSet dataSet )
{
  Set<String> elementsAndOptionCombos = new HashSet<>();
  for ( DataSetElement dataSetElement : dataSet.getDataSetElements() )
  {
    DataElement dataElement = dataSetElement.getDataElement();
    elementsAndOptionCombos.add( dataElement.getUid() );
    CategoryCombo catCombo = dataSetElement.hasCategoryCombo()
      ? dataSetElement.getCategoryCombo()
      : dataElement.getCategoryCombo();
    for ( CategoryOptionCombo optionCombo : catCombo.getOptionCombos() )
    {
      elementsAndOptionCombos.add( dataElement.getUid() + Expression.SEPARATOR + optionCombo.getUid() );
    }
  }
  Set<ValidationRule> rulesForDataSet = new HashSet<>();
  for ( ValidationRule rule : getAllFormValidationRules() )
  {
    if ( !Sets.intersection( expressionService.getElementsAndOptionCombosInExpression( rule.getLeftSide().getExpression() ), elementsAndOptionCombos ).isEmpty() ||
      !Sets.intersection( expressionService.getElementsAndOptionCombosInExpression( rule.getRightSide().getExpression() ), elementsAndOptionCombos ).isEmpty() )
    {
      rulesForDataSet.add( rule );
    }
  }
  return rulesForDataSet;
}
origin: dhis2/dhis2-core

  .getDimensionalItemIdsInExpression( rule.getLeftSide().getExpression() );
dimensionItemIdentifiers.putValues(
  expressionService.getDimensionalItemIdsInExpression( rule.getRightSide().getExpression() ) );
origin: dhis2/dhis2-core

if ( ruleX.getRule().getRightSide().getMissingValueStrategy() == NEVER_SKIP )
org.hisp.dhis.validationValidationRulegetRightSide

Popular methods of ValidationRule

  • getGroups
  • getLeftSide
  • setPeriodType
  • <init>
  • equals
  • getId
  • getNotificationTemplates
  • getPeriodType
  • setAutoFields
  • setDescription
  • setLeftSide
  • setOperator
  • setLeftSide,
  • setOperator,
  • setRightSide,
  • getDisplayName,
  • getImportance,
  • getOperator,
  • getOrganisationUnitLevels,
  • getUid,
  • hashCode

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Join (org.hibernate.mapping)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now