org.apache.ibatis.ibator.internal.util
Class JavaBeansUtil

java.lang.Object
  extended by org.apache.ibatis.ibator.internal.util.JavaBeansUtil

public class JavaBeansUtil
extends java.lang.Object

Author:
Jeff Butler

Method Summary
static java.lang.String getCamelCaseString(java.lang.String inputString, boolean firstCharacterUppercase)
           
static java.lang.String getGetterMethodName(java.lang.String property, FullyQualifiedJavaType fullyQualifiedJavaType)
          JavaBeans rules: eMail > geteMail() firstName > getFirstName() URL > getURL() XAxis > getXAxis() a > getA() B > invalid - this method assumes that this is not the case.
static java.lang.String getSetterMethodName(java.lang.String property)
          JavaBeans rules: eMail > seteMail() firstName > setFirstName() URL > setURL() XAxis > setXAxis() a > setA() B > invalid - this method assumes that this is not the case.
static java.lang.String getValidPropertyName(java.lang.String inputString)
          This method ensures that the specified input string is a valid Java property name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGetterMethodName

public static java.lang.String getGetterMethodName(java.lang.String property,
                                                   FullyQualifiedJavaType fullyQualifiedJavaType)
JavaBeans rules: eMail > geteMail() firstName > getFirstName() URL > getURL() XAxis > getXAxis() a > getA() B > invalid - this method assumes that this is not the case. Call getValidPropertyName first. Yaxis > invalid - this method assumes that this is not the case. Call getValidPropertyName first.

Parameters:
property -
Returns:
the getter method name

getSetterMethodName

public static java.lang.String getSetterMethodName(java.lang.String property)
JavaBeans rules: eMail > seteMail() firstName > setFirstName() URL > setURL() XAxis > setXAxis() a > setA() B > invalid - this method assumes that this is not the case. Call getValidPropertyName first. Yaxis > invalid - this method assumes that this is not the case. Call getValidPropertyName first.

Parameters:
property -
Returns:
the setter method name

getCamelCaseString

public static java.lang.String getCamelCaseString(java.lang.String inputString,
                                                  boolean firstCharacterUppercase)

getValidPropertyName

public static java.lang.String getValidPropertyName(java.lang.String inputString)
This method ensures that the specified input string is a valid Java property name. The rules are as follows: 1. If the first character is lower case, then OK 2. If the first two characters are upper case, then OK 3. If the first character is upper case, and the second character is lower case, then the first character should be made lower case eMail > eMail firstName > firstName URL > URL XAxis > XAxis a > a B > b Yaxis > yaxis

Parameters:
inputString -
Returns:
the valid property name