org.oddjob.beancmpr.beans
Class AbstractResultBeanFactory

java.lang.Object
  extended by org.oddjob.beancmpr.beans.AbstractResultBeanFactory
All Implemented Interfaces:
ResultBeanFactory
Direct Known Subclasses:
SharedNameResultBeanFactory

public abstract class AbstractResultBeanFactory
extends Object
implements ResultBeanFactory

Base implementation for creating result beans.

Author:
rob

Nested Class Summary
protected static interface AbstractResultBeanFactory.ResultBeanClassProvider
           
 
Constructor Summary
AbstractResultBeanFactory()
           
 
Method Summary
 Object createComparisonResult(MultiValueComparison<Matchable> matchableComparison)
          Create a result bean for a comparison between two beans.
 Object createXMissingResult(Matchable y)
          Create a result bean for a missing X.
 Object createYMissingResult(Matchable x)
          Create a result bean for a missing Y.
protected abstract  AbstractResultBeanFactory.ResultBeanClassProvider getClassProvider()
           
protected abstract  void populateComparison(Object resultBean, String property, Comparison<?> comparison)
           
protected abstract  void populateKeyProperty(Object resultBean, String property, Object value)
           
protected abstract  void populateMatchResultType(Object resultBean, MatchResultType.Type matchResultType)
           
protected abstract  void populateXProperty(Object resultBean, String property, Object value)
           
protected abstract  void populateYProperty(Object resultBean, String property, Object value)
           
protected static String upperCaseFirstLetter(String propertyName)
          Utility method to upper case the first letter of a property name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResultBeanFactory

public AbstractResultBeanFactory()
Method Detail

createComparisonResult

public Object createComparisonResult(MultiValueComparison<Matchable> matchableComparison)
Description copied from interface: ResultBeanFactory
Create a result bean for a comparison between two beans.

Specified by:
createComparisonResult in interface ResultBeanFactory
Returns:

createXMissingResult

public Object createXMissingResult(Matchable y)
Description copied from interface: ResultBeanFactory
Create a result bean for a missing X.

Specified by:
createXMissingResult in interface ResultBeanFactory
Returns:

createYMissingResult

public Object createYMissingResult(Matchable x)
Description copied from interface: ResultBeanFactory
Create a result bean for a missing Y.

Specified by:
createYMissingResult in interface ResultBeanFactory
Returns:

getClassProvider

protected abstract AbstractResultBeanFactory.ResultBeanClassProvider getClassProvider()

populateMatchResultType

protected abstract void populateMatchResultType(Object resultBean,
                                                MatchResultType.Type matchResultType)

populateKeyProperty

protected abstract void populateKeyProperty(Object resultBean,
                                            String property,
                                            Object value)

populateXProperty

protected abstract void populateXProperty(Object resultBean,
                                          String property,
                                          Object value)

populateYProperty

protected abstract void populateYProperty(Object resultBean,
                                          String property,
                                          Object value)

populateComparison

protected abstract void populateComparison(Object resultBean,
                                           String property,
                                           Comparison<?> comparison)

upperCaseFirstLetter

protected static String upperCaseFirstLetter(String propertyName)
Utility method to upper case the first letter of a property name.

Parameters:
propertyName -
Returns:


Copyright © 2013. All Rights Reserved.