Package org.hibernate.validator

Examples of org.hibernate.validator.InvalidValue


    if (null == invalidValues) {
      return null;
    } else {
      String[] result = new String[invalidValues.length];
      for (int i = 0; i < invalidValues.length; i++) {
        InvalidValue invalidValue = invalidValues[i];
        result[i] = invalidValue.getMessage();
      }
      return result;
    }
  }
View Full Code Here


        InvalidValue[] invalidValues = validator
            .getInvalidValues(value);
        if (null != invalidValues && invalidValues.length > 0) {
          validationMessages = new String[invalidValues.length];
          for (int i = 0; i < invalidValues.length; i++) {
            InvalidValue invalidValue = invalidValues[i];
            validationMessages[i] = invalidValue.getMessage();
          }
        }
      }

    }
View Full Code Here

  }
 
  public void setBalance(Money balance) {
    if (!balance.getCurrency().equals(getCurrency())) {
      throw new InvalidStateException(new InvalidValue[] {
          new InvalidValue("currency for new balance ("+balance.getCurrency()+") does not match account currency ("+getCurrency()+")", getClass(), "balance", balance, this)
      });
    }
   
    setBalance(balance.getValue());
  }
View Full Code Here

      return;
    }
   
    if (getAccountType().hasUploads()) {
      throw new InvalidStateException(new InvalidValue[] {
          new InvalidValue("cannot disable balances on accounts with uploads", getClass(), "accountTypeId", AccountType.CASH, this)
      });
    }
   
    setAccountType(AccountType.CASH);
  }
View Full Code Here

        InvalidValue[] invalidValues = validator
            .getInvalidValues(value);
        if (null != invalidValues && invalidValues.length > 0) {
          validationMessages = new String[invalidValues.length];
          for (int i = 0; i < invalidValues.length; i++) {
            InvalidValue invalidValue = invalidValues[i];
            validationMessages[i] = invalidValue.getMessage();
          }
        }
      }

    }
View Full Code Here

        if (null == invalidValues) {
          return null;
        } else {
          String[] result = new String[invalidValues.length];
          for (int i = 0; i < invalidValues.length; i++) {
            InvalidValue invalidValue = invalidValues[i];
            result[i] = invalidValue.getMessage();
          }
          return result;
        }
      }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.InvalidValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.