org.apache.ibatis.ibator.config
Class ColumnRenamingRule

java.lang.Object
  extended by org.apache.ibatis.ibator.config.ColumnRenamingRule

public class ColumnRenamingRule
extends java.lang.Object

This class is used to specify a renaming fule for columns in a table. This renaming rule will be run against all column names before calculating the corresponding property name. The most common use case is when columns in a table are all prefixed by a certain value. For example, if columns in a table are named:

it might be annoying to have the generated properties all containing the CUST prefix. This class can be used to remove the prefix by specifying Note that internally, ibator uses the java.util.regex.Matcher.replaceAll method for this function. See the documentation of that method for example of the regular expression language used in Java.

Author:
Jeff Butler

Constructor Summary
ColumnRenamingRule()
           
 
Method Summary
 java.lang.String getReplaceString()
           
 java.lang.String getSearchString()
           
 void setReplaceString(java.lang.String replaceString)
           
 void setSearchString(java.lang.String searchString)
           
 XmlElement toXmlElement()
           
 void validate(java.util.List<java.lang.String> errors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnRenamingRule

public ColumnRenamingRule()
Method Detail

getReplaceString

public java.lang.String getReplaceString()

setReplaceString

public void setReplaceString(java.lang.String replaceString)

getSearchString

public java.lang.String getSearchString()

setSearchString

public void setSearchString(java.lang.String searchString)

validate

public void validate(java.util.List<java.lang.String> errors)

toXmlElement

public XmlElement toXmlElement()