-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
PhysicalNamingStrategyStandardImpl.java
49 lines (41 loc) · 1.46 KB
/
PhysicalNamingStrategyStandardImpl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.boot.model.naming;
import java.io.Serializable;
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
/**
* Standard implementation of the {@link PhysicalNamingStrategy} contract. This is a trivial implementation
* where each physical name is taken to be exactly identical to the corresponding logical name.
*
* @author Steve Ebersole
*/
public class PhysicalNamingStrategyStandardImpl implements PhysicalNamingStrategy, Serializable {
/**
* Singleton access
*/
public static final PhysicalNamingStrategyStandardImpl INSTANCE = new PhysicalNamingStrategyStandardImpl();
@Override
public Identifier toPhysicalCatalogName(Identifier logicalName, JdbcEnvironment context) {
return logicalName;
}
@Override
public Identifier toPhysicalSchemaName(Identifier logicalName, JdbcEnvironment context) {
return logicalName;
}
@Override
public Identifier toPhysicalTableName(Identifier logicalName, JdbcEnvironment context) {
return logicalName;
}
@Override
public Identifier toPhysicalSequenceName(Identifier logicalName, JdbcEnvironment context) {
return logicalName;
}
@Override
public Identifier toPhysicalColumnName(Identifier logicalName, JdbcEnvironment context) {
return logicalName;
}
}