Class AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer

java.lang.Object
ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer
Enclosing class:
AbstractFilteringVoEnabledDao<O extends Identifiable, VO extends IdentifiableValueObject<O>>

protected class AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer extends Object
Configurer for filterable properties and their aliases.
Author:
poirigui
  • Constructor Details

    • FilterablePropertiesConfigurer

      protected FilterablePropertiesConfigurer()
  • Method Details

    • registerProperty

      public void registerProperty(String propertyName)
    • registerProperty

      public void registerProperty(String propertyName, boolean useSubquery)
      Register a given property.
      Throws:
      IllegalArgumentException - if the property is already registered
    • registerProperties

      public void registerProperties(String... propertyNames) throws IllegalArgumentException
      Register all the given properties.
      Throws:
      IllegalArgumentException - if any of the given properties is already registered
    • unregisterProperty

      public void unregisterProperty(String propertyName)
      Throws:
      IllegalArgumentException - if no properties match the given name
    • unregisterProperties

      public void unregisterProperties(Predicate<? super String> predicate) throws IllegalArgumentException
      Unregister all the properties matching the given predicate.
      Throws:
      IllegalArgumentException - if no properties match the given predicate
    • deprecateProperty

      public void deprecateProperty(String propertyName)
      Deprecate the given property.

      You should indicate a reason and a possible replacement with describeProperty(String, String).

    • describeProperty

      public void describeProperty(String propertyName, String description)
      Provide a description for a given property.
    • registerEntity

      public void registerEntity(String prefix, Class<? extends Identifiable> entityClass, int maxDepth) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • registerEntity

      public void registerEntity(String prefix, Class<? extends Identifiable> entityClass, int maxDepth, boolean useSubquery) throws IllegalArgumentException
      Register an entity available at a given prefix.

      This method recursively register the properties of a given entity up to the maximum depth.

      Parameters:
      prefix - a prefix under which the entity is made available
      entityClass - a class for the entity, which must be registered mapped by Hibernate
      maxDepth - maximum depth for visiting properties. For example, zero would expose no property but the entity itself, 1 would expose the properties of the alias, 2 would expose the properties of any entity directly related to the given entity, etc.
      useSubquery - whether to use a subquery when filtering by this entity (and its descendant)
      Throws:
      IllegalArgumentException - if no entity of the given type is registered under the given prefix or if the prefix is invalid
    • unregisterEntity

      public void unregisterEntity(String prefix, Class<?> entityClass)
      Unregister an entity at a given prefix previously registered via registerEntity(String, Class, int).

      Note that since registerEntity(String, Class, int) works recursively, you can unregister an entity registered under a longer prefix. For example, if you registered an Analysis under analysis., you can then unregister an ExpressionExperiment under analysis.experimentAnalyzed.

      Throws:
      IllegalArgumentException - if no entity of the given type is registered under the given prefix or if the prefix is invalid
    • registerObjectAlias

      public void registerObjectAlias(String prefix, @Nullable String objectAlias, Class<? extends Identifiable> entityClass, @Nullable String aliasFor, int maxDepth)
      See Also:
    • registerObjectAlias

      public void registerObjectAlias(String prefix, @Nullable String objectAlias, Class<? extends Identifiable> entityClass, @Nullable String aliasFor, int maxDepth, boolean useSubquery)
      Register an alias for a property.

      This also registers a property under the given prefix as per registerEntity(String, Class, int).

      Parameters:
      objectAlias - internal alias used to refer to the entity as per Filter.getObjectAlias().
      See Also: