public final class ApproximateIdentifierKey extends Object
Where IdentifierService.persistentKeyV1(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm) throws — collation-based
cells (SQL Server CI collations compare via collator weights that cannot be
reproduced portably) and mixed-kind custom profiles —
IdentifierService.approximateKeyV1(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm) still serves: quote-strip plus
pinned simple case-fold collapse
(GspCaseData.simpleFoldCollapse(java.lang.String)).
No biconditional. Approximate key equality neither implies nor is
implied by IdentifierService.areEqual(java.lang.String, java.lang.String, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType): a CI collation may equate
strings the collapse distinguishes (accent-insensitive collations) and may
distinguish strings the collapse equates. Use these keys for grouping,
bucketing and diagnostics — never as proof of identity.
Distinct type by design. This is deliberately NOT a
PersistentIdentifierKey and lives in its own policy namespace
(ak1-…): the two types can never compare equal, so an approximate
key can never be stored where an exact key is expected.
The public constructor rehydrates a persisted key; minting goes through
IdentifierService.approximateKeyV1(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm).
| Constructor and Description |
|---|
ApproximateIdentifierKey(String policyId,
IdentifierProfile.ObjectGroup group,
String payload)
Rehydrate a key from its persisted fields.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
IdentifierProfile.ObjectGroup |
getGroup()
Object group — part of key identity, like the exact key's.
|
String |
getPayload()
Collapsed payload text.
|
String |
getPolicyId()
Policy identity:
"ak1-" + base64url(SHA-256(canonicalDescriptor)). |
int |
hashCode() |
String |
toString() |
public ApproximateIdentifierKey(String policyId, IdentifierProfile.ObjectGroup group, String payload)
policyId - policy identity (ak1-…) the payload was minted undergroup - object group the key belongs topayload - collapsed payload textpublic String getPolicyId()
"ak1-" + base64url(SHA-256(canonicalDescriptor)).public IdentifierProfile.ObjectGroup getGroup()
public String getPayload()