コード例 #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((cstic == null) ? 0 : cstic.hashCode());
   return result;
 }
コード例 #2
0
 @Override
 public boolean equals(final Object obj) {
   if (obj == null) {
     return false;
   }
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   final MandatoryFieldError other = (MandatoryFieldError) obj;
   if (cstic == null) {
     if (other.cstic != null) {
       return false;
     }
   } else if (!cstic.equals(other.cstic)) {
     return false;
   }
   return true;
 }
コード例 #3
0
  private ConfigurationData createMandatoryFieldConfiguration() {
    final ConfigurationData config = ValidatorTestData.createEmptyConfigurationWithDefaultGroup();
    final UiGroupData group = config.getGroups().get(0);

    final CsticData checkBoxListCstic = new CsticData();
    checkBoxListCstic.setRequired(true);
    checkBoxListCstic.setType(UiType.CHECK_BOX_LIST);
    final List<CsticValueData> domainvalues = new ArrayList<>();
    checkBoxListCstic.setDomainvalues(domainvalues);
    group.getCstics().add(checkBoxListCstic);

    final CsticData stringCstic = new CsticData();
    stringCstic.setType(UiType.STRING);
    stringCstic.setRequired(true);
    group.getCstics().add(stringCstic);

    final CsticData dropDownCstic = new CsticData();
    dropDownCstic.setRequired(true);
    dropDownCstic.setType(UiType.DROPDOWN);
    dropDownCstic.setDomainvalues(domainvalues);
    group.getCstics().add(dropDownCstic);
    return config;
  }