app/src/main/java/db/juhaku/juhakudb/core/NameResolver.java
/**
     * Transforms given field name to camelCase format. e.g. user_name would become userName.
     * <p>This is useful when field name is being validated against field in entity class.</p>
     *
     * @param fieldName String field name to transform.
     * @return String transformed field name.
     *
     * @since 1.2.0
     */
Transforms given field name to camelCase format.

@param fieldName String field name to transform.
@return String transformed field name.


Transforms given field name to camelCase format . @param fieldName String field name to transform . @return String transformed field name .
public static String underscoredToCamelCase(String fieldName) {
        /*
         * If fields is not primary key then remove the _id suffix from the field as it is
         * computed anyway thus not really part of field name.
         */
        if (fieldName.length() > 3) {
            fieldName = fieldName.substring(0, fieldName.lastIndexOf(ID_FIELD_SUFFIX));
        }
        StringBuilder camelCased = new StringBuilder();
        for (int i = 0; i < fieldName.length(); i ++) {
            char letter = fieldName.charAt(i);
            if (letter == '_') {
                i++;
                camelCased.append(Character.toUpperCase(fieldName.charAt(i)));
            } else {
                camelCased.append(letter);
            }
        }
        return camelCased.toString();
    }
public static String underscoredToCamelCase ( String fieldName ) { /*
         * If fields is not primary key then remove the _id suffix from the field as it is
         * computed anyway thus not really part of field name.
         */ if ( fieldName . length ( ) > 3 ) { fieldName = fieldName . substring ( 0 , fieldName . lastIndexOf ( ID_FIELD_SUFFIX ) ) ; } StringBuilder camelCased = new StringBuilder ( ) ; for ( int i = 0 ; i < fieldName . length ( ) ; i ++ ) { char letter = fieldName . charAt ( i ) ; if ( letter == '_' ) { i ++ ; camelCased . append ( Character . toUpperCase ( fieldName . charAt ( i ) ) ) ; } else { camelCased . append ( letter ) ; } } return camelCased . toString ( ) ; }
Transforms given field name to camelCase format.
Transforms given field name to camelCase format .
// For "_" underscores fasten the cycle and uppercase next character for "_".