net.sf.beanlib.provider
Class BeanChecker
java.lang.Object
   net.sf.beanlib.provider.BeanChecker
net.sf.beanlib.provider.BeanChecker
- public class BeanChecker 
- extends Object
Bean Checker.
- Author:
- Joe D. Velopar
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
log
private final org.apache.log4j.Logger log
- Singleton instance.
 
 
beanGetter
private final BeanGetter beanGetter
BeanChecker
public BeanChecker()
empty
public boolean empty(Object fromBean,
                     Class<?> k)
- Returns true if the fromBean is empty; or false otherwise.
 It is considered empty if every publicly declared getter methods of the specified class 
 either return null or blank string.
 
- 
- Parameters:
- fromBean- java bean to check if empty or not.
- k- specified class name from which the getter methods are derived.
 
beanEquals
public boolean beanEquals(Object fBean,
                          Object tBean)
- 
- Parameters:
- fBean- from bean
- tBean- to bean
- Returns:
- true if the two beans are equal in a JavaBean sense.
 ie. if they have the same number of properties, 
 and the properties that can be read contain the same values.
 
 TODO: unit test me