Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 import static;
 import static;
 import static*;

Imposes an underscore word-separation convention on table names. This will convert entity names in the following way:

Entity NameTable Name

This converter allows for both all-lowercase and all-uppercase table name conventions. For example, depending on the configuration, LicenseRegistration may convert to "LICENSE_REGISTRATION".

This converter, coupled with PluralizedTableNameConverter is all that is required to emulate the ActiveRecord table name conversion.

    private final Case tableNameCase;
    public UnderscoreTableNameConverter(Case tableNameCase)
        this. = checkNotNull(tableNameCase);
    protected String getName(String entityClassCanonicalName)
        return .apply(camelCaseToUnderScore(convertSimpleClassName(entityClassCanonicalName)));
New to GrepCode? Check out our FAQ X