Package com.querydsl.sql.codegen
Class ExtendedNamingStrategy
java.lang.Object
com.querydsl.sql.codegen.AbstractNamingStrategy
com.querydsl.sql.codegen.DefaultNamingStrategy
com.querydsl.sql.codegen.ExtendedNamingStrategy
- All Implemented Interfaces:
NamingStrategy
ExtendedNamingStrategy
works like the DefaultNamingStrategy
, but tries to create foreign key
property names in a different way.
It looks for patterns like this .*_<forward>_<inverse> and uses the forward part for the foreign key name and inverse for the inverse foreign key name.
- Author:
- tiwe
-
Field Summary
Fields inherited from class com.querydsl.sql.codegen.AbstractNamingStrategy
foreignKeysClassName, foreignKeysVariable, primaryKeysClassName, primaryKeysVariable, reservedSuffix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPropertyNameForForeignKey
(String fkName, EntityType entityType) Convert the given foreign key name to a foreign key property namegetPropertyNameForInverseForeignKey
(String fkName, EntityType entityType) Convert the given foreign key name to a foreign key property nameMethods inherited from class com.querydsl.sql.codegen.DefaultNamingStrategy
getClassName, getDefaultAlias, getDefaultVariableName, getForeignKeysVariable, getPrimaryKeysVariable, getPropertyName, getPropertyNameForPrimaryKey, toCamelCase
Methods inherited from class com.querydsl.sql.codegen.AbstractNamingStrategy
appendSchema, escape, getClassName, getForeignKeysClassName, getPackage, getPrimaryKeysClassName, normalizeColumnName, normalizeJavaName, normalizeSchemaName, normalizeSQLName, normalizeTableName, setForeignKeysClassName, setForeignKeysVariable, setPrimaryKeysClassName, setPrimaryKeysVariable, setReservedSuffix, shouldGenerateClass, shouldGenerateForeignKey
-
Constructor Details
-
ExtendedNamingStrategy
public ExtendedNamingStrategy()
-
-
Method Details
-
getPropertyNameForForeignKey
Description copied from interface:NamingStrategy
Convert the given foreign key name to a foreign key property name- Specified by:
getPropertyNameForForeignKey
in interfaceNamingStrategy
- Overrides:
getPropertyNameForForeignKey
in classDefaultNamingStrategy
- Returns:
-
getPropertyNameForInverseForeignKey
Description copied from interface:NamingStrategy
Convert the given foreign key name to a foreign key property name- Specified by:
getPropertyNameForInverseForeignKey
in interfaceNamingStrategy
- Overrides:
getPropertyNameForInverseForeignKey
in classDefaultNamingStrategy
- Returns:
-