Package de.xanders.common.mapper.exceptions

Examples of de.xanders.common.mapper.exceptions.PropertyMappingFailedException


                  LOGGER.debug(this.callerObjectDescription + ": PropertyEditor not found for property [" + name + "](" + clazz + ").");
                }
              } catch (TypeMismatchException ex) {
                toStringConvertionFailed = true;
                // LOGGER.debug(this.callerObjectDescription + ": String conversion of property [" + name + "] failed. Exception [" + ex + "]");
                propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name, "String conversion of property ["
                    + name + "] failed." + ex.getMessage(), ex));
              }

              if (toStringConvertionFailed) {
                propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name, "Default conversion of property ["
                    + name + "] failed." + e.getMessage(), e));

              }
            }
          }
        } catch (InvalidPropertyException ex) {
          // LOGGER.debug(this.callerObjectDescription + ": " + ex);
          propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name, "Property [" + name
              + "] does not exist in the target bean (" + target.getClass() + ")." + ex.getMessage(), ex));
        } catch (Throwable ex) {
          LOGGER.debug(this.callerObjectDescription + ": " + ex.getLocalizedMessage(), ex);
          propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name,
              "Unknown exception occured during mapping property [" + name + "] to the target bean (" + target.getClass() + ")." + ex.getMessage()));
        }
      }
    }
    if (!propertyMappingFailedExceptions.isEmpty()) {
View Full Code Here


   */
  private void handleMappingExceptions(PropertyMappingFailedException[] pmexceptions, boolean ignoreExceptions) {
    LOGGER.debug(this.callerObjectDescription + ": Mapping of the following properties failed:");
    if (pmexceptions != null) {
      for (int i = 0; i < pmexceptions.length; i++) {
        PropertyMappingFailedException element = pmexceptions[i];
        LOGGER.debug("|- [" + element.getPropertyName() + "]" + "(" + element.getBeanClass().getName() + "). Reason: [" + element.getMessage() + "]");
        if (!ignoreExceptions) {
          LOGGER.error(element);
        }
      }
    }
View Full Code Here

                  LOGGER.debug(this.callerObjectDescription + ": PropertyEditor not found for property [" + name + "](" + clazz + ").");
                }
              } catch (TypeMismatchException ex) {
                toStringConvertionFailed = true;
                // LOGGER.debug(this.callerObjectDescription + ": String conversion of property [" + name + "] failed. Exception [" + ex + "]");
                propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name, "String conversion of property ["
                    + name + "] failed." + ex.getMessage(), ex));
              }

              if (toStringConvertionFailed) {
                propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name, "Default conversion of property ["
                    + name + "] failed." + e.getMessage(), e));

              }
            }
          }
        } catch (InvalidPropertyException ex) {
          // LOGGER.debug(this.callerObjectDescription + ": " + ex);
          propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name, "Property [" + name
              + "] does not exist in the target bean (" + target.getClass() + ")." + ex.getMessage(), ex));
        } catch (Throwable ex) {
          LOGGER.debug(this.callerObjectDescription + ": " + ex.getLocalizedMessage(), ex);
          propertyMappingFailedExceptions.add(new PropertyMappingFailedException(target.getClass(), name,
              "Unknown exception occured during mapping property [" + name + "] to the target bean (" + target.getClass() + ")." + ex.getMessage()));
        }
      }
    }
    if (!propertyMappingFailedExceptions.isEmpty()) {
View Full Code Here

   */
  private void handleMappingExceptions(PropertyMappingFailedException[] pmexceptions, boolean ignoreExceptions) {
    LOGGER.debug(this.callerObjectDescription + ": Mapping of the following properties failed:");
    if (pmexceptions != null) {
      for (int i = 0; i < pmexceptions.length; i++) {
        PropertyMappingFailedException element = pmexceptions[i];
        LOGGER.debug("|- [" + element.getPropertyName() + "]" + "(" + element.getBeanClass().getName() + "). Reason: [" + element.getMessage() + "]");
        if (!ignoreExceptions) {
          LOGGER.error(element);
        }
      }
    }
View Full Code Here

TOP

Related Classes of de.xanders.common.mapper.exceptions.PropertyMappingFailedException

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.