Codota Logo
IdentifiableObjectUtils.getDisplayName
Code IndexAdd Codota to your IDE (free)

How to use
getDisplayName
method
in
org.hisp.dhis.common.IdentifiableObjectUtils

Best Java code snippets using org.hisp.dhis.common.IdentifiableObjectUtils.getDisplayName (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: dhis2/dhis2-core

private TypeReport runValidationHooks( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, ObjectBundle bundle )
{
  TypeReport typeReport = new TypeReport( klass );
  if ( objects == null || objects.isEmpty() )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject object = iterator.next();
    List<ErrorReport> errorReports = new ArrayList<>();
    objectBundleHooks.forEach( hook -> errorReports.addAll( hook.validate( object, bundle ) ) );
    if ( !errorReports.isEmpty() )
    {
      ObjectReport objectReport = new ObjectReport( klass, idx, object.getUid() );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReports( errorReports );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
      continue;
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

private TypeReport checkMandatoryAttributes( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, Preheat preheat, PreheatIdentifier identifier )
{
  TypeReport typeReport = new TypeReport( klass );
  Schema schema = schemaService.getDynamicSchema( klass );
  if ( objects.isEmpty() || !schema.havePersistedProperty( "attributeValues" ) )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject object = iterator.next();
    List<ErrorReport> errorReports = checkMandatoryAttributes( klass, object, preheat, identifier );
    if ( !errorReports.isEmpty() )
    {
      ObjectReport objectReport = new ObjectReport( object.getClass(), idx );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReports( errorReports );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

private TypeReport checkUniqueAttributes( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, Preheat preheat, PreheatIdentifier identifier )
{
  TypeReport typeReport = new TypeReport( klass );
  Schema schema = schemaService.getDynamicSchema( klass );
  if ( objects.isEmpty() || !schema.havePersistedProperty( "attributeValues" ) )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject object = iterator.next();
    List<ErrorReport> errorReports = checkUniqueAttributes( klass, object, preheat, identifier );
    if ( !errorReports.isEmpty() )
    {
      ObjectReport objectReport = new ObjectReport( object.getClass(), idx );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReports( errorReports );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

private TypeReport validateBySchemas( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, ObjectBundle bundle )
{
  TypeReport typeReport = new TypeReport( klass );
  if ( objects == null || objects.isEmpty() )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject object = iterator.next();
    List<ErrorReport> validationErrorReports = schemaValidator.validate( object );
    if ( !validationErrorReports.isEmpty() )
    {
      ObjectReport objectReport = new ObjectReport( klass, idx, object.getUid() );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReports( validationErrorReports );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
objectReport.addErrorReports( errorReports );
typeReport.addObjectReport( objectReport );
origin: dhis2/dhis2-core

objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
objectReport.addErrorReport( errorReport );
typeReport.addObjectReport( objectReport );
objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
objectReport.addErrorReport( errorReport );
typeReport.addObjectReport( objectReport );
origin: dhis2/dhis2-core

errorReports.add( new ErrorReport( Attribute.class, ErrorCode.E4009, IdentifiableObjectUtils.getDisplayName( attribute ),
  attributeValue.getValue() ).setMainId( attribute.getUid() ).setErrorProperty( "value" ) );
origin: dhis2/dhis2-core

private TypeReport validateForDelete( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, ObjectBundle bundle )
{
  TypeReport typeReport = new TypeReport( klass );
  if ( objects == null || objects.isEmpty() )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject identifiableObject = iterator.next();
    IdentifiableObject object = bundle.getPreheat().get( bundle.getPreheatIdentifier(), identifiableObject );
    if ( object == null || object.getId() == 0 )
    {
      ObjectReport objectReport = new ObjectReport( klass, idx, object != null ? object.getUid() : null );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReport( new ErrorReport( klass, ErrorCode.E5001, bundle.getPreheatIdentifier(),
        bundle.getPreheatIdentifier().getIdentifiersWithName( identifiableObject ) ).setMainId( object != null ? object.getUid() : null ) );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

private TypeReport validateForCreate( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, ObjectBundle bundle )
{
  TypeReport typeReport = new TypeReport( klass );
  if ( objects == null || objects.isEmpty() )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject identifiableObject = iterator.next();
    IdentifiableObject object = bundle.getPreheat().get( bundle.getPreheatIdentifier(), identifiableObject );
    if ( object != null && object.getId() > 0 )
    {
      ObjectReport objectReport = new ObjectReport( klass, idx, object.getUid() );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReport( new ErrorReport( klass, ErrorCode.E5000, bundle.getPreheatIdentifier(),
        bundle.getPreheatIdentifier().getIdentifiersWithName( identifiableObject ) ).setMainId( identifiableObject.getUid() ) );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

private TypeReport validateForUpdate( Class<? extends IdentifiableObject> klass, List<IdentifiableObject> objects, ObjectBundle bundle )
{
  TypeReport typeReport = new TypeReport( klass );
  if ( objects == null || objects.isEmpty() )
  {
    return typeReport;
  }
  Iterator<IdentifiableObject> iterator = objects.iterator();
  int idx = 0;
  while ( iterator.hasNext() )
  {
    IdentifiableObject identifiableObject = iterator.next();
    IdentifiableObject object = bundle.getPreheat().get( bundle.getPreheatIdentifier(), identifiableObject );
    if ( object == null || object.getId() == 0 )
    {
      ObjectReport objectReport = new ObjectReport( klass, idx, object != null ? object.getUid() : null );
      objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
      objectReport.addErrorReport( new ErrorReport( klass, ErrorCode.E5001, bundle.getPreheatIdentifier(),
        bundle.getPreheatIdentifier().getIdentifiersWithName( identifiableObject ) )
        .setErrorProperty( "id" )
        .setMainId( identifiableObject.getUid() ) );
      typeReport.addObjectReport( objectReport );
      typeReport.getStats().incIgnored();
      iterator.remove();
    }
    idx++;
  }
  return typeReport;
}
origin: dhis2/dhis2-core

objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
typeReport.addObjectReport( objectReport );
origin: dhis2/dhis2-core

  objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
  objectReport.addErrorReport( new ErrorReport( klass, ErrorCode.E3000, identifier.getIdentifiersWithName( bundle.getUser() ),
    identifier.getIdentifiersWithName( object ) ) );
    objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
    objectReport.addErrorReport( new ErrorReport( klass, ErrorCode.E3001, identifier.getIdentifiersWithName( bundle.getUser() ),
      identifier.getIdentifiersWithName( object ) ) );
    objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
    objectReport.addErrorReport( new ErrorReport( klass, ErrorCode.E3002, identifier.getIdentifiersWithName( bundle.getUser() ),
      identifier.getIdentifiersWithName( object ) ) );
  objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
  objectReport.addErrorReports( errorReports );
objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
objectReport.addErrorReports( sharingErrorReports );
origin: dhis2/dhis2-core

objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
typeReport.addObjectReport( objectReport );
origin: dhis2/dhis2-core

objectReport.setDisplayName( IdentifiableObjectUtils.getDisplayName( object ) );
typeReport.addObjectReport( objectReport );
org.hisp.dhis.commonIdentifiableObjectUtilsgetDisplayName

Popular methods of IdentifiableObjectUtils

  • getIdentifiers
    Returns a list of internal identifiers for the given collection of IdentifiableObjects.
  • getUids
    Returns a list of uids for the given collection of IdentifiableObjects.
  • getIdMap
    Returns a map of the identifiable property specified by the given id scheme and the corresponding ob
  • getLocalPeriodIdentifier
    Returns a local period identifier for a specific period / calendar.
  • getLocalPeriodIdentifiers
    Returns a list of calendar specific period identifiers for the given collection of periods and calen
  • join
    Joins the names of the IdentifiableObjects in the given list and separates them with IdentifiableObj
  • getPeriodByPeriodType
    Returns the Period of the argument period type which corresponds to the argument period. The frequen
  • getUidObjectMap
    Returns a mapping between the uid and the name of the given identifiable objects.
  • removeDuplicates
    Removes duplicates from the given list while maintaining the order.

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now