Interface ObjectFilter

  • public interface ObjectFilter
    A filter that tests if an object matches a pre-defined condition and returns either the original instance or the projection, depending on how the filter was created. The projection is represented as an Object[]. If the given instance does not match the filter will just return null.
    • Method Detail

      • getEntityTypeName

        java.lang.String getEntityTypeName()
        The fully qualified entity type name accepted by this filter.
      • getProjection

        java.lang.String[] getProjection()
        The array of '.' separated path names of the projected fields if any, or null otherwise.
      • getProjectionTypes

        java.lang.Class<?>[] getProjectionTypes()
      • getParameterNames

        java.util.Set<java.lang.String> getParameterNames()
        Returns the parameter names or an empty Set if there are no parameters.
      • getParameters

        java.util.Map<java.lang.String,​java.lang.Object> getParameters()
      • withParameters

        ObjectFilter withParameters​(java.util.Map<java.lang.String,​java.lang.Object> namedParameters)
        Creates a new ObjectFilter based on current one and the given parameters.
      • getSortFields

        SortField[] getSortFields()
        The array of sort specifications if defined, or null otherwise.
      • getComparator

        java.util.Comparator<java.lang.Comparable[]> getComparator()
        The comparator corresponding to the 'order by' clause, if any.
        the Comparator or null if no 'order by' was specified (getSortFields() also returns null)
      • filter

        ObjectFilter.FilterResult filter​(java.lang.Object instance)
        Tests if an object instance matches the filter.
        instance - the instance to test; this is never null
        a FilterResult if there is a match or null otherwise