public static final class IdentifierProfile.Builder extends Object
The builder is seeded from vendor defaults. Overrides can be applied per object group. The built profile is immutable.
Usage example:
IdentifierProfile profile = IdentifierProfile
.builder(EDbVendor.dbvmssql)
.withColumnRules(customColumnRules)
.build();
| Modifier and Type | Method and Description |
|---|---|
IdentifierProfile |
build()
Build an immutable IdentifierProfile.
|
IdentifierProfile.Builder |
withColumnRules(IdentifierRules rules)
Convenience: override COLUMN_GROUP rules.
|
IdentifierProfile.Builder |
withFlags(IdentifierProfile.VendorFlags flags)
Override VendorFlags (replaces default-seeded flags).
|
IdentifierProfile.Builder |
withNameRules(IdentifierRules rules)
Convenience: override NAME_GROUP rules.
|
IdentifierProfile.Builder |
withObjectRules(ESQLDataObjectType objectType,
IdentifierRules rules)
Override the rules of ONE object category — catalog/project, schema, table, column,
function … — independently of every other category (design §5.1).
|
IdentifierProfile.Builder |
withoutObjectRules(ESQLDataObjectType objectType)
Drop a category override set earlier, so the category inherits its group / vendor rule
again.
|
IdentifierProfile.Builder |
withoutRules(IdentifierProfile.ObjectGroup group)
Drop a group override set earlier, so the group falls back to the vendor-seeded rule.
|
IdentifierProfile.Builder |
withRoutineRules(IdentifierRules rules)
Convenience: override ROUTINE_GROUP rules.
|
IdentifierProfile.Builder |
withRules(IdentifierProfile.ObjectGroup group,
IdentifierRules rules)
Override the rules for a specific object group.
|
public IdentifierProfile.Builder withFlags(IdentifierProfile.VendorFlags flags)
flags - new vendor flagspublic IdentifierProfile.Builder withRules(IdentifierProfile.ObjectGroup group, IdentifierRules rules)
group - the object group to overriderules - the custom rulespublic IdentifierProfile.Builder withNameRules(IdentifierRules rules)
rules - the custom rules for namespublic IdentifierProfile.Builder withColumnRules(IdentifierRules rules)
rules - the custom rules for columnspublic IdentifierProfile.Builder withRoutineRules(IdentifierRules rules)
rules - the custom rules for routinespublic IdentifierProfile.Builder withObjectRules(ESQLDataObjectType objectType, IdentifierRules rules)
This is the finest granularity and wins over a group override and over the vendor default. It is deliberately a new
name rather than an overload of withRules: withRules(null, rules) would
become ambiguous, and an object CATEGORY is not an object group.
The argument is a category, never the name of a particular dataset, table or column — a profile expresses "how table names compare here", not "this table compares like that".
Repeating a category keeps the LAST value. To go back to inheriting, call
withoutObjectRules(ESQLDataObjectType); null rules are rejected rather
than treated as some implicit rule.
Note what a category override does and does not claim: it is the analysis assumption the CALLER supplies. It is not read from a live server, and an arbitrary override is not automatically a vendor's native semantics.
objectType - the object category to configurerules - the complete rule cell (unquoted fold/compare, quoted fold/compare)public IdentifierProfile.Builder withoutObjectRules(ESQLDataObjectType objectType)
objectType - the object category to stop overridingpublic IdentifierProfile.Builder withoutRules(IdentifierProfile.ObjectGroup group)
group - the object group to stop overridingpublic IdentifierProfile build()