initial add of EbeanORM server based on v2.8.1

This commit is contained in:
rbygrave
2012-09-14 00:40:39 +12:00
parent 2b74d0f9d9
commit 96ce4c0ddf
1188 changed files with 135034 additions and 0 deletions
@@ -0,0 +1,31 @@
package com.avaje.ebeaninternal.util;
public class CamelCaseHelper {
/**
* To camel from underscore.
*
* @param underscore
* the underscore
*
* @return the string
*/
public static String toCamelFromUnderscore(String underscore) {
StringBuffer result = new StringBuffer();
String[] vals = underscore.split("_");
for (int i = 0; i < vals.length; i++) {
String lower = vals[i].toLowerCase();
if (i > 0) {
char c = Character.toUpperCase(lower.charAt(0));
result.append(c);
result.append(lower.substring(1));
} else {
result.append(lower);
}
}
return result.toString();
}
}