Changeset 3561


Ignore:
Timestamp:
Jul 16, 2007, 12:04:35 PM (14 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #672: Enable AnnotationRestriction? to be used on joined tables

Location:
trunk/src/core/net/sf/basedb/core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/AnnotationBetweenRestriction.java

    r2304 r3561  
    4545    Create a new annotation restriction.
    4646   
     47    @deprecated Use {@link #AnnotationBetweenRestriction(String, AnnotationType, Object, Object, boolean)}
     48      instead with alias=null
     49  */
     50  public AnnotationBetweenRestriction(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
     51    throws InvalidDataException
     52  {
     53    this(null, annotationType, lowValue, highValue, includeInheriting);
     54  }
     55 
     56  /**
     57    Create a new annotation restriction.
     58   
     59    @param alias The alias of a joined item where the annotations are
     60      located or null to use the root entity of the query
    4761    @param annotationType The annotation type to use in the query
    4862    @param lowValue The low value to use in the query, it must be of the
     
    5670    @throws InvalidDataException If any of the parameters are null
    5771      or not follow the rules above.
     72    @since 2.4
    5873  */
    59   public AnnotationBetweenRestriction(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
     74  public AnnotationBetweenRestriction(String alias, AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
    6075    throws InvalidDataException
    6176  {
    62     super(annotationType, includeInheriting);
     77    super(alias, annotationType, includeInheriting);
    6378    if (lowValue == null) throw new InvalidUseOfNullException("lowValue");
    6479    if (highValue == null) throw new InvalidUseOfNullException("highValue");
     
    7691    this.highValue = highValue;
    7792  }
     93
    7894
    7995  /*
  • trunk/src/core/net/sf/basedb/core/AnnotationInRestriction.java

    r2304 r3561  
    4646    Create a new annotation restriction.
    4747   
     48    @deprecated Use {@link #AnnotationInRestriction(String, AnnotationType, boolean, Object[])}
     49      instead with alias=null
     50  */
     51  public AnnotationInRestriction(AnnotationType annotationType, boolean includeInheriting, Object... values)
     52    throws InvalidDataException
     53  {
     54    this(null, annotationType, includeInheriting, values);
     55  }
     56
     57  /**
     58    Create a new annotation restriction.
     59   
    4860    @param annotationType The annotation type to use in the query
    4961    @param includeInheriting If items inherting the annotation should be returned
     
    5466    @throws InvalidDataException If any of the parameters are null
    5567      or the array is empty or not follow the rules above.
     68    @since 2.4
    5669  */
    57   public AnnotationInRestriction(AnnotationType annotationType, boolean includeInheriting, Object... values)
     70  public AnnotationInRestriction(String alias, AnnotationType annotationType, boolean includeInheriting, Object... values)
    5871    throws InvalidDataException
    5972  {
    60     super(annotationType, includeInheriting);
     73    super(alias, annotationType, includeInheriting);
    6174    if (values == null || values.length == 0) throw new InvalidUseOfNullException("values");
    6275    for (int i = 0; i < values.length; ++i)
     
    7184    this.values = Arrays.asList(values);
    7285  }
    73 
    7486  /*
    7587    From the AnnotationRestriction class
  • trunk/src/core/net/sf/basedb/core/AnnotationRestriction.java

    r2667 r3561  
    6161  final int annotationTypeId;
    6262  final boolean includeInheriting;
     63  final String alias;
    6364
    6465  /**
     
    6667    @param annotationType The annotation type to use in the query
    6768  */
    68   AnnotationRestriction(AnnotationType annotationType, boolean includeInheriting)
     69  AnnotationRestriction(String alias, AnnotationType annotationType, boolean includeInheriting)
    6970    throws InvalidDataException
    7071  {
     
    7374    this.valueType = annotationType.getValueType();
    7475    this.includeInheriting = includeInheriting;
     76    this.alias = alias;
    7577  }
    7678
     
    8486    @param valueType The type of values for annotations
    8587  */
    86   AnnotationRestriction(int annotationTypeId, Type valueType, boolean includeInheriting)
     88  AnnotationRestriction(String alias, int annotationTypeId, Type valueType, boolean includeInheriting)
    8789    throws InvalidDataException
    8890  {
     
    9193    this.valueType = valueType;
    9294    this.includeInheriting = includeInheriting;
     95    this.alias = alias;
    9396  }
    9497
     
    207210      annotationSetIds = annotationSets.toString();
    208211    }
    209     String hql = query.getRootAlias()+".annotationSet IN ("+annotationSetIds+")";
     212    String hql = (alias == null ? query.getRootAlias() : alias) +
     213      ".annotationSet IN ("+annotationSetIds+")";
    210214    return hql;
    211215  }
  • trunk/src/core/net/sf/basedb/core/AnnotationSimpleRestriction.java

    r2610 r3561  
    4545  /**
    4646    Create a new annotation restriction using a simple expression:
    47     <code>annotation operator value</code>.
     47    <code>annotation operator value</code>. The restriction is applied to
     48    the root element of the query.
    4849   
     50    @deprecated Use {@link #AnnotationSimpleRestriction(String, AnnotationType, Operator, Object, boolean)}
     51      instead with alias=null
     52  */
     53  public AnnotationSimpleRestriction(AnnotationType annotationType, Operator operator, Object value, boolean includeInheriting)
     54    throws InvalidDataException
     55  {
     56    this(null, annotationType, operator, value, includeInheriting);
     57  }
     58
     59  /**
     60    Create a new annotation restriction using a simple expression:
     61    <code>annotation operator value</code>.
     62   
     63    @param alias The alias of a joined item where the annotations are
     64      located or null to use the root entity of the query
    4965    @param annotationType The annotation type to use in the query
    5066    @param operator The operator, it must be one of the expression
     
    5773    @throws InvalidDataException If any of the parameters are null
    5874      or not follow the rules above.
     75    @since 2.4
    5976  */
    60   public AnnotationSimpleRestriction(AnnotationType annotationType, Operator operator, Object value, boolean includeInheriting)
     77  public AnnotationSimpleRestriction(String alias, AnnotationType annotationType, Operator operator, Object value, boolean includeInheriting)
    6178    throws InvalidDataException
    6279  {
    63     super(annotationType, includeInheriting);
     80    super(alias, annotationType, includeInheriting);
    6481    if (operator == null) throw new InvalidUseOfNullException("operator");
    6582    if (value == null) throw new InvalidUseOfNullException("value");
     
    7794  }
    7895
     96 
    7997  /**
    80     Creates a new annotation restriction for a specific <code>valueType     
     98    Creates a new annotation restriction for a specific <code>valueType</code>.
     99    The restriction is applied to the root element of the query.
     100   
     101    @deprecated Use {@link #AnnotationSimpleRestriction(String, int, Type, Operator, Object, boolean)}
     102      instead with alias=null
     103  */
     104  public AnnotationSimpleRestriction(int annotationTypeId, Type valueType, Operator operator, Object value, boolean includeInheriting)
     105    throws InvalidDataException
     106  {
     107    this(null, annotationTypeId, valueType, operator, value, includeInheriting);
     108  }
     109 
     110  /**
     111    Creates a new annotation restriction for a specific <code>valueType</code>.
     112   
     113    @param alias The alias of a joined item where the annotations are
     114      located or null to use the root entity of the query
    81115      @param annotationTypeId the id of the annotation type to use in the query
    82116    @param valueType the type of values for annotations
     
    89123      @throws InvalidDataException If any of the parameters are null
    90124      or not follow the rules above
     125    @since 2.4
    91126  */
    92   public AnnotationSimpleRestriction(int annotationTypeId, Type valueType, Operator operator, Object value, boolean includeInheriting)
     127  public AnnotationSimpleRestriction(String alias, int annotationTypeId, Type valueType, Operator operator, Object value, boolean includeInheriting)
    93128    throws InvalidDataException
    94129  {
    95     super(annotationTypeId, valueType, includeInheriting);
     130    super(alias, annotationTypeId, valueType, includeInheriting);
    96131    if (operator == null) throw new InvalidUseOfNullException("operator");
    97132    if (value == null) throw new InvalidUseOfNullException("value");
  • trunk/src/core/net/sf/basedb/core/PropertyFilter.java

    r3453 r3561  
    183183    Create a restriction from the filter. There are a few special cases:
    184184    <p>
     185    If the property starts with a $ it is interpreted as a <code>alias.property</code>
     186    value, ignoring the root alias of the query. The alias is removed from the
     187    property before proceeding.
     188    <p>
    185189    If the property starts with a # it is a filter on annotations. The rest of
    186190    the property is the ID of the annotation type, and we use a
    187191    {@link AnnotationSimpleRestriction} object for the restriction.
    188     <p>
    189     If the property starts with a $ it is interpreted as a <code>alias.property</code>
    190     value, ignoring the root alias of the query.
    191192    <p>
    192193    If the property starts with a @ the property is a collection of values and
     
    201202    Restriction restriction = null;
    202203    String property = getProperty();
     204    String alias = null;
     205   
     206    if (property != null && property.startsWith("$"))
     207    {
     208      // Property is alias.property or alias only
     209      int dotIndex = property.indexOf(".");
     210      if (dotIndex == -1)
     211      {
     212        // Alias only
     213        alias = property.substring(1);
     214        property = null;
     215      }
     216      else if (property != null)
     217      {
     218        // Alias.property
     219        alias = property.substring(1, dotIndex);
     220        property = property.substring(dotIndex+1);
     221      }
     222    }
    203223   
    204224    if (property != null && property.startsWith("#"))
     
    206226      // Property is id of annotation type: #id
    207227      int annotationTypeId = (Integer)Type.INT.parseString(property.substring(1));
    208       restriction = new AnnotationSimpleRestriction(annotationTypeId, getValueType(),
     228      restriction = new AnnotationSimpleRestriction(alias, annotationTypeId, getValueType(),
    209229        getOperator(), getValueAsObject(), false);
    210230    }
     
    214234      Expression parameter = getValue() == null ? null :
    215235        Expressions.parameter(parameterName, getValueAsObject(), getValueType());
    216       String alias = null;
    217       if (property != null && property.startsWith("$"))
    218       {
    219         // Property is alias.property or alias only
    220         int dotIndex = property.indexOf(".");
    221         if (dotIndex == -1)
    222         {
    223           // Alias only
    224           alias = property.substring(1);
    225           property = null;
    226         }
    227         else if (property != null)
    228         {
    229           // Alias.property
    230           alias = property.substring(1, dotIndex);
    231           property = property.substring(dotIndex+1);
    232         }
    233       }
     236
    234237      if (property != null && property.startsWith("@"))
    235238      {
  • trunk/src/core/net/sf/basedb/core/query/Annotations.java

    r2304 r3561  
    4242  /**
    4343    Create a restriction that searches for annotations
    44     equal to a given value.
    45     @param annotationType The annotation type to search
    46     @param value The value to search for
    47     @param includeInheriting If items inherting the annotation should be returned
    48       by the query or not
     44    equal to a given value on the root entity of a query.
     45    @param annotationType The annotation type to search
     46    @param value The value to search for
     47    @param includeInheriting If items inherting the annotation should be returned
     48      by the query or not
     49    @deprecated Use {@link #eq(String, AnnotationType, Object, boolean)} instead with alias=null
    4950  */
    5051  public static Restriction eq(AnnotationType annotationType, Object value, boolean includeInheriting)
    5152    throws InvalidDataException
    5253  {
    53     return new AnnotationSimpleRestriction(annotationType, Operator.EQ, value, includeInheriting);
    54   }
    55 
    56   /**
    57     Create a restriction that searches for annotations
    58     not equal to a given value.
    59     @param annotationType The annotation type to search
    60     @param value The value to search for
    61     @param includeInheriting If items inherting the annotation should be returned
    62       by the query or not
     54    return eq(null, annotationType, value, includeInheriting);
     55  }
     56
     57  /**
     58    Create a restriction that searches for annotations
     59    equal to a given value on the root or a joined entity of a
     60    query.
     61   
     62    @param alias The alias of the joined entity or null to use the root element
     63    @param annotationType The annotation type to search
     64    @param value The value to search for
     65    @param includeInheriting If items inherting the annotation should be returned
     66      by the query or not
     67    @since 2.4
     68  */
     69  public static Restriction eq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     70    throws InvalidDataException
     71  {
     72    return new AnnotationSimpleRestriction(null, annotationType, Operator.EQ, value, includeInheriting);
     73  }
     74 
     75  /**
     76    Create a restriction that searches for annotations
     77    not equal to a given value on the root entity of a query.
     78    @param annotationType The annotation type to search
     79    @param value The value to search for
     80    @param includeInheriting If items inherting the annotation should be returned
     81      by the query or not
     82    @deprecated Use {@link #neq(String, AnnotationType, Object, boolean)} instead with alias=null
    6383  */
    6484  public static Restriction neq(AnnotationType annotationType, Object value, boolean includeInheriting)
    6585    throws InvalidDataException
    6686  {
    67     return new AnnotationSimpleRestriction(annotationType, Operator.NEQ, value, includeInheriting);
    68   }
    69 
    70   /**
    71     Create a restriction that searches for annotations
    72     less than a given value.
    73     @param annotationType The annotation type to search
    74     @param value The value to search for
    75     @param includeInheriting If items inherting the annotation should be returned
    76       by the query or not
     87    return neq(null, annotationType, value, includeInheriting);
     88  }
     89 
     90  /**
     91    Create a restriction that searches for annotations
     92    not equal to a given value on the root or a joined entity of a
     93    query.
     94 
     95    @param alias The alias of the joined entity or null to use the root element
     96    @param annotationType The annotation type to search
     97    @param value The value to search for
     98    @param includeInheriting If items inherting the annotation should be returned
     99      by the query or not
     100    @since 2.4
     101  */
     102  public static Restriction neq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     103    throws InvalidDataException
     104  {
     105    return new AnnotationSimpleRestriction(alias, annotationType, Operator.NEQ, value, includeInheriting);
     106  }
     107
     108  /**
     109    Create a restriction that searches for annotations
     110    less than a given value on the root entity of a query.
     111    @param annotationType The annotation type to search
     112    @param value The value to search for
     113    @param includeInheriting If items inherting the annotation should be returned
     114      by the query or not
     115    @deprecated Use {@link #lt(String, AnnotationType, Object, boolean)} instead with alias=null
    77116  */
    78117  public static Restriction lt(AnnotationType annotationType, Object value, boolean includeInheriting)
    79118    throws InvalidDataException
    80119  {
    81     return new AnnotationSimpleRestriction(annotationType, Operator.LT, value, includeInheriting);
    82   }
    83 
    84   /**
    85     Create a restriction that searches for annotations
    86     less than or equal to a given value.
    87     @param annotationType The annotation type to search
    88     @param value The value to search for
    89     @param includeInheriting If items inherting the annotation should be returned
    90       by the query or not
     120    return lt(null, annotationType, value, includeInheriting);
     121  }
     122
     123  /**
     124    Create a restriction that searches for annotations
     125    less than a given value on the root or a joined entity of a
     126    query.
     127 
     128    @param alias The alias of the joined entity or null to use the root element
     129    @param annotationType The annotation type to search
     130    @param value The value to search for
     131    @param includeInheriting If items inherting the annotation should be returned
     132      by the query or not
     133    @since 2.4
     134  */
     135  public static Restriction lt(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     136    throws InvalidDataException
     137  {
     138    return new AnnotationSimpleRestriction(alias, annotationType, Operator.LT, value, includeInheriting);
     139  }
     140
     141  /**
     142    Create a restriction that searches for annotations
     143    less than or equal to a given value on the root entity of a query.
     144    @param annotationType The annotation type to search
     145    @param value The value to search for
     146    @param includeInheriting If items inherting the annotation should be returned
     147      by the query or not
     148    @deprecated Use {@link #lteq(String, AnnotationType, Object, boolean)} instead with alias=null
    91149  */
    92150  public static Restriction lteq(AnnotationType annotationType, Object value, boolean includeInheriting)
    93151    throws InvalidDataException
    94152  {
    95     return new AnnotationSimpleRestriction(annotationType, Operator.LTEQ, value, includeInheriting);
    96   }
    97 
    98   /**
    99     Create a restriction that searches for annotations
    100     greater than a given value.
    101     @param annotationType The annotation type to search
    102     @param value The value to search for
    103     @param includeInheriting If items inherting the annotation should be returned
    104       by the query or not
     153    return lteq(null, annotationType, value, includeInheriting);
     154  }
     155
     156  /**
     157    Create a restriction that searches for annotations
     158    less than or equal to a given value on the root or a joined entity of a
     159    query.
     160 
     161    @param alias The alias of the joined entity or null to use the root element
     162    @param annotationType The annotation type to search
     163    @param value The value to search for
     164    @param includeInheriting If items inherting the annotation should be returned
     165      by the query or not
     166    @since 2.4
     167  */
     168  public static Restriction lteq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     169    throws InvalidDataException
     170  {
     171    return new AnnotationSimpleRestriction(alias, annotationType, Operator.LTEQ, value, includeInheriting);
     172  }
     173
     174  /**
     175    Create a restriction that searches for annotations
     176    greater than a given value on the root entity of a query.
     177    @param annotationType The annotation type to search
     178    @param value The value to search for
     179    @param includeInheriting If items inherting the annotation should be returned
     180      by the query or not
     181    @deprecated Use {@link #gt(String, AnnotationType, Object, boolean)} instead with alias=null
    105182  */
    106183  public static Restriction gt(AnnotationType annotationType, Object value, boolean includeInheriting)
    107184    throws InvalidDataException
    108185  {
    109     return new AnnotationSimpleRestriction(annotationType, Operator.GTEQ, value, includeInheriting);
    110   }
    111 
    112   /**
    113     Create a restriction that searches for annotations
    114     greater than or equal to a given value.
    115     @param annotationType The annotation type to search
    116     @param value The value to search for
    117     @param includeInheriting If items inherting the annotation should be returned
    118       by the query or not
     186    return gt(null, annotationType, value, includeInheriting);
     187  }
     188
     189  /**
     190    Create a restriction that searches for annotations
     191    greater than a given value on the root or a joined entity of a
     192    query.
     193 
     194    @param alias The alias of the joined entity or null to use the root element
     195    @param annotationType The annotation type to search
     196    @param value The value to search for
     197    @param includeInheriting If items inherting the annotation should be returned
     198      by the query or not
     199    @since 2.4
     200  */
     201  public static Restriction gt(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     202    throws InvalidDataException
     203  {
     204    return new AnnotationSimpleRestriction(alias, annotationType, Operator.GTEQ, value, includeInheriting);
     205  }
     206 
     207 
     208  /**
     209    Create a restriction that searches for annotations
     210    greater than or equal to a given value on the root entity of a query.
     211    @param annotationType The annotation type to search
     212    @param value The value to search for
     213    @param includeInheriting If items inherting the annotation should be returned
     214      by the query or not
     215    @deprecated Use {@link #gteq(String, AnnotationType, Object, boolean)} instead with alias=null
    119216  */
    120217  public static Restriction gteq(AnnotationType annotationType, Object value, boolean includeInheriting)
    121218    throws InvalidDataException
    122219  {
    123     return new AnnotationSimpleRestriction(annotationType, Operator.GTEQ, value, includeInheriting);
    124   }
    125 
    126   /**
    127     Create a restriction that searches for annotations
    128     matching a given value.
    129     @param annotationType The annotation type to search
    130     @param value The value to search for
    131     @param includeInheriting If items inherting the annotation should be returned
    132       by the query or not
     220    return gteq(null, annotationType, value, includeInheriting);
     221  }
     222
     223  /**
     224    Create a restriction that searches for annotations
     225    greater than or equal to a given value on the root or a joined entity of a
     226    query.
     227 
     228    @param alias The alias of the joined entity or null to use the root element
     229    @param annotationType The annotation type to search
     230    @param value The value to search for
     231    @param includeInheriting If items inherting the annotation should be returned
     232      by the query or not
     233    @since 2.4
     234  */
     235  public static Restriction gteq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     236    throws InvalidDataException
     237  {
     238    return new AnnotationSimpleRestriction(alias, annotationType, Operator.GTEQ, value, includeInheriting);
     239  }
     240
     241  /**
     242    Create a restriction that searches for annotations
     243    matching a given value on the root entity of a query.
     244    @param annotationType The annotation type to search
     245    @param value The value to search for
     246    @param includeInheriting If items inherting the annotation should be returned
     247      by the query or not
     248    @deprecated Use {@link #like(String, AnnotationType, Object, boolean)} instead with alias=null
    133249  */
    134250  public static Restriction like(AnnotationType annotationType, Object value, boolean includeInheriting)
    135251    throws InvalidDataException
    136252  {
    137     return new AnnotationSimpleRestriction(annotationType, Operator.LIKE, value, includeInheriting);
    138   }
    139  
    140   /**
    141     Create a restriction that searches for annotations
    142     between two given values. If the end values are included or excluded
     253    return like(null, annotationType, value, includeInheriting);
     254  }
     255
     256  /**
     257    Create a restriction that searches for annotations
     258    matching a given value on the root or a joined entity of a
     259    query.
     260   
     261    @param alias The alias of the joined entity or null to use the root element
     262    @param annotationType The annotation type to search
     263    @param value The value to search for
     264    @param includeInheriting If items inherting the annotation should be returned
     265      by the query or not
     266    @since 2.4
     267  */
     268  public static Restriction like(String alias, AnnotationType annotationType, Object value, boolean includeInheriting)
     269    throws InvalidDataException
     270  {
     271    return new AnnotationSimpleRestriction(alias, annotationType, Operator.LIKE, value, includeInheriting);
     272  }
     273
     274 
     275  /**
     276    Create a restriction that searches for annotations
     277    between two given values on the root entity of a query.
     278    If the end values are included or excluded
    143279    depends on the database.
     280   
    144281    @param annotationType The annotation type to search
    145282    @param lowValue The lower bound
     
    147284    @param includeInheriting If items inherting the annotation should be returned
    148285      by the query or not
     286    @deprecated Use {@link #between(String, AnnotationType, Object, Object, boolean)}
     287      instead with alias=null
    149288  */
    150289  public static Restriction between(AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
    151290    throws InvalidDataException
    152291  {
    153     return new AnnotationBetweenRestriction(annotationType, lowValue, highValue, includeInheriting);
    154   }
    155 
    156   /**
    157     Create a restriction that searches for annotations
     292    return between(null, annotationType, lowValue, highValue, includeInheriting);
     293  }
     294
     295  /**
     296    Create a restriction that searches for annotations
     297    between two given values on the root or a joined entity of a
     298    query. If the end values are included or excluded
     299    depends on the database.
     300   
     301    @param alias The alias of the joined entity or null to use the root element
     302    @param annotationType The annotation type to search
     303    @param lowValue The lower bound
     304    @param highValue The higher bound
     305    @param includeInheriting If items inherting the annotation should be returned
     306      by the query or not
     307    @since 2.4
     308  */
     309  public static Restriction between(String alias, AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting)
     310    throws InvalidDataException
     311  {
     312    return new AnnotationBetweenRestriction(alias, annotationType, lowValue, highValue, includeInheriting);
     313  }
     314 
     315  /**
     316    Create a restriction that searches for annotations on the root entity of a query
    158317    equal to any value in a list of given values.
    159318    @param annotationType The annotation type to search
     
    161320      by the query or not
    162321    @param values An array of values
     322    @deprecated Use {@link #in(String, AnnotationType, boolean, Object[])}
     323      instead with alias=null
    163324  */
    164325  public static Restriction in(AnnotationType annotationType, boolean includeInheriting, Object... values)
    165326    throws InvalidDataException
    166327  {
    167     return new AnnotationInRestriction(annotationType, includeInheriting, values);
    168   }
    169 
     328    return in(null, annotationType, includeInheriting, values);
     329  }
     330
     331  /**
     332    Create a restriction that searches for annotations
     333    on the root or a joined entity
     334    equal to any value in a list of given values.
     335   
     336    @param alias The alias of the joined entity or null to use the root element
     337    @param annotationType The annotation type to search
     338    @param includeInheriting If items inherting the annotation should be returned
     339      by the query or not
     340    @param values An array of values
     341    @since 2.4
     342  */
     343  public static Restriction in(String alias, AnnotationType annotationType, boolean includeInheriting, Object... values)
     344    throws InvalidDataException
     345  {
     346    return new AnnotationInRestriction(alias, annotationType, includeInheriting, values);
     347  }
    170348
    171349}
Note: See TracChangeset for help on using the changeset viewer.