public class NamePolicyFactory extends Object
This class bridges GSP's existing case sensitivity configuration (stored in TSQLEnv's EnumMaps) to the SqlNameMatcher framework.
Design rationale: Instead of duplicating vendor-specific case rules, this factory reads from TSQLEnv's existing static maps and creates appropriate matchers on demand.
| Constructor and Description |
|---|
NamePolicyFactory(EDbVendor vendor)
Creates a new NamePolicyFactory for the specified database vendor.
|
| Modifier and Type | Method and Description |
|---|---|
SqlNameMatcher |
getMatcherForType(ESQLDataObjectType type)
Gets or creates a SqlNameMatcher for the specified object type.
|
EDbVendor |
getVendor()
Returns the database vendor associated with this factory.
|
boolean |
isCaseSensitive(ESQLDataObjectType type)
Convenience method to check if a specific object type is case-sensitive
for this vendor.
|
public NamePolicyFactory(EDbVendor vendor)
vendor - the database vendorpublic EDbVendor getVendor()
public SqlNameMatcher getMatcherForType(ESQLDataObjectType type)
The matcher's case sensitivity is determined by querying TSQLEnv's static maps (columnCollationCaseSensitive, tableCollationCaseSensitive, etc.)
Results are cached to avoid repeated map lookups.
type - the SQL data object type (table, column, function, etc.)public boolean isCaseSensitive(ESQLDataObjectType type)
type - the object type