Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, QOS.ch. All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
package ch.qos.logback.classic.db.names;

Adds custom prefix/suffix to table and column names.

Author(s):
Tomasz Nurkiewicz
Since:
0.9.20
public class SimpleDBNameResolver implements DBNameResolver {
  private String tableNamePrefix = "";
  private String tableNameSuffix = "";
  private String columnNamePrefix = "";
  private String columnNameSuffix = "";
  public <N extends Enum<?>> String getTableName(N tableName) {
    return  + tableName.name().toLowerCase() + ;
  }
  public <N extends Enum<?>> String getColumnName(N columnName) {
    return  + columnName.name().toLowerCase() + ;
  }
  public void setTableNamePrefix(String tableNamePrefix) {
    this. = tableNamePrefix != nulltableNamePrefix : "";
  }
  public void setTableNameSuffix(String tableNameSuffix) {
    this. = tableNameSuffix != nulltableNameSuffix : "";
  }
  public void setColumnNamePrefix(String columnNamePrefix) {
    this. = columnNamePrefix != nullcolumnNamePrefix : "";
  }
  public void setColumnNameSuffix(String columnNameSuffix) {
    this. = columnNameSuffix != nullcolumnNameSuffix : "";
  }
New to GrepCode? Check out our FAQ X