Interface AQueryBuilder
- All Known Implementing Classes:
AQueryBuilderDecorator,AQueryBuilderImpl
AssetManager.
Implementations are supposed to be immutable so that one builder can be safely used in a concurrent environment.
-
Method Summary
Modifier and TypeMethodDescriptionalways()The zero element ofPredicate.archived()Get the snapshot's "archived" field.availability(Availability availability) Create a new deletion query.Create a predicate that matches all snapshots with properties.hasPropertiesOf(String namespace) Create a predicate that matches all snapshots with properties of the given namespace.Get the snapshot's "mediaPackageId" field.mediaPackageId(String mpId) Create a predicate to match an snapshot's media package ID.mediaPackageIds(String... mpIds) nothing()The zero element ofTarget.Get the snapshot's "organizationId" field.organizationId(String orgId) Deprecated.owner()Get the snapshot's "owner" field.properties(PropertyName... fqn) Select or delete all given properties.propertiesOf(String... namespace) Select or delete all properties that belong to the given namespaces.<A> PropertyField<A> property(Value.ValueType<A> ev, String namespace, String name) Create a field to query properties.<A> PropertyField<A> property(Value.ValueType<A> ev, PropertyName fqn) Determine what should be included in the result records, i.e. what will actually be fetched from the database.seriesId()Get the snapshot's "seriesId" field.snapshot()Select or delete a snapshot.version()Get the snapshot's "version" field.
-
Method Details
-
select
Determine what should be included in the result records, i.e. what will actually be fetched from the database. If no target is given, only the media package ID (ARecord.getMediaPackageId()) is fetched.Use targets to reduce the amount of database IO, e.g. if you're not interested in the attached properties do not select them. Or, on the other hand if you want to work with properties only, do not select the snapshot (
snapshot()).Please note that a result record always represents a snapshot accompanied by the properties of the whole episode. That means that always snapshots are being selected. In case a property target is given, it only means that those properties are added to the result set. Please also note that properties are stored per episode, not per snapshot.
- See Also:
-
delete
Create a new deletion query.The query will only affect snapshots owned by the given owner. If the target is a property the owner parameter will be ignored since properties belong to the whole episode and not to individual snapshots.
- Parameters:
owner- the name of the owner or the empty string
-
mediaPackageIds
-
mediaPackageId
Create a predicate to match an snapshot's media package ID. -
mediapackageId
Get the snapshot's "mediaPackageId" field. Use it to create a predicate. -
seriesId
Get the snapshot's "seriesId" field. Use it to create a predicate. -
organizationId
Deprecated.useorganizationId().eq(orgId) insteadCreate a predicate to match a snapshot's organization ID. -
organizationId
Get the snapshot's "organizationId" field. Use it to create a predicate. -
owner
Get the snapshot's "owner" field. Use it to create a predicate. -
availability
-
storage
-
hasPropertiesOf
Create a predicate that matches all snapshots with properties of the given namespace. -
hasProperties
Predicate hasProperties()Create a predicate that matches all snapshots with properties. -
archived
Get the snapshot's "archived" field. Use it to create a predicate. -
version
VersionField version()Get the snapshot's "version" field. Use it to create a predicate. -
property
Create a field to query properties. Each parameter may be wild carded with the empty string.- Parameters:
namespace- the namespace or "" to select all namespacesname- the property name or "" to select all property names
-
property
-
snapshot
Target snapshot()Select or delete a snapshot. -
propertiesOf
Select or delete all properties that belong to the given namespaces. Use an empty list of arguments to handle all properties of the media package. -
properties
Select or delete all given properties. Use an empty list of arguments to handle all properties of the media package. -
nothing
Target nothing()The zero element ofTarget. Selecting nothing just selects nothing. -
always
Predicate always()The zero element ofPredicate. An empty predicate does nothing.
-
organizationId().eq(orgId) instead