name
stringlengths 12
178
| code_snippet
stringlengths 8
36.5k
| score
float64 3.26
3.68
|
---|---|---|
querydsl_DateExpression_min_rdh
|
/**
* Get the minimum value of this expression (aggregation)
*
* @return min(this)
*/
@Override
public DateExpression<T> min() {
if (min == null) {
min = Expressions.dateOperation(getType(), AggOps.MIN_AGG, mixin);
}
return min;
}
| 3.26 |
querydsl_DateExpression_max_rdh
|
/**
* Get the maximum value of this expression (aggregation)
*
* @return max(this)
*/
@Override
public DateExpression<T> max() {
if (max == null) {
max = Expressions.dateOperation(getType(),
AggOps.MAX_AGG, mixin);
}
return max;
}
| 3.26 |
querydsl_DateExpression_nullif_rdh
|
/**
* Create a {@code nullif(this, other)} expression
*
* @param other
* @return nullif(this, other)
*/
@Override
public DateExpression<T> nullif(Expression<T> other) {
return Expressions.dateOperation(getType(), Ops.NULLIF,
mixin, other);
}
/**
* Create a {@code nullif(this, other)}
| 3.26 |
querydsl_DateExpression_year_rdh
|
/**
* Create a year expression
*
* @return year
*/
public NumberExpression<Integer> year() {
if (year == null) {
year = Expressions.numberOperation(Integer.class, DateTimeOps.YEAR, mixin);
}return year;
}
| 3.26 |
querydsl_DateExpression_coalesce_rdh
|
/**
* Create a {@code coalesce(this, args...)} expression
*
* @param args
* additional arguments
* @return coalesce
*/
@Override
@SuppressWarnings("unchecked")
public DateExpression<T> coalesce(T... args) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(arg);
}
return coalesce.asDate();
}
| 3.26 |
querydsl_DateExpression_dayOfYear_rdh
|
/**
* Create a day of year expression (range 1-356)
* <p>NOT supported in JDOQL and not in Derby</p>
*
* @return day of year
*/
public NumberExpression<Integer> dayOfYear() {
if (dayOfYear == null) {
dayOfYear = Expressions.numberOperation(Integer.class, DateTimeOps.DAY_OF_YEAR, mixin);
}
return dayOfYear;
}
| 3.26 |
querydsl_DateExpression_dayOfMonth_rdh
|
/**
* Create a day of month expression (range 1-31)
*
* @return day of month
*/
public NumberExpression<Integer> dayOfMonth() {
if (dayOfMonth == null) {
dayOfMonth = Expressions.numberOperation(Integer.class, DateTimeOps.DAY_OF_MONTH, mixin);
}
return dayOfMonth;}
| 3.26 |
querydsl_DateExpression_currentDate_rdh
|
/**
* Create an expression representing the current date as a {@code DateExpression} instance
*
* @param cl
* type of expression
* @return current date
*/
public static <T extends Comparable> DateExpression<T> currentDate(Class<T> cl) {
return Expressions.dateOperation(cl, DateTimeOps.CURRENT_DATE);
}
| 3.26 |
querydsl_DateExpression_month_rdh
|
/**
* Create a month expression (range 1-12 / JAN-DEC)
*
* @return month
*/
public NumberExpression<Integer> month() {
if (month == null) {
month = Expressions.numberOperation(Integer.class, DateTimeOps.MONTH, mixin);
}
return month;
}
| 3.26 |
querydsl_DateExpression_dayOfWeek_rdh
|
/**
* Create a day of week expression (range 1-7 / SUN-SAT)
* <p>NOT supported in JDOQL and not in Derby</p>
*
* @return day of week
*/
public NumberExpression<Integer> dayOfWeek() {
if (dayOfWeek == null) {
dayOfWeek = Expressions.numberOperation(Integer.class, DateTimeOps.DAY_OF_WEEK, mixin);
}
return dayOfWeek;}
| 3.26 |
querydsl_TimeExpression_second_rdh
|
/**
* Create a seconds expression (range 0-59)
*
* @return second
*/
public NumberExpression<Integer> second() {
if (seconds == null) {
seconds = Expressions.numberOperation(Integer.class, DateTimeOps.SECOND, mixin);
}
return
seconds;
}
| 3.26 |
querydsl_TimeExpression_minute_rdh
|
/**
* Create a minutes expression (range 0-59)
*
* @return minute
*/
public NumberExpression<Integer> minute() {
if (minutes == null) {
minutes = Expressions.numberOperation(Integer.class,
DateTimeOps.MINUTE, mixin);
}
return minutes;
}
| 3.26 |
querydsl_TimeExpression_coalesce_rdh
|
/**
* Create a {@code coalesce(this, args...)} expression
*
* @param args
* additional arguments
* @return coalesce
*/
@Override
@SuppressWarnings({ "unchecked" })
public TimeExpression<T> coalesce(T... args) {Coalesce<T> coalesce
= new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(arg);
}
return coalesce.asTime();
}
| 3.26 |
querydsl_TimeExpression_milliSecond_rdh
|
/**
* Create a milliseconds expression (range 0-999)
* <p>Is always 0 in JPA and JDO modules</p>
*
* @return milli second
*/
public NumberExpression<Integer> milliSecond() {
if (milliseconds == null)
{
milliseconds = Expressions.numberOperation(Integer.class, DateTimeOps.MILLISECOND, mixin);
}
return milliseconds;
}
| 3.26 |
querydsl_TimeExpression_currentTime_rdh
|
/**
* Create an expression representing the current time as a TimeExpression instance
*
* @return current time
*/
public static <T
extends Comparable> TimeExpression<T>
currentTime(Class<T> cl) {
return Expressions.timeOperation(cl, DateTimeOps.CURRENT_TIME);
}
| 3.26 |
querydsl_TimeExpression_hour_rdh
|
/**
* Create a hours expression (range 0-23)
*
* @return hour
*/
public NumberExpression<Integer> hour() {
if (hours == null) {
hours = Expressions.numberOperation(Integer.class, DateTimeOps.HOUR, mixin);
}
return hours;
}
| 3.26 |
querydsl_TimeExpression_nullif_rdh
|
/**
* Create a {@code nullif(this, other)} expression
*
* @param other
* @return nullif(this, other)
*/
@Override
public TimeExpression<T> nullif(T other) {
return nullif(ConstantImpl.create(other));}
| 3.26 |
querydsl_AbstractSQLClause_m0_rdh
|
/**
* Add a listener
*
* @param listener
* listener to add
*/
public void m0(SQLListener listener) {
listeners.add(listener);
}
| 3.26 |
querydsl_AbstractSQLClause_startContext_rdh
|
/**
* Called to create and start a new SQL Listener context
*
* @param connection
* the database connection
* @param metadata
* the meta data for that context
* @param entity
* the entity for that context
* @return the newly started context
*/
protected SQLListenerContextImpl startContext(Connection connection, QueryMetadata metadata, RelationalPath<?> entity) {
SQLListenerContextImpl context = new SQLListenerContextImpl(metadata, connection, entity);
listeners.start(context);
return context;
}
| 3.26 |
querydsl_AbstractSQLClause_setParameters_rdh
|
/**
* Set the parameters to the given PreparedStatement
*
* @param stmt
* preparedStatement to be populated
* @param objects
* list of constants
* @param constantPaths
* list of paths related to the constants
* @param params
* map of param to value for param resolving
*/
protected void setParameters(PreparedStatement stmt, List<?> objects, List<Path<?>> constantPaths, Map<ParamExpression<?>, ?> params) {
if
(objects.size() != constantPaths.size()) {
throw new IllegalArgumentException(((("Expected " + objects.size()) + " paths, ") + "but got ") +
constantPaths.size());
}
for (int i
= 0; i < objects.size(); i++) {
Object o =
objects.get(i);
try {
if (o instanceof ParamExpression) {
if (!params.containsKey(o)) {
throw new ParamNotSetException(((ParamExpression<?>) (o)));
}
o = params.get(o);
}
configuration.set(stmt, constantPaths.get(i), i + 1, o);
} catch (SQLException e) {
throw configuration.translate(e);
}
}
}
| 3.26 |
querydsl_AbstractSQLClause_endContext_rdh
|
/**
* Called to end a SQL listener context
*
* @param context
* the listener context to end
*/
protected void endContext(SQLListenerContextImpl context) {
listeners.end(context);
this.context = null;
}
| 3.26 |
querydsl_AbstractSQLClause_onException_rdh
|
/**
* Called to make the call back to listeners when an exception happens
*
* @param context
* the current context in play
* @param e
* the exception
*/
protected void onException(SQLListenerContextImpl context, Exception e) {context.setException(e);
listeners.exception(context);
}
| 3.26 |
querydsl_AntJPADomainExporter_execute_rdh
|
/**
* Exports the named persistence unit's metamodel to Querydsl query types. Expects to be
* called by Ant via name convention using a method with signature public void execute().
*/public void execute() {// We can assume we have the named persistence unit and its mapping file in our classpath,
// but we may have to allow some properties in that persistence unit to be overridden before
// we can successfully get that persistence unit's metamodel.
Map<String, String> properties = (configuration != null) ? configuration.getProperties() : null;
EntityManagerFactory emf = Persistence.createEntityManagerFactory(persistenceUnitName, properties);// Now we can get the persistence unit's metamodel and export it to Querydsl query types.
Metamodel configuration = emf.getMetamodel();
JPADomainExporter exporter = new JPADomainExporter(namePrefix, nameSuffix, new File(targetFolder), configuration);
try {
exporter.execute();
generatedFiles = exporter.getGeneratedFiles();
} catch (IOException e) {
throw new RuntimeException("Error in JPADomainExporter", e);
}
}
| 3.26 |
querydsl_LuceneExpressions_fuzzyLike_rdh
|
/**
* Create a fuzzy query
*
* @param path
* path
* @param value
* value to match
* @param minimumSimilarity
* a value between 0 and 1 to set the required similarity
* @return condition
*/
public static BooleanExpression fuzzyLike(Path<String> path, String value, float minimumSimilarity) {
Term term = new Term(path.getMetadata().getName(), value);
return new QueryElement(new FuzzyQuery(term, minimumSimilarity));
}
| 3.26 |
querydsl_MultiSurfaceExpression_area_rdh
|
/**
* The area of this MultiSurface, as measured in the spatial reference system of this MultiSurface.
*
* @return area
*/
public NumberExpression<Double> area() {
if (area == null) {
area = Expressions.numberOperation(Double.class, SpatialOps.AREA, mixin);
}
return area;
}
| 3.26 |
querydsl_MultiSurfaceExpression_centroid_rdh
|
/**
* The mathematical centroid for this MultiSurface. The result is not guaranteed to be on
* this MultiSurface.
*
* @return centroid
*/
public PointExpression<Point> centroid() {if (centroid == null) {
centroid = GeometryExpressions.pointOperation(SpatialOps.CENTROID, mixin);
}
return centroid;
}
| 3.26 |
querydsl_MultiSurfaceExpression_pointOnSurface_rdh
|
/**
* A Point guaranteed to be on this MultiSurface.
*
* @return point on surface
*/
public PointExpression<Point> pointOnSurface() {
if (pointOnSurface == null) {
pointOnSurface = GeometryExpressions.pointOperation(SpatialOps.POINT_ON_SURFACE, mixin);
}
return pointOnSurface;
}
| 3.26 |
querydsl_NumberExpression_doubleValue_rdh
|
/**
* Create a {@code cast(this as double)} expression
*
* <p>Get the double expression of this numeric expression</p>
*
* @return this.doubleValue()
* @see java.lang.Number#doubleValue()
*/
public NumberExpression<Double> doubleValue() {
return castToNum(Double.class);
}
| 3.26 |
querydsl_NumberExpression_shortValue_rdh
|
/**
* Create a {@code this.shortValue()} expression
*
* <p>Get the short expression of this numeric expression</p>
*
* @return this.shortValue()
* @see java.lang.Number#shortValue()
*/
public NumberExpression<Short> shortValue() {
return castToNum(Short.class);
}
| 3.26 |
querydsl_NumberExpression_ltAll_rdh
|
/**
* Create a {@code this < all right} expression
*
* @param right
* rhs
* @return this < all right
*/
public BooleanExpression ltAll(CollectionExpression<?, ? super T> right) {
return lt(ExpressionUtils.<T>all(right));
}
| 3.26 |
querydsl_NumberExpression_add_rdh
|
/**
* Create a {@code this + right} expression
*
* <p>Get the sum of this and right</p>
*
* @param right
* rhs of expression
* @return this + right
*/
public <N extends Number & Comparable<N>> NumberExpression<T> add(N right) {
return Expressions.numberOperation(getType(), Ops.ADD, mixin, ConstantImpl.create(right));
}
| 3.26 |
querydsl_NumberExpression_nullif_rdh
|
/**
* Create a {@code nullif(this, other)} expression
*
* @param other
* @return nullif(this, other)
*/
@Overridepublic NumberExpression<T> nullif(T other) {
return nullif(ConstantImpl.create(other));
}
/**
* Create a {@code coalesce(this, expr)} expression
*
* @param expr
* additional argument
* @return coalesce
*/
@Override
@SuppressWarnings({ "unchecked" }
| 3.26 |
querydsl_NumberExpression_goeAny_rdh
|
/**
* Create a {@code this >= any right} expression
*
* @param right
* @return this >= any right
*/
public BooleanExpression goeAny(CollectionExpression<?, ? super T> right) {
return goe(ExpressionUtils.<T>any(right));
}
| 3.26 |
querydsl_NumberExpression_multiply_rdh
|
/**
* Create a {@code this * right} expression
*
* <p>Get the result of the operation this * right</p>
*
* @param right
* @return this * right
*/
public <N extends Number & Comparable<N>> NumberExpression<T> multiply(N right) {return Expressions.numberOperation(getType(), Ops.MULT, mixin, ConstantImpl.create(right));
}
| 3.26 |
querydsl_NumberExpression_max_rdh
|
/**
* Create a {@code max(this)} expression
*
* <p>Get the maximum value of this expression (aggregation)</p>
*
* @return max(this)
*/
@Override
public NumberExpression<T> max() {
if (max == null) {
max = Expressions.numberOperation(getType(), AggOps.MAX_AGG, mixin);
}
return max;
}
| 3.26 |
querydsl_NumberExpression_min_rdh
|
/**
* Create a {@code min(this)} expression
*
* <p>Get the minimum value of this expression (aggregation)</p>
*
* @return min(this)
*/
@Override
public NumberExpression<T> min() {if (min == null) {
min = Expressions.numberOperation(getType(), AggOps.MIN_AGG, mixin);
}
return min;
}
| 3.26 |
querydsl_NumberExpression_loeAll_rdh
|
/**
* Create a {@code this <= all right} expression
*
* @param right
* rhs
* @return this <= all right
*/
public BooleanExpression loeAll(CollectionExpression<?, ? super T> right) {
return loe(ExpressionUtils.<T>all(right));
}
| 3.26 |
querydsl_NumberExpression_abs_rdh
|
/**
* Create a {@code abs(this)} expression
*
* <p>Returns the absolute value of this expression</p>
*
* @return abs(this)
*/
public NumberExpression<T> abs() {
if (abs == null) { abs = Expressions.numberOperation(getType(), MathOps.ABS, mixin);
}
return abs;
}
| 3.26 |
querydsl_NumberExpression_lt_rdh
|
/**
* Create a {@code this < right} expression
*
* @param <A>
* @param right
* rhs of the comparison
* @return {@code this < right}
* @see java.lang.Comparable#compareTo(Object)
*/
public final <A extends Number & Comparable<?>> BooleanExpression lt(Expression<A> right) {
return Expressions.booleanOperation(Ops.LT, this, right);
}
| 3.26 |
querydsl_NumberExpression_divide_rdh
|
/**
* Create a {@code this / right} expression
*
* <p>Get the result of the operation this / right</p>
*
* @param right
* @return this / right
*/public <N extends Number & Comparable<?>> NumberExpression<T> divide(N right) {
@SuppressWarnings("unchecked")
Class<T> type = ((Class<T>) (getDivisionType(getType(), right.getClass())));
return Expressions.numberOperation(type, Ops.DIV, mixin, ConstantImpl.create(right));
}
| 3.26 |
querydsl_NumberExpression_longValue_rdh
|
/**
* Create a {@code this.longValue()} expression
*
* <p>Get the long expression of this numeric expression</p>
*
* @return this.longValue()
* @see java.lang.Number#longValue()
*/
public NumberExpression<Long> longValue() {
return castToNum(Long.class);}
| 3.26 |
querydsl_NumberExpression_like_rdh
|
/**
* Create a {@code this like str} expression
*
* @param str
* @return this like str
*/
public BooleanExpression like(Expression<String> str) {
return Expressions.booleanOperation(Ops.LIKE, stringValue(), str);
}
| 3.26 |
querydsl_NumberExpression_coalesce_rdh
|
/**
* Create a {@code coalesce(this, args...)} expression
*
* @param args
* additional arguments
* @return coalesce
*/
@Override
@SuppressWarnings({ "unchecked" })
public NumberExpression<T> coalesce(T... args) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(arg);
}
return ((NumberExpression<T>) (coalesce.asNumber()));
}
| 3.26 |
querydsl_NumberExpression_mod_rdh
|
/**
* Create a {@code mod(this, num)} expression
*
* @param num
* @return mod(this, num)
*/public NumberExpression<T> mod(T num) {
return Expressions.numberOperation(getType(), Ops.MOD, mixin, ConstantImpl.create(num));
}
| 3.26 |
querydsl_NumberExpression_ceil_rdh
|
/**
* Create a {@code ceil(this)} expression
*
* <p>Returns the smallest (closest to negative infinity)
* {@code double} value that is greater than or equal to the
* argument and is equal to a mathematical integer</p>
*
* @return ceil(this)
* @see java.lang.Math#ceil(double)
*/
public NumberExpression<T> ceil() {if (ceil == null) {
ceil = Expressions.numberOperation(getType(), MathOps.CEIL, mixin);
}
return ceil;
}
| 3.26 |
querydsl_NumberExpression_between_rdh
|
/**
* Create a {@code this between from and to} expression
*
* <p>Is equivalent to {@code from <= this <= to}</p>
*
* @param <A>
* @param from
* inclusive start of range
* @param to
* inclusive end of range
* @return this between from and to
*/
public final <A extends Number & Comparable<?>> BooleanExpression between(@Nullable
Expression<A> from, @Nullable
Expression<A> to) {
if (from == null) {
if (to != null) {
return Expressions.booleanOperation(Ops.LOE, mixin, to);
} else {
throw new IllegalArgumentException("Either from or to needs to be non-null");
}
} else if (to == null) {
return Expressions.booleanOperation(Ops.GOE, mixin, from);
} else {
return Expressions.booleanOperation(Ops.BETWEEN, mixin, from, to);
}
}
| 3.26 |
querydsl_NumberExpression_intValue_rdh
|
/**
* Create a {@code this.intValue()} expression
*
* <p>Get the int expression of this numeric expression</p>
*
* @return this.intValue()
* @see java.lang.Number#intValue()
*/
public NumberExpression<Integer> intValue() {return castToNum(Integer.class);
}
| 3.26 |
querydsl_NumberExpression_loeAny_rdh
|
/**
* Create a {@code this <= any right} expression
*
* @param right
* rhs
* @return this <= any right
*/
public BooleanExpression loeAny(CollectionExpression<?, ? super T> right) {
return loe(ExpressionUtils.<T>any(right));
}
| 3.26 |
querydsl_NumberExpression_ltAny_rdh
|
/**
* Create a {@code this < any right} expression
*
* @param right
* rhs
* @return this < any right
*/
public BooleanExpression ltAny(CollectionExpression<?, ? super T> right) { return lt(ExpressionUtils.<T>any(right));
}
| 3.26 |
querydsl_NumberExpression_avg_rdh
|
/**
* Create a {@code avg(this)} expression
*
* <p>Get the average value of this expression (aggregation)</p>
*
* @return avg(this)
*/
public NumberExpression<Double> avg() {
if (avg == null) {
avg = Expressions.numberOperation(Double.class, AggOps.AVG_AGG, mixin);
}
return avg;
}
| 3.26 |
querydsl_NumberExpression_goeAll_rdh
|
/**
* Create a {@code this >= all right} expression
*
* @param right
* @return this >= all right
*/
public BooleanExpression goeAll(CollectionExpression<?, ? super T> right) {
return goe(ExpressionUtils.<T>all(right));
}
| 3.26 |
querydsl_NumberExpression_stringValue_rdh
|
/**
* Create a cast to String expression
*
* @see java.lang.Object#toString()
* @return string representation
*/
public StringExpression stringValue() {
if (stringCast == null) {
stringCast = Expressions.stringOperation(Ops.STRING_CAST, mixin);
}
return stringCast;
}
| 3.26 |
querydsl_NumberExpression_sum_rdh
|
/**
* Create a {@code sum(this)} expression
*
* <p>Get the sum of this expression (aggregation)</p>
*
* @return sum(this)
*/
public NumberExpression<T> sum() {
if (sum == null) {
sum = Expressions.numberOperation(getType(), AggOps.SUM_AGG, mixin);
}
return sum;
}
| 3.26 |
querydsl_NumberExpression_floor_rdh
|
/**
* Create a {@code floor(this)} expression
*
* <p>Returns the largest (closest to positive infinity)
* {@code double} value that is less than or equal to the
* argument and is equal to a mathematical integer.</p>
*
* @return floor(this)
* @see java.lang.Math#floor(double)
*/
public NumberExpression<T> floor() {
if (floor == null) {floor = Expressions.numberOperation(getType(), MathOps.FLOOR, mixin);
}return floor;
}
| 3.26 |
querydsl_NumberExpression_loe_rdh
|
/**
* Create a {@code this <= right} expression
*
* @param <A>
* @param right
* rhs of the comparison
* @return {@code this <= right}
* @see java.lang.Comparable#compareTo(Object)
*/
public final <A extends Number & Comparable<?>> BooleanExpression loe(Expression<A> right) {
return Expressions.booleanOperation(Ops.LOE, mixin, right);
}
| 3.26 |
querydsl_NumberExpression_subtract_rdh
|
/**
* Create a {@code this - right} expression
*
* <p>Get the difference of this and right</p>
*
* @param right
* @return this - right
*/
public <N
extends Number & Comparable<?>> NumberExpression<T> subtract(N right) {
return Expressions.numberOperation(getType(), Ops.SUB, mixin, ConstantImpl.create(right));
}
| 3.26 |
querydsl_NumberExpression_sqrt_rdh
|
/**
* Create a {@code sqrt(this)} expression
*
* <p>Get the square root of this numeric expressions</p>
*
* @return sqrt(this)
*/
public NumberExpression<Double> sqrt() {
if (sqrt == null) {
sqrt = Expressions.numberOperation(Double.class, MathOps.SQRT, mixin);
}
return sqrt;
}
| 3.26 |
querydsl_NumberExpression_gtAny_rdh
|
/**
* Create a {@code this > any right} expression
*
* @param right
* @return this > any right
*/
public BooleanExpression gtAny(SubQueryExpression<? extends T> right) {
return gt(ExpressionUtils.any(right));
}
| 3.26 |
querydsl_NumberExpression_gt_rdh
|
/**
* Create a {@code this > right} expression
*
* @param <A>
* @param right
* rhs of the comparison
* @return {@code this > right}
* @see java.lang.Comparable#compareTo(Object)
*/
public final <A extends Number & Comparable<?>> BooleanExpression gt(A right) {
return gt(ConstantImpl.create(cast(right)));
}
/**
* Create a {@code this > right} expression
*
* @param <A>
* @param right
* rhs of the comparison
* @return {@code this > right}
| 3.26 |
querydsl_NumberExpression_gtAll_rdh
|
/**
* Create a {@code this > all right} expression
*
* @param right
* @return this > all right
*/public BooleanExpression gtAll(SubQueryExpression<? extends T> right) {
return gt(ExpressionUtils.all(right));}
| 3.26 |
querydsl_NumberExpression_floatValue_rdh
|
/**
* Create a {@code cast(this as double)} expression
*
* <p>Get the float expression of this numeric expression</p>
*
* @return this.floatValue()
* @see java.lang.Number#floatValue()
*/public NumberExpression<Float> floatValue() {
return castToNum(Float.class);
}
| 3.26 |
querydsl_NumberExpression_notBetween_rdh
|
/**
* Create a {@code this not between from and to} expression
*
* <p>Is equivalent to {@code this < from || this > to}</p>
*
* @param from
* inclusive start of range
* @param to
* inclusive end of range
* @return this not between from and to
*/
public final <A extends Number & Comparable<?>> BooleanExpression notBetween(Expression<A> from, Expression<A> to) {
return between(from, to).not();
}
| 3.26 |
querydsl_NumberExpression_goe_rdh
|
/**
* Create a {@code this >= right} expression
*
* @param <A>
* @param right
* rhs of the comparison
* @return {@code this >= right}
* @see java.lang.Comparable#compareTo(Object)
*/
public final <A extends Number & Comparable<?>> BooleanExpression goe(Expression<A> right) {
return Expressions.booleanOperation(Ops.GOE, mixin, right);
}
| 3.26 |
querydsl_NumberExpression_round_rdh
|
/**
* Create a {@code round(this)} expression
*
* <p>Returns the closest {@code int} to this.</p>
*
* @return round(this)
* @see java.lang.Math#round(double)
* @see java.lang.Math#round(float)
*/
public NumberExpression<T> round() {
if (round
== null) {
round = Expressions.numberOperation(getType(), MathOps.ROUND, mixin);
}
return round;
}
| 3.26 |
querydsl_NumberExpression_negate_rdh
|
/**
* Create a {@code this * -1} expression
*
* <p>Get the negation of this expression</p>
*
* @return this * -1
*/
public NumberExpression<T> negate() {
if (negation == null) {
negation = Expressions.numberOperation(getType(), Ops.NEGATE, mixin);
}
return negation;
}
| 3.26 |
querydsl_PointExpression_z_rdh
|
/**
* The z-coordinate value for this Point, if it has one. Returns NIL otherwise.
*
* @return z-coordinate
*/
public NumberExpression<Double> z() {
if (z == null) {
z = Expressions.numberOperation(Double.class,
SpatialOps.Z, mixin);
}
return z;
}
| 3.26 |
querydsl_PointExpression_m_rdh
|
/**
* The m-coordinate value for this Point, if it has one. Returns NIL otherwise.
*
* @return m-coordinate
*/
public NumberExpression<Double> m() {
if (m == null) {
m = Expressions.numberOperation(Double.class, SpatialOps.M, mixin);
}
return m;
}
| 3.26 |
querydsl_PointExpression_x_rdh
|
/**
* The x-coordinate value for this Point.
*
* @return x-coordinate
*/
public NumberExpression<Double> x() {
if (x == null) {
x = Expressions.numberOperation(Double.class, SpatialOps.X, mixin);
}
return x;
}
| 3.26 |
querydsl_AbstractExporterMojo_configure_rdh
|
/**
* Configures the {@link GenericExporter}; subclasses may override if desired.
*/protected void configure(GenericExporter exporter) {
exporter.setHandleFields(handleFields);
exporter.setHandleMethods(handleMethods);
exporter.setUseFieldTypes(useFieldTypes);
exporter.setGeneratedAnnotationClass(generatedAnnotationClass);}
| 3.26 |
querydsl_AbstractHibernateSQLQuery_setTimeout_rdh
|
/**
* Set a timeout for the underlying JDBC query.
*
* @param timeout
* the timeout in seconds
*/
@SuppressWarnings("unchecked")
public Q setTimeout(int timeout) {
this.timeout = timeout;
return ((Q) (this));
}
| 3.26 |
querydsl_AbstractHibernateSQLQuery_setFetchSize_rdh
|
/**
* Set a fetchJoin size for the underlying JDBC query.
*
* @param fetchSize
* the fetchJoin size
*/@SuppressWarnings("unchecked")
public Q setFetchSize(int fetchSize) {
this.fetchSize = fetchSize;
return ((Q) (this));
}
| 3.26 |
querydsl_AbstractHibernateSQLQuery_setReadOnly_rdh
|
/**
* Entities retrieved by this query will be loaded in
* a read-only mode where Hibernate will never dirty-check
* them or make changes persistent.
*/
@SuppressWarnings("unchecked")
public Q setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
return ((Q)
(this));
}
| 3.26 |
querydsl_AbstractHibernateSQLQuery_setCacheRegion_rdh
|
/**
* Set the name of the cache region.
*
* @param cacheRegion
* the name of a query cache region, or {@code null}
* for the default query cache
*/
@SuppressWarnings("unchecked")
public Q setCacheRegion(String cacheRegion) {
this.cacheRegion = cacheRegion;
return ((Q) (this));
}
| 3.26 |
querydsl_AbstractHibernateSQLQuery_setCacheable_rdh
|
/**
* Enable caching of this query result set.
*
* @param cacheable
* Should the query results be cacheable?
*/
@SuppressWarnings("unchecked")
public Q setCacheable(boolean cacheable) {
this.cacheable = cacheable;
return ((Q) (this));
}
| 3.26 |
querydsl_JDOQueryFactory_select_rdh
|
/**
* Create a new {@link JDOQuery} instance with the given projection
*
* @param exprs
* projection
* @return select(exprs)
*/
public JDOQuery<Tuple> select(Expression<?>... exprs) {
return query().select(exprs);
}
| 3.26 |
querydsl_JDOQueryFactory_selectDistinct_rdh
|
/**
* Create a new {@link JDOQuery} instance with the given projection
*
* @param exprs
* projection
* @return select(distinct exprs)
*/
public JDOQuery<Tuple> selectDistinct(Expression<?>... exprs)
{
return query().select(exprs).distinct();
}
| 3.26 |
querydsl_JDOQueryFactory_selectFrom_rdh
|
/**
* Create a new {@link JDOQuery} instance with the given projection
*
* @param expr
* projection and source
* @param <T>
* @return select(expr).from(expr)
*/
public <T> JDOQuery<T> selectFrom(EntityPath<T> expr) {
return select(expr).from(expr);
}
| 3.26 |
querydsl_GuavaGroupBy_multimap_rdh
|
/**
* Create a new aggregating map expression using a backing LinkedHashMap
*
* @param key
* key for the map entries
* @param value
* value for the map entries
* @return wrapper expression
*/
public static <K, V, T, U> AbstractGroupExpression<Pair<K, V>, Multimap<T, U>> multimap(GroupExpression<K, T> key, GroupExpression<V, U> value) {
return new GMultimap.Mixin<K, V, T, U, Multimap<T, U>>(key, value, GMultimap.createLinked(QPair.create(key, value)));
}
| 3.26 |
querydsl_GuavaGroupBy_m0_rdh
|
/**
* Create a new aggregating map expression using a backing LinkedHashMap
*
* @param key
* key for the map entries
* @param value
* value for the map entries
* @return wrapper expression
*/
public static <K, V, T>
AbstractGroupExpression<Pair<K, V>, Multimap<T, V>> m0(GroupExpression<K, T> key, Expression<V> value) {
return multimap(key, new GOne<V>(value));
}
| 3.26 |
querydsl_GuavaGroupBy_table_rdh
|
/**
* Create a new aggregating map expression using a backing LinkedHashMap
*
* @param row
* row for the table entries
* @param column
* column for the table entries
* @param value
* value for the table entries
* @return wrapper expression
*/
public static <R, C, V, T, U, W> AbstractGroupExpression<Pair<Pair<R, C>, V>, Table<T, U, W>> table(GroupExpression<R, T> row, GroupExpression<C, U> column, GroupExpression<V, W> value) {
return new GTable.Mixin<R, C, V, T, U, W, Table<T, U, W>>(row, column, value, GTable.create(QPair.create(QPair.create(row, column), value)));
}
| 3.26 |
querydsl_GuavaGroupBy_groupBy_rdh
|
/**
* Create a new GroupByBuilder for the given key expression
*
* @param key
* key for aggregation
* @return builder for further specification
*/
public static <K> GuavaGroupByBuilder<K> groupBy(Expression<K> key) {
return new GuavaGroupByBuilder<K>(key);
}
| 3.26 |
querydsl_GuavaGroupBy_sortedTable_rdh
|
/**
* Create a new aggregating map expression using a backing LinkedHashMap
*
* @param row
* row for the table entries
* @param column
* column for the table entries
* @param value
* value for the table entries
* @return wrapper expression
*/
public static <R, C, V, T, U, W> AbstractGroupExpression<Pair<Pair<R, C>, V>, TreeBasedTable<T, U, W>> sortedTable(GroupExpression<R, T> row, GroupExpression<C, U> column, GroupExpression<V, W> value, Comparator<? super T> rowComparator, Comparator<? super U> columnComparator) {
return new GTable.Mixin<R, C, V, T, U, W, TreeBasedTable<T,
U, W>>(row, column, value, GTable.createSorted(QPair.create(QPair.create(row, column), value), rowComparator, columnComparator));
}
| 3.26 |
querydsl_GuavaGroupBy_sortedSetMultimap_rdh
|
/**
* Create a new aggregating map expression using a backing TreeMap using the given comparator
*
* @param key
* key for the map entries
* @param value
* value for the map entries
* @param keyComparator
* comparator for the created TreeMap instances
* @param valueComparator
* comparator for the created TreeMap instances
* @return wrapper expression
*/
public static <K, V, T, U> AbstractGroupExpression<Pair<K, V>, SortedSetMultimap<T, U>> sortedSetMultimap(GroupExpression<K, T> key, GroupExpression<V, U> value, Comparator<? super T> keyComparator, Comparator<? super U> valueComparator) {
return new GMultimap.Mixin<K, V, T, U, SortedSetMultimap<T, U>>(key, value, GMultimap.createSorted(QPair.create(key, value), keyComparator, valueComparator));
}
| 3.26 |
querydsl_TemporalExpression_before_rdh
|
/**
* Create a {@code this < right} expression
*
* @param right
* rhs of the comparison
* @return this < right
*/public BooleanExpression before(Expression<T> right) {
return lt(right);
}
| 3.26 |
querydsl_TemporalExpression_after_rdh
|
/**
* Create a {@code this > right} expression
*
* @param right
* rhs of the comparison
* @return this > right
*/
public BooleanExpression after(T
right) {
return gt(right);
}
| 3.26 |
querydsl_TemporalExpression_m0_rdh
|
/**
* Create a {@code this > right} expression
*
* @param right
* rhs of the comparison
* @return this > right
*/
public BooleanExpression m0(Expression<T> right) {
return gt(right);
}
| 3.26 |
querydsl_HibernateInsertClause_setLockMode_rdh
|
/**
* Set the lock mode for the given path.
*
* @return the current object
*/
@SuppressWarnings("unchecked")
public HibernateInsertClause setLockMode(Path<?> path, LockMode lockMode) {
lockModes.put(path, lockMode);
return this;
}
| 3.26 |
querydsl_AbstractJPASQLQuery_getResultList_rdh
|
/**
* Transforms results using FactoryExpression if ResultTransformer can't be used
*
* @param query
* query
* @return results
*/
private List<?> getResultList(Query query) {
// TODO : use lazy fetch here?
if (projection != null) {
List<?> results = query.getResultList();
List<Object> rv = new ArrayList<Object>(results.size());
for (Object o : results) {
if (o != null) {
Object[] arr;
if (!o.getClass().isArray()) {
arr = new Object[]{ o };
} else {
arr = ((Object[]) (o));
}
if (projection.getArgs().size() < arr.length) {
Object[] shortened = new Object[projection.getArgs().size()];
System.arraycopy(arr, 0, shortened, 0, shortened.length);
arr = shortened;
}
rv.add(projection.newInstance(arr));
} else {
rv.add(null);
}
}
return rv;
} else {
return query.getResultList();
}
}
| 3.26 |
querydsl_AbstractJPASQLQuery_getSingleResult_rdh
|
/**
* Transforms results using FactoryExpression if ResultTransformer can't be used
*
* @param query
* query
* @return single result
*/@Nullable
private Object getSingleResult(Query query) {
if (projection != null) {
Object result = query.getSingleResult();
if (result != null) {
if (!result.getClass().isArray()) {result = new Object[]{ result };
}
return projection.newInstance(((Object[]) (result)));
} else {
return null;
}
} else {
return query.getSingleResult();
}
}
| 3.26 |
querydsl_JPAMapAccessVisitor_shorten_rdh
|
/**
* Shorten the parent path to a length of max 2 elements
*/
private Path<?> shorten(Path<?> path, boolean outer) {
if (aliases.containsKey(path)) {
return aliases.get(path);
} else if
(path.getMetadata().isRoot()) {return
path;
} else if (path.getMetadata().getParent().getMetadata().isRoot() && outer) {
return path;
} else { Class<?> type = JPAQueryMixin.getElementTypeOrType(path);
Path<?> parent = shorten(path.getMetadata().getParent(), false);Path oldPath = ExpressionUtils.path(path.getType(), new PathMetadata(parent, path.getMetadata().getElement(), path.getMetadata().getPathType()));
if (oldPath.getMetadata().getParent().getMetadata().isRoot() && outer) {
return oldPath;
} else {
Path newPath = ExpressionUtils.path(type, ExpressionUtils.createRootVariable(oldPath));
aliases.put(path, newPath);
f0.addJoin(JoinType.LEFTJOIN, ExpressionUtils.as(oldPath, newPath));
return newPath;
}
}
}
| 3.26 |
querydsl_SQLExpressions_selectDistinct_rdh
|
/**
* Create a new detached SQLQuery instance with the given projection
*
* @param exprs
* distinct projection
* @return select(distinct exprs)
*/
public static SQLQuery<Tuple> selectDistinct(Expression<?>... exprs) {
return new SQLQuery<Void>().select(exprs).distinct();
}
| 3.26 |
querydsl_SQLExpressions_unionAll_rdh
|
/**
* Create a new UNION ALL clause
*
* @param sq
* subqueries
* @param <T>
* @return union
*/
public static <T> Union<T> unionAll(List<SubQueryExpression<T>> sq) {return new SQLQuery<Void>().unionAll(sq);
}
| 3.26 |
querydsl_SQLExpressions_nthValue_rdh
|
/**
* NTH_VALUE returns the expr value of the nth row in the window defined by the analytic clause.
* The returned value has the data type of the expr
*
* @param expr
* measure expression
* @param n
* one based row index
* @return nth_value(expr, n)
*/
public static <T> WindowOver<T> nthValue(Expression<T> expr, Expression<? extends Number> n) {
return new WindowOver<T>(expr.getType(), SQLOps.NTHVALUE, expr, n);
}
| 3.26 |
querydsl_SQLExpressions_sum_rdh
|
/**
* Start a window function expression
*
* @param expr
* expression
* @return sum(expr)
*/
public static <T extends Number> WindowOver<T> sum(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), AggOps.SUM_AGG, expr);
}
| 3.26 |
querydsl_SQLExpressions_avg_rdh
|
/**
* Start a window function expression
*
* @param expr
* expression
* @return avg(expr)
*/
public static <T extends Number> WindowOver<T> avg(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), AggOps.AVG_AGG, expr);
}
| 3.26 |
querydsl_SQLExpressions_regrSxx_rdh
|
/**
* REGR_SXX makes the following computation after the elimination of null (arg1, arg2) pairs:
*
* <p>{@code REGR_COUNT(arg1, arg2) * VAR_POP(arg2)}</p>
*
* @param arg1
* first arg
* @param arg2
* second arg
* @return regr_sxx(arg1, arg2)
*/
public static WindowOver<Double> regrSxx(Expression<? extends Number> arg1, Expression<? extends Number> arg2) {
return new WindowOver<Double>(Double.class, SQLOps.REGR_SXX, arg1, arg2);
}
| 3.26 |
querydsl_SQLExpressions_firstValue_rdh
|
/**
* returns value evaluated at the row that is the first row of the window frame
*
* @param expr
* argument
* @return first_value(expr)
*/
public static <T> WindowOver<T> firstValue(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), SQLOps.FIRSTVALUE, expr);
}
| 3.26 |
querydsl_SQLExpressions_lead_rdh
|
/**
* expr evaluated at the row that is one row after the current row within the partition;
*
* @param expr
* expression
* @return lead(expr)
*/
public static <T> WindowOver<T> lead(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), SQLOps.LEAD, expr);
}
| 3.26 |
querydsl_SQLExpressions_groupConcat_rdh
|
/**
* Get a group_concat(expr) expression
*
* @param expr
* expression to be aggregated
* @return group_concat(expr)
*/
public static StringExpression groupConcat(Expression<String> expr) {
return Expressions.stringOperation(SQLOps.GROUP_CONCAT, expr);
}
| 3.26 |
querydsl_SQLExpressions_date_rdh
|
/**
* Convert timestamp to date
*
* @param type
* type
* @param dateTime
* timestamp
* @return date
*/
public static <D extends
Comparable> DateExpression<D> date(Class<D> type, DateTimeExpression<?> dateTime) {
return Expressions.dateOperation(type, DateTimeOps.DATE, dateTime);
}
| 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.