public static String getTableName(String originalTableName)
{
String tableName = originalTableName;
GrailsApplication grailsApplication = Holders.getGrailsApplication();
Object optionalTableMapping =
grailsApplication.getFlatConfig().get("console.datasource.table." + originalTableName + ".mapping");
if(optionalTableMapping != null)
{
tableName = optionalTableMapping.toString();
log.info("remapping [" + originalTableName + "] table to [" + tableName + "]");