public final class PersistentIdentifierKey extends Object
Unlike CanonKey (in-process only), this key is stable across
JVMs, JDK versions and library releases as long as the resolved identifier
policy is unchanged: the payload is produced by the pinned fold engine
(GspCaseData, never JVM case
tables) and the policyId is a content hash of every behavior the
payload's equivalence domain depends on. A policyId change MEANS the
equivalence relation may have changed — stored keys with a different
policyId must not be compared payload-wise, they must be re-minted.
Value semantics. equals(java.lang.Object)/hashCode() range over all
three of (policyId, group, payload). The object group is part of
identity because vendors can give different rule cells to different object
kinds (BigQuery: tables case-sensitive, columns not) — the same spelling
under the same vendor is still two different names in two groups.
Biconditional. For two IdentifierInputForm.SQL_LEXICAL
inputs a, b minted by the same profile-bound
IdentifierService and object type:
persistentKeyV1(a).equals(persistentKeyV1(b)) ⟺
areEqual(a, b). IdentifierInputForm.CATALOG_STORED keys
join the same equivalence domain: a stored name keys equal to the lexical
spelling that produced it (in folding cells, via the cell's fold-image).
In cells whose unquoted branch folds while the quoted branch compares
insensitively without folding, the quoted spelling's collapse payload is a
different map than the fold wherever full and simple folding disagree
(final sigma) — that asymmetry is areEqual's own branch semantics,
mirrored here, so stored keys side with the fold-image.
Never interchangeable with ApproximateIdentifierKey.
That type is a different class in a different policy namespace
(ak1-…); the two can never compare equal and approximate keys must
never be stored where exact keys are expected.
The public constructor exists to rehydrate a key persisted elsewhere
(store the three fields, reconstruct on read). Minting new keys goes
through IdentifierService.persistentKeyV1(gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm).
| Constructor and Description |
|---|
PersistentIdentifierKey(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 — group IS identity (owner decision 4).
|
String |
getPayload()
Canonical payload text.
|
String |
getPolicyId()
Policy identity:
"pk1-" + base64url(SHA-256(canonicalDescriptor)). |
int |
hashCode() |
String |
toString() |
public PersistentIdentifierKey(String policyId, IdentifierProfile.ObjectGroup group, String payload)
policyId - policy identity (pk1-…) the payload was minted undergroup - object group the key belongs topayload - canonical payload textpublic String getPolicyId()
"pk1-" + base64url(SHA-256(canonicalDescriptor)).public IdentifierProfile.ObjectGroup getGroup()
public String getPayload()