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.
Status since the identifier normalization unification (P0d): internal name
equality no longer routes through this factory — NameService and every other
engine delegate to the canonical relation
(SQLUtil.sameName(EDbVendor, ESQLDataObjectType, String,
String) / IdentifierService.areEqualStatic(EDbVendor, ESQLDataObjectType, String,
String)). This class remains only as the public SqlNameMatcher extension
bridge. New internal code must use the SQLUtil façade, not a matcher from here.
| 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