cadrumo.adapters.persistence.profile.iva_compensation_history module

Encrypted adapter for the IVA compensation-history application port.

Core types: SensitivityClass.

class IvaCompensationHistoryRepository(*, bucket_id=None, objects=None, settings=None)[source]

Bases: SecureBoundRepository[IvaCompensationPeriodState], IvaCompensationHistoryRepositoryProtocol

Bind IVA compensation period states to encrypted profile storage.

Parameters:
namespace: ClassVar[str]
sensitivity: ClassVar[SensitivityClass]
schema_version: ClassVar[int]
payload_type

alias of IvaCompensationPeriodState

extract_identifier(payload)[source]

Return the natural id for payload (used as the SQL object key).

Subclasses MUST override. The base implementation raises NotImplementedError.

Return type:

str

Parameters:

payload (IvaCompensationPeriodState)

property secure_object_repository: CalculationObservationStorageProtocol

Expose the storage capability required for atomic co-commit.

load_period(period)[source]

Load one period and re-confirm its registry coordinate.

Return type:

IvaCompensationPeriodState | None

Parameters:

period (Period)

save_period(state)[source]

Persist one validated period state.

Return type:

None

Parameters:

state (IvaCompensationPeriodState)

list_periods()[source]

Load and sort all persisted period states.

Return type:

tuple[IvaCompensationPeriodState, ...]

to_secure_object_write(payload, *, expected_revision_id=None)[source]

Prepare one encrypted history write without committing it.

Return type:

SecureObjectWrite

Parameters: