1 | public String logicalCollectionTableName(String tableName,↵ | | 1 | public String logicalCollectionTableName(String tableName,↵
|
2 | String ownerEntityTable, String associatedEntityTable, String propertyName↵ | | 2 | String ownerEntityTable, String associatedEntityTable, String propertyName↵
|
3 | ) {↵ | | 3 | ) {↵
|
4 | if ( tableName != null ) {↵ | | 4 | if ( tableName != null ) {↵
|
5 | return tableName;↵ | | 5 | return tableName;↵
|
6 | }↵ | | 6 | }↵
|
7 | else {↵ | | 7 | else {↵
|
8 | //use of a stringbuffer to workaround a JDK bug↵ | | 8 | //use of a stringbuffer to workaround a JDK bug↵
|
9 | return new StringBuffer(ownerEntityTable).append("_")↵ | | 9 | return new StringBuffer(ownerEntityTable).append("_")↵
|
10 | .append(↵ | | 10 | .append(↵
|
11 | associatedEntityTable != null ?↵ | | 11 | associatedEntityTable != null ?↵
|
12 | associatedEntityTable :↵ | | 12 | associatedEntityTable :↵
|
13 | StringHelper.unqualify( propertyName )↵ | | 13 | StringHelper.unqualify( propertyName )↵
|
14 | ).toString();↵ | | 14 | ).toString();↵
|
15 | | | 15 |
|