public boolean reselect(Metadata metadata) {
    if (reselectFields == null || reselectFields.isEmpty()) return false;

    for (String fieldName : reselectFields.keySet()) {
      FieldDescriptor fd =
          metadata.getMetadataClassDescriptor().getFieldDescriptorByFieldName(fieldName);
      String actualValue = fd.getValueString(metadata);
      String expectedValue = reselectFields.get(fieldName).getValue();
      if (!actualValue.equals(expectedValue)) return false;
    }
    return true;
  }
 void addParam(MetaMetadataSelectorParam param) {
   if (params == null) params = new HashMapArrayList<String, MetaMetadataSelectorParam>();
   params.put(param.getName(), param);
 }
 public Collection<MetaMetadata> values() {
   return (repositoryByTagName == null) ? null : repositoryByTagName.values();
 }
 public MetaMetadata getByClass(Class<? extends Metadata> metadataClass) {
   if (metadataClass == null) return null;
   return repositoryByTagName.get(metadataTScope.getTag(metadataClass));
 }
 public MetaMetadata getByTagName(String tagName) {
   if (tagName == null) return null;
   return repositoryByTagName.get(tagName);
 }
  public MetaMetadata getMM(Class<? extends Metadata> thatClass) {
    String tag = metadataTScope.getTag(thatClass);

    return (tag == null) ? null : repositoryByTagName.get(tag);
  }