Class AbstractSnapshotField<A,B extends Comparable>

java.lang.Object
org.opencastproject.assetmanager.impl.query.AbstractSnapshotField<A,B>
Type Parameters:
A - The business type of the field, e.g. Version
B - The JPA internal type of the field, e.g. Long
All Implemented Interfaces:
Field<A>, EntityPaths
Direct Known Subclasses:
SimpleSnapshotField, VersionFieldImpl

public abstract class AbstractSnapshotField<A,B extends Comparable> extends Object implements Field<A>, EntityPaths
Generic implementation to query SnapshotDto fields.
  • 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
    Constructor
    Description
    AbstractSnapshotField(com.mysema.query.types.expr.ComparableExpressionBase<B> path)
    Create a new snapshot field.
  • Method Summary

    Modifier and Type
    Method
    Description
    asc()
    Create an ascending order specifier for the field.
    Create a descending order specifier for the field.
    eq(A right)
    Create a predicate that holds true if the field's value and constant value right are equal.
    eq(PropertyField<A> right)
    Create a predicate that holds true if the field's value and the value of property field right are equal.
    Create a predicate that holds true if the field exists.
    protected abstract B
    Extract database type B from business type A.
    ge(A right)
    Create a predicate that holds true if the field's value is greater than constant value right or equal to it.
    ge(PropertyField<A> right)
    Create a predicate that holds true if the field's value is greater than the value of property field right or equal to it.
    gt(A right)
    Create a predicate that holds true if the field's value is strictly greater than constant value right.
    gt(PropertyField<A> right)
    Create a predicate that holds true if the field's value is strictly greater than the value of property field right.
    le(A right)
    Create a predicate that holds true if the field's value is less than constant value right or equal to it.
    le(PropertyField<A> right)
    Create a predicate that holds true if the field's value is less than the value of property field right or equal to it.
    lt(A right)
    Create a predicate that holds true if the field's value is strictly less than constant value right.
    lt(PropertyField<A> right)
    Create a predicate that holds true if the field's value is strictly less than the value of property field right.
    protected static Predicate
    mkPredicate(com.mysema.query.types.expr.BooleanExpression where)
     
    Create a predicate that holds true if the field does not exist.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractSnapshotField

      public AbstractSnapshotField(com.mysema.query.types.expr.ComparableExpressionBase<B> path)
      Create a new snapshot field.
      Parameters:
      path - a path to a snapshot field
  • Method Details

    • extract

      protected abstract B extract(A a)
      Extract database type B from business type A.
    • eq

      public Predicate eq(A right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value and constant value right are equal.
      Specified by:
      eq in interface Field<A>
    • eq

      public Predicate eq(PropertyField<A> right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value and the value of property field right are equal.
      Specified by:
      eq in interface Field<A>
    • lt

      public Predicate lt(A right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is strictly less than constant value right.
      Specified by:
      lt in interface Field<A>
    • lt

      public Predicate lt(PropertyField<A> right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is strictly less than the value of property field right.
      Specified by:
      lt in interface Field<A>
    • le

      public Predicate le(A right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is less than constant value right or equal to it.
      Specified by:
      le in interface Field<A>
    • le

      public Predicate le(PropertyField<A> right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is less than the value of property field right or equal to it.
      Specified by:
      le in interface Field<A>
    • gt

      public Predicate gt(A right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is strictly greater than constant value right.
      Specified by:
      gt in interface Field<A>
    • gt

      public Predicate gt(PropertyField<A> right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is strictly greater than the value of property field right.
      Specified by:
      gt in interface Field<A>
    • ge

      public Predicate ge(A right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is greater than constant value right or equal to it.
      Specified by:
      ge in interface Field<A>
    • ge

      public Predicate ge(PropertyField<A> right)
      Description copied from interface: Field
      Create a predicate that holds true if the field's value is greater than the value of property field right or equal to it.
      Specified by:
      ge in interface Field<A>
    • exists

      public Predicate exists()
      Description copied from interface: Field
      Create a predicate that holds true if the field exists.
      Specified by:
      exists in interface Field<A>
    • notExists

      public Predicate notExists()
      Description copied from interface: Field
      Create a predicate that holds true if the field does not exist.
      Specified by:
      notExists in interface Field<A>
    • desc

      public Order desc()
      Description copied from interface: Field
      Create a descending order specifier for the field.
      Specified by:
      desc in interface Field<A>
    • asc

      public Order asc()
      Description copied from interface: Field
      Create an ascending order specifier for the field.
      Specified by:
      asc in interface Field<A>
    • mkPredicate

      protected static Predicate mkPredicate(com.mysema.query.types.expr.BooleanExpression where)