DocumentRepository
classin packageklyn.data.internal
public abstract class DocumentRepository<T, TId> implements Repository<T, TId>:
DocumentRepository
All Implemented Interfaces: Repository

Shared lazy execution core for read-only document repositories.

Concrete JSON and XML providers materialize one atomic source generation; this class applies the canonical memory QIR without provider-specific query semantics. No file handle or parsed document survives a normal execution.

Example
# Concrete providers derive from DocumentRepository<T, TId>.
Methods
Modifier and Type Member Description
public asQuery
asQuery() as Query<T>:
Returns a lazy identity query over this document source.
public count
count() as Long:
Returns the entity count in the selected atomic generation.
public countPlan
countPlan(plan as QueryPlanBase) as Long:
Counts plan results through the canonical QIR evaluator.
public executePlan
executePlan(plan as QueryPlanBase) as Object:
Executes a canonical query plan against one atomic generation.
public existsPlan
existsPlan(plan as QueryPlanBase) as Boolean:
Tests plan existence and stops as soon as the plan permits.
public openStream
openStream(plan as QueryPlanBase) as Object:
Opens a sequential stream over one atomic generation.
public abstract providerName
providerName() as String
Returns the concrete provider identifier.
public providerText
providerText(plan as QueryPlanBase) as String:
Returns a redacted description of document execution.
public validateBeforeRead
validateBeforeRead() as Repository<T, TId>:
Validates all keys and pins the validated immutable source generation.
Inherited Methods
methodInherited Methods from Repository: count, validateBeforeRead
methodInherited Methods from Queryable: asQuery
methodInherited Methods from QuerySource: countPlan, executePlan, existsPlan, openStream, providerName, providerText