Class AQueryBuilderImpl
- All Implemented Interfaces:
AQueryBuilder,EntityPaths
-
Field Summary
Fields inherited from interface org.opencastproject.assetmanager.impl.persistence.EntityPaths
$NO_ENTITY, $Q_PROPERTY, $Q_SNAPSHOT, Q_ASSET, Q_PROPERTY, Q_SNAPSHOT -
Constructor Summary
Constructors -
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) Create a predicate to match a snapshot's organization ID.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.
-
Constructor Details
-
AQueryBuilderImpl
-
-
Method Details
-
select
Description copied from interface:AQueryBuilderDetermine 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 (
AQueryBuilder.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.
- Specified by:
selectin interfaceAQueryBuilder- See Also:
-
delete
Description copied from interface:AQueryBuilderCreate 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.
- Specified by:
deletein interfaceAQueryBuilder- Parameters:
owner- the name of the owner or the empty string
-
mediaPackageIds
- Specified by:
mediaPackageIdsin interfaceAQueryBuilder
-
mediaPackageId
Description copied from interface:AQueryBuilderCreate a predicate to match an snapshot's media package ID.- Specified by:
mediaPackageIdin interfaceAQueryBuilder
-
mediapackageId
Description copied from interface:AQueryBuilderGet the snapshot's "mediaPackageId" field. Use it to create a predicate.- Specified by:
mediapackageIdin interfaceAQueryBuilder
-
seriesId
Description copied from interface:AQueryBuilderGet the snapshot's "seriesId" field. Use it to create a predicate.- Specified by:
seriesIdin interfaceAQueryBuilder
-
organizationId
Description copied from interface:AQueryBuilderCreate a predicate to match a snapshot's organization ID.- Specified by:
organizationIdin interfaceAQueryBuilder
-
organizationId
Description copied from interface:AQueryBuilderGet the snapshot's "organizationId" field. Use it to create a predicate.- Specified by:
organizationIdin interfaceAQueryBuilder
-
owner
Description copied from interface:AQueryBuilderGet the snapshot's "owner" field. Use it to create a predicate.- Specified by:
ownerin interfaceAQueryBuilder
-
availability
- Specified by:
availabilityin interfaceAQueryBuilder
-
storage
- Specified by:
storagein interfaceAQueryBuilder
-
hasPropertiesOf
Description copied from interface:AQueryBuilderCreate a predicate that matches all snapshots with properties of the given namespace.- Specified by:
hasPropertiesOfin interfaceAQueryBuilder
-
hasProperties
Description copied from interface:AQueryBuilderCreate a predicate that matches all snapshots with properties.- Specified by:
hasPropertiesin interfaceAQueryBuilder
-
archived
Description copied from interface:AQueryBuilderGet the snapshot's "archived" field. Use it to create a predicate.- Specified by:
archivedin interfaceAQueryBuilder
-
version
Description copied from interface:AQueryBuilderGet the snapshot's "version" field. Use it to create a predicate.- Specified by:
versionin interfaceAQueryBuilder
-
property
Description copied from interface:AQueryBuilderCreate a field to query properties. Each parameter may be wild carded with the empty string.- Specified by:
propertyin interfaceAQueryBuilder- Parameters:
namespace- the namespace or "" to select all namespacesname- the property name or "" to select all property names
-
property
- Specified by:
propertyin interfaceAQueryBuilder
-
snapshot
Description copied from interface:AQueryBuilderSelect or delete a snapshot.- Specified by:
snapshotin interfaceAQueryBuilder
-
propertiesOf
Description copied from interface:AQueryBuilderSelect or delete all properties that belong to the given namespaces. Use an empty list of arguments to handle all properties of the media package.- Specified by:
propertiesOfin interfaceAQueryBuilder
-
properties
Description copied from interface:AQueryBuilderSelect or delete all given properties. Use an empty list of arguments to handle all properties of the media package.- Specified by:
propertiesin interfaceAQueryBuilder
-
nothing
Description copied from interface:AQueryBuilderThe zero element ofTarget. Selecting nothing just selects nothing.- Specified by:
nothingin interfaceAQueryBuilder
-
always
Description copied from interface:AQueryBuilderThe zero element ofPredicate. An empty predicate does nothing.- Specified by:
alwaysin interfaceAQueryBuilder
-