Class PropertySchema

java.lang.Object
org.opencastproject.assetmanager.api.query.PropertySchema

public abstract class PropertySchema extends Object
The schema class helps to build type safe and easy to use property schemas. It makes code using properties more readable and reliable.
  • Field Details

  • Constructor Details

    • PropertySchema

      public PropertySchema(AQueryBuilder q, String namespace)
      Create a new property schema.
      Parameters:
      q - a query builder
      namespace -
  • Method Details

    • namespace

      public String namespace()
      Get the namespace of the schema.
    • hasPropertiesOfNamespace

      public Predicate hasPropertiesOfNamespace()
      Get a predicate that matches if a property of the schema's namespace exists.
    • allProperties

      public Target allProperties()
      Get a target to select all properties of the schema's namespace.
    • prop

      protected <A> PropertyField<A> prop(Value.ValueType<A> ev, String name)
      Generic property field constructor.
    • stringProp

      protected PropertyField<String> stringProp(String name)
      Create a property field for Strings.
    • longProp

      protected PropertyField<Long> longProp(String name)
      Create a property field for Longs.
    • booleanProp

      protected PropertyField<Boolean> booleanProp(String name)
      Create a property field for Booleans.
    • dateProp

      protected PropertyField<Date> dateProp(String name)
      Create a property field for Dates.
    • versionProp

      protected PropertyField<Version> versionProp(String name)
      Create a property field for Versions.