Tabnine Logo
Program.getProgramIndicators
Code IndexAdd Tabnine to your IDE (free)

How to use
getProgramIndicators
method
in
org.hisp.dhis.program.Program

Best Java code snippets using org.hisp.dhis.program.Program.getProgramIndicators (Showing top 3 results out of 315)

origin: dhis2/dhis2-core

  @Override
  public void deleteProgram( Program program )
  {
    Collection<ProgramIndicator> indicators = new HashSet<ProgramIndicator>( program.getProgramIndicators() );

    Iterator<ProgramIndicator> iter = indicators.iterator();

    while ( iter.hasNext() )
    {
      ProgramIndicator indicator = iter.next();
      programIndicatorService.deleteProgramIndicator( indicator );
    }
  }
}
origin: dhis2/dhis2-core

private SetMap<Class<? extends IdentifiableObject>, IdentifiableObject> handleProgram( SetMap<Class<? extends IdentifiableObject>, IdentifiableObject> metadata, Program program )
{
  if ( program == null ) return metadata;
  metadata.putValue( Program.class, program );
  handleAttributes( metadata, program );
  handleCategoryCombo( metadata, program.getCategoryCombo() );
  handleDataEntryForm( metadata, program.getDataEntryForm() );
  handleTrackedEntityType( metadata, program.getTrackedEntityType() );
  program.getNotificationTemplates().forEach( template -> handleNotificationTemplate( metadata, template ) );
  program.getProgramStages().forEach( programStage -> handleProgramStage( metadata, programStage ) );
  program.getProgramAttributes().forEach( programTrackedEntityAttribute -> handleProgramTrackedEntityAttribute( metadata, programTrackedEntityAttribute ) );
  program.getProgramIndicators().forEach( programIndicator -> handleProgramIndicator( metadata, programIndicator ) );
  List<ProgramRule> programRules = programRuleService.getProgramRule( program );
  List<ProgramRuleVariable> programRuleVariables = programRuleVariableService.getProgramRuleVariable( program );
  programRules.forEach( programRule -> handleProgramRule( metadata, programRule ) );
  programRuleVariables.forEach( programRuleVariable -> handleProgramRuleVariable( metadata, programRuleVariable ) );
  return metadata;
}
origin: dhis2/dhis2-core

private QueryItem getQueryItemFromDimension( String dimension, Program program )
{
  String[] split = dimension.split( ITEM_SEP );
  String item = split[0];
  LegendSet legendSet = split.length > 1 && split[1] != null ? legendSetService.getLegendSet( split[1] ) : null;
  DataElement de = dataElementService.getDataElement( item );
  if ( de != null && program.containsDataElement( de ) )
  {
    ValueType valueType = legendSet != null ? ValueType.TEXT : de.getValueType();
    return new QueryItem( de, legendSet, valueType, de.getAggregationType(), de.getOptionSet() );
  }
  TrackedEntityAttribute at = attributeService.getTrackedEntityAttribute( item );
  if ( at != null && program.containsAttribute( at ) )
  {
    ValueType valueType = legendSet != null ? ValueType.TEXT : at.getValueType();
    return new QueryItem( at, legendSet, valueType, at.getAggregationType(), at.getOptionSet() );
  }
  ProgramIndicator pi = programIndicatorService.getProgramIndicatorByUid( item );
  if ( pi != null && program.getProgramIndicators().contains( pi ) )
  {
    return new QueryItem( pi, legendSet, ValueType.NUMBER, pi.getAggregationType(), null );
  }
  throw new IllegalQueryException(
    "Item identifier does not reference any data element, attribute or indicator part of the program: " + item );
}
org.hisp.dhis.programProgramgetProgramIndicators

Popular methods of Program

  • getUid
  • equals
  • getProgramStages
  • getCategoryCombo
  • getDataElements
    Returns all data elements which are part of the stages of this program.
  • getId
  • getProgramAttributes
  • getTrackedEntityAttributes
    Returns TrackedEntityAttributes from ProgramTrackedEntityAttributes. Use getAttributes() to access t
  • isRegistration
  • getName
  • getNotificationTemplates
  • getOrganisationUnits
  • getNotificationTemplates,
  • getOrganisationUnits,
  • getProgramType,
  • getTrackedEntityType,
  • hasOrganisationUnit,
  • hashCode,
  • isWithoutRegistration,
  • setCategoryCombo,
  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JButton (javax.swing)
  • JList (javax.swing)
  • Top 17 Plugins for Android Studio
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