Package org.springframework.dao

Examples of org.springframework.dao.DataRetrievalFailureException


  }

  public void delete(PK id) {
    E entity = this.find(id);
    if (entity == null) {
      throw new DataRetrievalFailureException("No entity found for deletion: " + id);
    }
    super.getHibernateTemplate().delete(entity);
  }
View Full Code Here


                    bw.setPropertyValue(pd.getName(), value);
                    if (populatedProperties != null) {
                        populatedProperties.add(pd.getName());
                    }
                } catch (NotWritablePropertyException ex) {
                    throw new DataRetrievalFailureException("Unable to map column " + column
                            + " to property " + pd.getName(), ex);
                }
            } else {
                if (checkColumns) {
                    throw new InvalidDataAccessApiUsageException("Unable to map column '" + column
View Full Code Here

        } else if (returnType == Float.class) {
            return result.floatValue();
        } else if (Number.class.isAssignableFrom(returnType)) {
            return result;
        } else {
            throw new DataRetrievalFailureException(
                    "The generated key is not of a supported numeric type. " + "Unable to cast ["
                            + result.getClass().getName() + "] to [" + Number.class.getName() + "]");
        }
    }
View Full Code Here

      // Make sure there is no ambiguous information with regards to passwords
      Set<Object> passwords = user.getPrivateCredentials(Password.class);
      if (passwords.size() > 1) {
        logger.warn("User '{}@{}' has more than one password'", name, site.getIdentifier());
        throw new DataRetrievalFailureException("User '" + user + "' has more than one password");
      } else if (passwords.size() == 0) {
        logger.warn("User '{}@{}' has no password", name, site.getIdentifier());
        throw new DataRetrievalFailureException("User '" + user + "' has no password");
      }

      // Create the password according to the site's and Spring Security's
      // digest policy
      Password p = (Password) passwords.iterator().next();
View Full Code Here

TOP

Related Classes of org.springframework.dao.DataRetrievalFailureException

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.