code: public boolean setDataUsageFor(DataAttribute attribute, Set<DataUsage> dataUsage) throws ParameterException, LockingException {
                  Validate.notNull(attribute);
                  Validate.notNull(dataUsage);
                  Validate.notEmpty(dataUsage);
  
                  if (isFieldLocked(EntryField.DATA)) {
                          if (!(this.dataUsage.containsKey(attribute) && this.dataUsage.get(attribute).equals(dataUsage))) {
                                  throw new LockingException(EntryField.DATA);
                          }
                          return false;
                  } else {
                          this.dataUsage.put(attribute, dataUsage);
                          return true;
                  }
          }
docs: Sets the data usage for a given attribute.
  
  @param attribute The attribute (data element) for which the usage is
  specified.
  @param dataUsage The usage of the data element specified by the given
  attribute.
  @return <code>true</code> if the data usage for the given attribute
  was modified;<br>
  <code>false</code> otherwise.
  @throws ParameterException if the given attribute is
  <code>null</code> or data usage is invalid (<code>null</code> or
  empty).
  @throws LockingException if the corresponding field is locked <br>
  and the given data usage is not identical to the current one.