@Override public ValidationRuleGroup getValidationRuleGroupByName( String name ) { return validationRuleGroupStore.getByName( name ); }
@Override public OptionSet getOptionSetByName( String name ) { return optionSetStore.getByName( name ); }
@Override public TrackedEntityType getTrackedEntityByName( String name ) { return trackedEntityTypeStore.getByName( name ); }
@Override @SuppressWarnings( "unchecked" ) public <T extends IdentifiableObject> T getByName( Class<T> clazz, String name ) { IdentifiableObjectStore<IdentifiableObject> store = getIdentifiableObjectStore( clazz ); if ( store == null ) { return null; } return (T) store.getByName( name ); }
@Override @SuppressWarnings( "unchecked" ) public <T extends IdentifiableObject> List<T> getObjects( Class<T> clazz, IdentifiableProperty property, Collection<String> identifiers ) { IdentifiableObjectStore<T> store = (IdentifiableObjectStore<T>) getIdentifiableObjectStore( clazz ); if ( store == null ) { return new ArrayList<>(); } if ( identifiers != null && !identifiers.isEmpty() ) { if ( property == null || IdentifiableProperty.UID.equals( property ) ) { return store.getByUid( identifiers ); } else if ( IdentifiableProperty.CODE.equals( property ) ) { return store.getByCode( identifiers ); } else if ( IdentifiableProperty.NAME.equals( property ) ) { return store.getByName( identifiers ); } throw new InvalidIdentifierReferenceException( "Invalid identifiable property / class combination: " + property ); } return new ArrayList<>(); }
return store.getByName( value );