name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
querydsl_AbstractHibernateQuery_setFetchSize_rdh
/** * Set a fetchJoin size for the underlying JDBC query. * * @param fetchSize * the fetchJoin size * @return the current object */ @SuppressWarnings("unchecked")public Q setFetchSize(int fetchSize) { this.fetchSize = fetchSize; return ((Q) (this)); }
3.26
querydsl_AbstractHibernateQuery_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. * * @return the current object */ @SuppressWarnings("unchecked") public Q setReadOnly(boolean readOnly) { this.readOnly = readOnly; return ((Q) (this)); }
3.26
querydsl_AbstractHibernateQuery_clone_rdh
/** * Clone the state of this query to a new instance with the given StatelessSession * * @param session * session * @return cloned query */ public Q clone(StatelessSession session) { return this.clone(new StatelessSessionHolder(session)); }
3.26
querydsl_AbstractHibernateQuery_iterate_rdh
/** * Return the query results as an {@code Iterator}. If the query * contains multiple results pre row, the results are returned in * an instance of {@code Object[]}.<br> * <br> * Entities returned as results are initialized on demand. The first * SQL query returns identifiers only.<br> */ @Override public CloseableIterator<T> iterate() { try { Query query = createQuery(); ScrollableResults results = query.scroll(ScrollMode.FORWARD_ONLY); return new ScrollableResultsIterator<T>(results); } finally { reset(); }}
3.26
querydsl_AbstractHibernateQuery_scroll_rdh
/** * Return the query results as {@code ScrollableResults}. The * scrollability of the returned results depends upon JDBC driver * support for scrollable {@code ResultSet}s.<br> * * @param mode * scroll mode * @return scrollable results */ public ScrollableResults scroll(ScrollMode mode) { try { return createQuery().scroll(mode);} finally { reset(); } }
3.26
querydsl_AbstractHibernateQuery_setTimeout_rdh
/** * Set a timeout for the underlying JDBC query. * * @param timeout * the timeout in seconds * @return the current object */ @SuppressWarnings("unchecked") public Q setTimeout(int timeout) { this.timeout = timeout; return ((Q) (this)); }
3.26
querydsl_AbstractHibernateQuery_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_AbstractHibernateQuery_setComment_rdh
/** * Add a comment to the generated SQL. * * @param comment * comment * @return the current object */ @SuppressWarnings("unchecked") public Q setComment(String comment) { this.comment = comment; return ((Q) (this)); }
3.26
querydsl_AbstractHibernateQuery_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_ConstructorUtils_m0_rdh
/** * Returns the parameters for the constructor that matches the given types. * * @param type * type * @param givenTypes * parameter types * @return constructor parameters */ public static Class<?>[] m0(Class<?> type, Class<?>[] givenTypes) { next_constructor : for (Constructor<?> constructor : type.getConstructors()) { int matches = 0; Class<?>[] parameters = constructor.getParameterTypes(); Iterator<Class<?>> parameterIterator = Arrays.asList(parameters).iterator(); if ((!isEmpty(givenTypes)) && (!isEmpty(parameters))) { Class<?> parameter = null; for (Class<?> argument : givenTypes) { if (parameterIterator.hasNext()) { parameter = parameterIterator.next(); if (!compatible(parameter, argument)) { continue next_constructor; } matches++; } else if (constructor.isVarArgs()) {if (!compatible(parameter, argument)) { continue next_constructor; } } else { continue next_constructor;// default } } if (matches == parameters.length) { return parameters; } } else if (isEmpty(givenTypes) && isEmpty(parameters)) { return NO_ARGS; } } throw new ExpressionException((("No constructor found for " + type.toString()) + " with parameters: ") + Arrays.deepToString(givenTypes)); }
3.26
querydsl_ConstructorUtils_getConstructor_rdh
/** * Returns the constructor where the formal parameter list matches the * givenTypes argument. * * It is advisable to first call * {@link #getConstructorParameters(java.lang.Class, java.lang.Class[])} * to get the parameters. * * @param type * type * @param givenTypes * parameter types * @return matching constructor * @throws NoSuchMethodException */ public static <C> Constructor<C> getConstructor(Class<C> type, Class<?>[] givenTypes) throws NoSuchMethodException { return type.getConstructor(givenTypes); }
3.26
querydsl_ConstructorUtils_getTransformers_rdh
/** * Returns a fetch of transformers applicable to the given constructor. * * @param constructor * constructor * @return transformers */ public static Iterable<Function<Object[], Object[]>> getTransformers(Constructor<?> constructor) { return Stream.of(new PrimitiveAwareVarArgsTransformer(constructor), new PrimitiveTransformer(constructor), new VarArgsTransformer(constructor)).filter(ArgumentTransformer::isApplicable).collect(Collectors.toList()); }
3.26
querydsl_PolygonExpression_exteriorRing_rdh
/** * Returns the exterior ring of this Polygon. * * @return exterior ring */ public LineStringExpression<?> exteriorRing() { if (exterorRing == null) { exterorRing = GeometryExpressions.lineStringOperation(SpatialOps.EXTERIOR_RING, mixin); } return exterorRing; }
3.26
querydsl_PolygonExpression_numInteriorRing_rdh
/** * Returns the number of interior rings in this Polygon. * * @return number of interior rings */ public NumberExpression<Integer> numInteriorRing() { if (numInteriorRing == null) { numInteriorRing = Expressions.numberOperation(Integer.class, SpatialOps.NUM_INTERIOR_RING, mixin); } return numInteriorRing; }
3.26
querydsl_PolygonExpression_interiorRingN_rdh
/** * Returns the N th interior ring for this Polygon as a LineString. * * @param idx * one based index * @return interior ring at index */ public LineStringExpression<LineString> interiorRingN(int idx) { return GeometryExpressions.lineStringOperation(SpatialOps.INTERIOR_RINGN, mixin, ConstantImpl.create(idx)); }
3.26
querydsl_ExtendedTypeFactory_createClassType_rdh
// TODO : simplify private Type createClassType(DeclaredType declaredType, TypeElement typeElement, boolean deep) { // other String v22 = typeElement.getQualifiedName().toString(); if (v22.startsWith("java.")) { Iterator<? extends TypeMirror> i = declaredType.getTypeArguments().iterator(); if (isAssignable(declaredType, mapType)) { return createMapType(i, deep); } else if (isAssignable(declaredType, listType)) { return createCollectionType(Types.LIST, i, deep); } else if (isAssignable(declaredType, setType)) { return createCollectionType(Types.SET, i, deep); } else if (isAssignable(declaredType, collectionType)) { return createCollectionType(Types.COLLECTION, i, deep); } } TypeCategory typeCategory = TypeCategory.get(v22); if (((typeCategory != TypeCategory.NUMERIC) && isAssignable(typeElement.asType(), comparableType)) && isSubType(typeElement.asType(), numberType)) { typeCategory = TypeCategory.NUMERIC; } else if ((!typeCategory.isSubCategoryOf(TypeCategory.COMPARABLE)) && isAssignable(typeElement.asType(), comparableType)) { typeCategory = TypeCategory.COMPARABLE; } for (Class<? extends Annotation> entityAnn : entityAnnotations) { if (isSimpleTypeEntity(typeElement, entityAnn)) { typeCategory = TypeCategory.ENTITY; } } List<? extends TypeMirror> arguments = declaredType.getTypeArguments(); // for intersection types etc if (v22.equals("")) { TypeMirror type = f0; if (typeCategory == TypeCategory.COMPARABLE) { type = comparableType; } // find most specific type of superTypes which is a subtype of type List<? extends TypeMirror> superTypes = env.getTypeUtils().directSupertypes(declaredType); for (TypeMirror superType : superTypes) { if (env.getTypeUtils().isSubtype(superType, type)) { type = superType; } } typeElement = ((TypeElement) (env.getTypeUtils().asElement(type))); if (type instanceof DeclaredType) {arguments = ((DeclaredType) (type)).getTypeArguments(); } } Type type = m0(typeElement, typeCategory, arguments, deep); TypeMirror v31 = typeElement.getSuperclass(); TypeElement superTypeElement = null; if (v31 instanceof DeclaredType) { superTypeElement = ((TypeElement) (((DeclaredType) (v31)).asElement())); } // entity type for (Class<? extends Annotation> entityAnn : entityAnnotations) { if ((typeElement.getAnnotation(entityAnn) != null) || ((superTypeElement != null) && (superTypeElement.getAnnotation(entityAnn) != null))) { EntityType entityType = new EntityType(type, variableNameFunction);typeMappings.register(entityType, queryTypeFactory.create(entityType)); return entityType; } } return type; }
3.26
querydsl_QTuple_createBindings_rdh
/** * {@code QTuple} represents a projection of type {@link Tuple} * * <p>Usage example:</p> * <pre> * {@code List<Tuple> result = query.from(employee).select(Projections.tuple(employee.firstName, employee.lastName)).fetch(); * for (Tuple row : result) { * System.out.println("firstName " + row.get(employee.firstName)); * System.out.println("lastName " + row.get(employee.lastName)); * }} * </pre> * * <p>Since Tuple projection is the default for multi column projections, the above is equivalent to this code</p> * * <pre> * {@code List<Tuple> result = query.from(employee).select(employee.firstName, employee.lastName).fetch(); * for (Tuple row : result) { * System.out.println("firstName " + row.get(employee.firstName)); * System.out.println("lastName " + row.get(employee.lastName)); * }} * </pre> * * @author tiwe */ @Immutablepublic class QTuple extends FactoryExpressionBase<Tuple> { private static Map<Expression<?>, Integer> createBindings(List<Expression<?>> exprs) { Map<Expression<?>, Integer> map = new LinkedHashMap<>(); for (int i = 0; i < exprs.size(); i++) { Expression<?> e = exprs.get(i); if ((e instanceof Operation) && (((Operation<?>) (e)).getOperator() == Ops.ALIAS)) { map.put(((Operation<?>) (e)).getArg(1), i); } map.put(e, i); } return Collections.unmodifiableMap(map); }
3.26
querydsl_RooAnnotationProcessor_createConfiguration_rdh
/** * AnnotationProcessor for Spring Roo which takes {@link RooJpaEntity}, {@link RooJpaActiveRecord}, * {@link MappedSuperclass}, {@link Embeddable} and {@link Transient} into account * * @author tiwe */ @SupportedAnnotationTypes({ "com.querydsl.core.annotations.*", "javax.persistence.*", "org.springframework.roo.addon.jpa.entity.*" })public class RooAnnotationProcessor extends AbstractQuerydslProcessor { @Override protected Configuration createConfiguration(RoundEnvironment roundEnv) { Class<? extends Annotation> entity = RooJpaEntity.class; Class<? extends Annotation> superType = MappedSuperclass.class; Class<? extends Annotation> embeddable = Embeddable.class; Class<? extends Annotation> embedded = Embedded.class; Class<? extends Annotation> skip = Transient.class;DefaultConfiguration conf = new JPAConfiguration(roundEnv, processingEnv, entity, superType, embeddable, embedded, skip); conf.setAlternativeEntityAnnotation(RooJpaActiveRecord.class); return conf; }
3.26
querydsl_HibernateUpdateClause_setLockMode_rdh
/** * Set the lock mode for the given path. * * @return the current object */ @SuppressWarnings("unchecked") public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) { lockModes.put(path, lockMode); return this; }
3.26
querydsl_RelationalPathBase_eq_rdh
/** * Compares the two relational paths using primary key columns * * @param right * rhs of the comparison * @return this == right */ @Override public BooleanExpression eq(Expression<? super T> right) { if (right instanceof RelationalPath) { return primaryKeyOperation(Ops.EQ, primaryKey, ((RelationalPath) (right)).getPrimaryKey()); } else { return super.eq(right); } }
3.26
querydsl_RelationalPathBase_ne_rdh
/** * Compares the two relational paths using primary key columns * * @param right * rhs of the comparison * @return this != right */ @Override public BooleanExpression ne(Expression<? super T> right) { if (right instanceof RelationalPath) { return primaryKeyOperation(Ops.NE, primaryKey, ((RelationalPath) (right)).getPrimaryKey()); } else { return super.ne(right); } }
3.26
querydsl_JTSGeometryCollectionExpression_numGeometries_rdh
/** * Returns the number of geometries in this GeometryCollection. * * @return numbers of geometries */ public NumberExpression<Integer> numGeometries() { if (numGeometries == null) { numGeometries = Expressions.numberOperation(Integer.class, SpatialOps.NUM_GEOMETRIES, mixin); }return numGeometries;}
3.26
querydsl_JTSGeometryCollectionExpression_geometryN_rdh
/** * Returns the Nth geometry in this GeometryCollection. * * @param n * one based index * @return matching geometry */ public JTSGeometryExpression<Geometry> geometryN(Integer n) { return JTSGeometryExpressions.geometryOperation(SpatialOps.GEOMETRYN, mixin, ConstantImpl.create(n)); }
3.26
querydsl_DefaultQueryMetadata_noValidate_rdh
/** * Disable validation * * @return the current object */ public DefaultQueryMetadata noValidate() { f1 = false; return this; }
3.26
querydsl_AbstractFetchableMongodbQuery_fetchResults_rdh
/** * Fetch results with the specific fields * * @param paths * fields to return * @return results */ public QueryResults<K> fetchResults(Path<?>... paths) { getQueryMixin().setProjection(paths); return fetchResults(); }
3.26
querydsl_AbstractFetchableMongodbQuery_iterate_rdh
/** * Iterate with the specific fields * * @param paths * fields to return * @return iterator */ public CloseableIterator<K> iterate(Path<?>... paths) { getQueryMixin().setProjection(paths); return iterate(); }
3.26
querydsl_AbstractFetchableMongodbQuery_fetchFirst_rdh
/** * Fetch first with the specific fields * * @param paths * fields to return * @return first result */ public K fetchFirst(Path<?>... paths) { getQueryMixin().setProjection(paths); return fetchFirst(); }
3.26
querydsl_AbstractFetchableMongodbQuery_fetch_rdh
/** * Fetch with the specific fields * * @param paths * fields to return * @return results */ public List<K> fetch(Path<?>... paths) { getQueryMixin().setProjection(paths); return fetch(); }
3.26
querydsl_AbstractFetchableMongodbQuery_fetchOne_rdh
/** * Fetch one with the specific fields * * @param paths * fields to return * @return first result */ public K fetchOne(Path<?>... paths) { getQueryMixin().setProjection(paths); return fetchOne(); }
3.26
querydsl_GeneratedAnnotationResolver_resolveDefault_rdh
/** * Resolve the java {@code @Generated} annotation (can be of type {@code javax.annotation.Generated} * or {@code javax.annotation.processing.Generated} depending on the java version. * * @return the Generated annotation class from java. Never {@code null}. */ public static Class<? extends Annotation> resolveDefault() { return DEFAULT_GENERATED_ANNOTATION_CLASS; }
3.26
querydsl_GeneratedAnnotationResolver_resolve_rdh
/** * Use the {@code generatedAnnotationClass} or use the JDK one. * <p> * A {@code null generatedAnnotationClass} will resolve to the java {@code @Generated} annotation (can be of type {@code javax.annotation.Generated} * or {@code javax.annotation.processing.Generated} depending on the java version. * * @param generatedAnnotationClass * the fully qualified class name of the <em>Single-Element Annotation</em> (with {@code String} element) * to use or {@code null}. * @return the provided {@code generatedAnnotationClass} if not {@code null} or the one from java. Never {@code null}. * @see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7.3">Single-Element Annotation</a> */ public static Class<? extends Annotation> resolve(@Nullable String generatedAnnotationClass) { if (generatedAnnotationClass != null) { try { return ((Class<? extends Annotation>) (Class.forName(generatedAnnotationClass))); } catch (Exception e) { // Try next one } } return resolveDefault(); }
3.26
querydsl_TypeCategory_isSubCategoryOf_rdh
/** * transitive and reflexive subCategoryOf check * * @param ancestor * @return */ public boolean isSubCategoryOf(TypeCategory ancestor) { if (this == ancestor) { return true; } else if (superType == null) { return false; } else { return (superType == ancestor) || superType.isSubCategoryOf(ancestor); } }
3.26
querydsl_MultiCurveExpression_isClosed_rdh
/** * Returns 1 (TRUE) if this MultiCurve is closed [StartPoint ( ) = EndPoint ( ) for each * Curve in this MultiCurve]. * * @return closed */ public BooleanExpression isClosed() { if (closed == null) { closed = Expressions.booleanOperation(SpatialOps.IS_CLOSED, mixin);}return closed; }
3.26
querydsl_JTSPointExpression_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_JTSPointExpression_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_JTSPointExpression_y_rdh
/** * The y-coordinate value for this Point. * * @return y-coordinate */ public NumberExpression<Double> y() { if (y == null) { y = Expressions.numberOperation(Double.class, SpatialOps.Y, mixin); } return y; }
3.26
querydsl_ProjectableSQLQuery_unionAll_rdh
/** * Creates an union expression for the given subqueries * * @param <RT> * @param alias * alias for union * @param sq * subqueries * @return the current object */ @SuppressWarnings("unchecked") public <RT> Q unionAll(Path<?> alias, SubQueryExpression<RT>... sq) { return from(((Expression) (UnionUtils.union(Arrays.asList(sq), ((Path) (alias)), true)))); }
3.26
querydsl_ProjectableSQLQuery_union_rdh
/** * Creates an union expression for the given subqueries * * @param <RT> * @param alias * alias for union * @param sq * subqueries * @return the current object */ @SuppressWarnings("unchecked") public <RT> Q union(Path<?> alias, SubQueryExpression<RT>... sq) { return from(((Expression) (UnionUtils.union(Arrays.asList(sq), ((Path) (alias)), false)))); }
3.26
querydsl_ProjectableSQLQuery_addFlag_rdh
/** * Add the given Expression as a query flag * * @param position * position * @param flag * query flag * @return the current object */ @Override public Q addFlag(Position position, Expression<?> flag) { return queryMixin.addFlag(new QueryFlag(position, flag)); }
3.26
querydsl_ProjectableSQLQuery_getSQL_rdh
/** * Get the query as an SQL query string and bindings * * @return SQL string and bindings */ public SQLBindings getSQL() { return getSQL(serialize(false)); }
3.26
querydsl_ProjectableSQLQuery_addJoinFlag_rdh
/** * Add the given String literal as a join flag to the last added join * * @param flag * join flag * @param position * position * @return the current object */ @Override @SuppressWarnings("unchecked") public Q addJoinFlag(String flag, JoinFlag.Position position) { queryMixin.addJoinFlag(new JoinFlag(flag, position)); return ((Q) (this)); }
3.26
querydsl_BeanPath_createMap_rdh
/** * Create a new Map typed path * * @param <K> * @param <V> * @param <E> * @param property * property name * @param key * key type * @param value * value type * @param queryType * expression type * @return property path */ @SuppressWarnings("unchecked") protected <K, V, E extends SimpleExpression<? super V>> MapPath<K, V, E> createMap(String property, Class<? super K> key, Class<? super V> value, Class<? super E> queryType) { return add(new MapPath<K, V, E>(key, value, ((Class) (queryType)), forProperty(property))); }
3.26
querydsl_BeanPath_createEnum_rdh
/** * Create a new Enum path * * @param <A> * @param property * property name * @param type * property type * @return property path */ protected <A extends Enum<A>> EnumPath<A> createEnum(String property, Class<A> type) {return add(new EnumPath<A>(type, forProperty(property))); }
3.26
querydsl_BeanPath_createList_rdh
/** * Create a new List typed path * * @param <A> * @param <E> * @param property * property name * @param type * property type * @param queryType * expression type * @return property path */ @SuppressWarnings("unchecked") protected <A, E extends SimpleExpression<? super A>> ListPath<A, E> createList(String property, Class<? super A> type, Class<? super E> queryType, PathInits inits) { return add(new ListPath<A, E>(type, ((Class) (queryType)), forProperty(property), inits)); }
3.26
querydsl_BeanPath_createDateTime_rdh
/** * Create a new DateTime path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A extends Comparable> DateTimePath<A> createDateTime(String property, Class<? super A> type) { return add(new DateTimePath<A>(((Class) (type)), forProperty(property))); }
3.26
querydsl_BeanPath_createBoolean_rdh
/** * Create a new Boolean path * * @param property * property name * @return property path */ protected BooleanPath createBoolean(String property) { return add(new BooleanPath(forProperty(property))); }
3.26
querydsl_BeanPath_createNumber_rdh
/** * Create a new Number path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A extends Number & Comparable<?>> NumberPath<A> createNumber(String property, Class<? super A> type) { return add(new NumberPath<A>(((Class) (type)), forProperty(property))); }
3.26
querydsl_BeanPath_add_rdh
/** * Template method for tracking child path creation * * @param <P> * @param path * path to be tracked * @return path */ protected <P extends Path<?>> P add(P path) { return path; }
3.26
querydsl_BeanPath_instanceOf_rdh
/** * Create an {@code this instanceOf type} expression * * @param <B> * @param type * rhs of the expression * @return instanceof expression */ public <B extends T> BooleanExpression instanceOf(Class<B> type) { return Expressions.booleanOperation(Ops.INSTANCE_OF, pathMixin, ConstantImpl.create(type));}
3.26
querydsl_BeanPath_createDate_rdh
/** * Create a new Date path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A extends Comparable> DatePath<A> createDate(String property, Class<? super A> type) { return add(new DatePath<A>(((Class) (type)), forProperty(property))); }
3.26
querydsl_BeanPath_createComparable_rdh
/** * Create a new Comparable typed path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked")protected <A extends Comparable> ComparablePath<A> createComparable(String property, Class<? super A> type) { return add(new ComparablePath<A>(((Class) (type)), forProperty(property))); }
3.26
querydsl_BeanPath_createSimple_rdh
/** * Create a new Simple path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A> SimplePath<A> createSimple(String property, Class<? super A> type) { return add(new SimplePath<A>(((Class<A>) (type)), forProperty(property))); }
3.26
querydsl_BeanPath_createCollection_rdh
/** * Create a new Collection typed path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A, Q extends SimpleExpression<? super A>> CollectionPath<A, Q> createCollection(String property, Class<? super A> type, Class<? super Q> queryType, PathInits inits) { return add(new CollectionPath<A, Q>(type, ((Class) (queryType)), forProperty(property), inits)); }
3.26
querydsl_BeanPath_createString_rdh
/** * Create a new String path * * @param property * property name * @return property path */ protected StringPath createString(String property) { return add(new StringPath(forProperty(property))); }
3.26
querydsl_BeanPath_createSet_rdh
/** * Create a new Set typed path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A, E extends SimpleExpression<? super A>> SetPath<A, E> createSet(String property, Class<? super A> type, Class<? super E> queryType, PathInits inits) { return add(new SetPath<A, E>(type, ((Class) (queryType)), forProperty(property), inits)); }
3.26
querydsl_BeanPath_createTime_rdh
/** * Create a new Time path * * @param <A> * @param property * property name * @param type * property type * @return property path */ @SuppressWarnings("unchecked") protected <A extends Comparable> TimePath<A> createTime(String property, Class<? super A> type) { return add(new TimePath<A>(((Class) (type)), forProperty(property))); }
3.26
querydsl_BeanPath_createArray_rdh
/** * Create a new array path * * @param <A> * @param property * property name * @param type * property type * @return property path */ protected <A, E> ArrayPath<A, E> createArray(String property, Class<? super A> type) { return add(new ArrayPath<A, E>(type, forProperty(property))); }
3.26
querydsl_BeanPath_as_rdh
/** * Cast the path to a subtype querytype * * @param <U> * @param clazz * subtype class * @return subtype instance with the same identity */ @SuppressWarnings("unchecked") public <U extends BeanPath<? extends T>> U as(Class<U> clazz) { try { if (!casts.containsKey(clazz)) { PathMetadata metadata; if (pathMixin.getMetadata().getPathType() != PathType.COLLECTION_ANY) { metadata = PathMetadataFactory.forDelegate(pathMixin); } else { metadata = pathMixin.getMetadata(); } U v1; // the inits for the subtype will be wider, if it's a variable path if ((inits != null) && (pathMixin.getMetadata().getPathType() != PathType.VARIABLE)) { v1 = clazz.getConstructor(PathMetadata.class, PathInits.class).newInstance(metadata, inits); } else { v1 = clazz.getConstructor(PathMetadata.class).newInstance(metadata); } casts.put(clazz, v1); return v1; } else { return ((U) (casts.get(clazz))); } } catch (InstantiationException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { throw new ExpressionException(e.getMessage(), e); } }
3.26
querydsl_ComparableExpression_gt_rdh
/** * Create a {@code this > right} expression * * @param right * rhs of the comparison * @return this &gt; right * @see java.lang.Comparable#compareTo(Object) */ public BooleanExpression gt(Expression<T> right) { return Expressions.booleanOperation(Ops.GT, mixin, right); }
3.26
querydsl_ComparableExpression_m0_rdh
/** * Create a {@code this between from and to} expression * * <p>Is equivalent to {@code from <= this <= to}</p> * * @param from * inclusive start of range * @param to * inclusive end of range * @return this between from and to */ public BooleanExpression m0(@Nullable Expression<T> from, @Nullable Expression<T> 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_ComparableExpression_loeAll_rdh
/** * Create a {@code this <= all right} expression * * @param right * rhs of the comparison * @return this &lt;= all right */ public BooleanExpression loeAll(SubQueryExpression<? extends T> right) { return loe(ExpressionUtils.all(right)); }
3.26
querydsl_ComparableExpression_gtAll_rdh
/** * Create a {@code this > all right} expression * * @param right * rhs of the comparison * @return this &gt; all right */ public BooleanExpression gtAll(SubQueryExpression<? extends T> right) { return gt(ExpressionUtils.all(right)); }
3.26
querydsl_ComparableExpression_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 BooleanExpression notBetween(Expression<T> from, Expression<T> to) { return between(from, to).not(); }
3.26
querydsl_ComparableExpression_nullif_rdh
/** * Create a {@code nullif(this, other)} expression * * @param other * @return nullif(this, other) */ @Override public ComparableExpression<T> nullif(T other) { return nullif(ConstantImpl.create(other)); }
3.26
querydsl_ComparableExpression_goeAny_rdh
/** * Create a {@code this >= any right} expression * * @param right * rhs of the comparison * @return this &gt;= any right */ public BooleanExpression goeAny(SubQueryExpression<? extends T> right) { return goe(ExpressionUtils.any(right)); }
3.26
querydsl_ComparableExpression_min_rdh
/** * Create a {@code min(this)} expression * * <p>Get the minimum value of this expression (aggregation)</p> * * @return min(this) */ @Override public ComparableExpression<T> min() { return Expressions.comparableOperation(getType(), AggOps.MIN_AGG, mixin); }
3.26
querydsl_ComparableExpression_max_rdh
/** * Create a {@code max(this)} expression * * <p>Get the maximum value of this expression (aggregation)</p> * * @return max(this) */ @Override public ComparableExpression<T> max() { return Expressions.comparableOperation(getType(), AggOps.MAX_AGG, mixin);}
3.26
querydsl_ComparableExpression_goeAll_rdh
/** * Create a {@code this >= all right} expression * * @param right * rhs of the comparison * @return this &gt;= all right */ public BooleanExpression goeAll(SubQueryExpression<? extends T> right) { return goe(ExpressionUtils.all(right)); }
3.26
querydsl_ComparableExpression_loeAny_rdh
/** * Create a {@code this <= any right} expression * * @param right * rhs of the comparison * @return this &lt;= any right */ public BooleanExpression loeAny(SubQueryExpression<? extends T> right) { return loe(ExpressionUtils.any(right)); }
3.26
querydsl_ComparableExpression_m1_rdh
/** * Create a {@code this < any right} expression * * @param right * rhs of the comparison * @return this &lt; any right */ public BooleanExpression m1(CollectionExpression<?, ? super T> right) { return lt(ExpressionUtils.any(right)); }
3.26
querydsl_ComparableExpression_between_rdh
/** * Create a {@code this between from and to} expression * * <p>Is equivalent to {@code from <= this <= to}</p> * * @param from * inclusive start of range * @param to * inclusive end of range * @return this between from and to */ public BooleanExpression between(@Nullable T from, @Nullable T to) { if (from == null) { if (to != null) { return Expressions.booleanOperation(Ops.LOE, mixin, ConstantImpl.create(to)); } else { throw new IllegalArgumentException("Either from or to needs to be non-null"); } } else if (to == null) { return Expressions.booleanOperation(Ops.GOE, mixin, ConstantImpl.create(from)); } else { return Expressions.booleanOperation(Ops.BETWEEN, mixin, ConstantImpl.create(from), ConstantImpl.create(to)); } }
3.26
querydsl_ComparableExpression_gtAny_rdh
/** * Create a {@code this > any right} expression * * @param right * rhs of the comparison * @return this &gt; any right */ public BooleanExpression gtAny(SubQueryExpression<? extends T> right) {return gt(ExpressionUtils.any(right)); } /** * Create a {@code this >= right}
3.26
querydsl_ComparableExpression_ltAny_rdh
/** * Create a {@code this < any right} expression * * @param right * rhs of the comparison * @return this &lt; any right */ public BooleanExpression ltAny(SubQueryExpression<? extends T> right) { return lt(ExpressionUtils.any(right)); }
3.26
querydsl_ComparableExpression_goe_rdh
/** * Create a {@code this >= right} expression * * @param right * rhs of the comparison * @return this &gt;= right * @see java.lang.Comparable#compareTo(Object) */ public BooleanExpression goe(Expression<T> right) { return Expressions.booleanOperation(Ops.GOE, mixin, right); }
3.26
querydsl_ComparableExpression_ltAll_rdh
/** * Create a {@code this < all right} expression * * @param right * rhs of the comparison * @return this &lt; all right */ public BooleanExpression ltAll(SubQueryExpression<? extends T> right) { return lt(ExpressionUtils.all(right)); }
3.26
querydsl_ComparableExpression_coalesce_rdh
/** * Create a {@code coalesce(this, args...)} expression * * @param args * additional arguments * @return coalesce */ @Override @SuppressWarnings({ "unchecked" }) public ComparableExpression<T> coalesce(T... args) { Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin); for (T arg : args) { coalesce.add(arg); } return coalesce.getValue(); }
3.26
querydsl_ComparableExpression_loe_rdh
/** * Create a {@code this <= right} expression * * @param right * rhs of the comparison * @return this &lt;= right * @see java.lang.Comparable#compareTo(Object) */ public BooleanExpression loe(Expression<T> right) { return Expressions.booleanOperation(Ops.LOE, mixin, right); }
3.26
querydsl_ComparableExpression_lt_rdh
/** * Create a {@code this < right} expression * * @param right * rhs of the comparison * @return this &lt; right * @see java.lang.Comparable#compareTo(Object) */ public BooleanExpression lt(Expression<T> right) { return Expressions.booleanOperation(Ops.LT, mixin, right); }
3.26
querydsl_ReplaceVisitor_visit_rdh
/** * {@code ReplaceVisitor} is a deep visitor that can be customized to replace segments of * expression trees * * @param <C> * context type */public class ReplaceVisitor<C> implements Visitor<Expression<?>, C> { @Overridepublic Expression<?> visit(Constant<?> expr, C context) { return expr; }
3.26
querydsl_JTSMultiSurfaceExpression_centroid_rdh
/** * The mathematical centroid for this MultiSurface. The result is not guaranteed to be on * this MultiSurface. * * @return centroid */ public JTSPointExpression<Point> centroid() { if (centroid == null) { centroid = JTSGeometryExpressions.pointOperation(SpatialOps.CENTROID, mixin); } return centroid; }
3.26
querydsl_BooleanBuilder_orNot_rdh
/** * Create the union of this and the negation of the given predicate * * @param right * predicate to be negated * @return the current object */ public BooleanBuilder orNot(Predicate right) { return or(right.not()); }
3.26
querydsl_BooleanBuilder_andNot_rdh
/** * Create the insertion of this and the negation of the given predicate * * @param right * predicate to be negated * @return the current object */ public BooleanBuilder andNot(Predicate right) { return m0(right.not()); }
3.26
querydsl_BooleanBuilder_m0_rdh
/** * Create the intersection of this and the given predicate * * @param right * right hand side of {@code and} operation * @return the current object */ public BooleanBuilder m0(@Nullable Predicate right) { if (right != null) { if (predicate == null) { predicate = right; } else { predicate = ExpressionUtils.and(predicate, right); } } return this; }
3.26
querydsl_BooleanBuilder_or_rdh
/** * Create the union of this and the given predicate * * @param right * right hand side of {@code or} operation * @return the current object */ public BooleanBuilder or(@Nullable Predicate right) { if (right != null) { if (predicate == null) { predicate = right; } else { predicate = ExpressionUtils.or(predicate, right); } } return this; }
3.26
querydsl_BooleanBuilder_andAnyOf_rdh
/** * Create the intersection of this and the union of the given args * {@code (this && (arg1 || arg2 ... || argN))} * * @param args * union of predicates * @return the current object */public BooleanBuilder andAnyOf(Predicate... args) { if (args.length > 0) { m0(ExpressionUtils.anyOf(args)); } return this;}
3.26
querydsl_BooleanBuilder_orAllOf_rdh
/** * Create the union of this and the intersection of the given args * {@code (this || (arg1 && arg2 ... && argN))} * * @param args * intersection of predicates * @return the current object */ public BooleanBuilder orAllOf(Predicate... args) { if (args.length > 0) { or(ExpressionUtils.allOf(args)); } return this; }
3.26
querydsl_ClassPathUtils_safeClassForName_rdh
/** * Get the class for the given className via the given classLoader * * @param classLoader * classloader to be used * @param className * fully qualified class name * @return {@code Class} instance matching the class name or null if not found */ public static Class<?> safeClassForName(ClassLoader classLoader, String className) { try { if (className.startsWith("com.sun.") || className.startsWith("com.apple.")) { return null; } else { return Class.forName(className, true, classLoader); } } catch (ClassNotFoundException | NoClassDefFoundError e) { return null; } }
3.26
querydsl_ClassPathUtils_scanPackage_rdh
/** * Return the classes from the given package and subpackages using the supplied classloader * * @param classLoader * classloader to be used * @param pkg * package to scan * @return set of found classes * @throws IOException */ public static Set<Class<?>> scanPackage(ClassLoader classLoader, String pkg) throws IOException { return new ClassGraph().enableClassInfo().acceptPackages(pkg).rejectPackages("com.sun", "com.apple").overrideClassLoaders(classLoader).scan().getAllClasses().stream().map(info -> safeClassForName(classLoader, info.getName())).collect(Collectors.toSet()); }
3.26
querydsl_AbstractMongodbQuery_fetchResults_rdh
/** * Fetch results with the specific fields * * @param paths * fields to return * @return results */ public QueryResults<K> fetchResults(Path<?>... paths) { queryMixin.setProjection(paths); return fetchResults(); }
3.26
querydsl_AbstractMongodbQuery_join_rdh
/** * Define a join * * @param ref * reference * @param target * join target * @return join builder */ public <T> JoinBuilder<Q, K, T> join(Path<T> ref, Path<T> target) {return new JoinBuilder<Q, K, T>(queryMixin, ref, target); }
3.26
querydsl_AbstractMongodbQuery_anyEmbedded_rdh
/** * Define a constraint for an embedded object * * @param collection * collection * @param target * target * @return builder */ public <T> AnyEmbeddedBuilder<Q, K> anyEmbedded(Path<? extends Collection<T>> collection, Path<T> target) { return new AnyEmbeddedBuilder<Q, K>(queryMixin, collection); }
3.26
querydsl_AbstractMongodbQuery_iterate_rdh
/** * Iterate with the specific fields * * @param paths * fields to return * @return iterator */ public CloseableIterator<K> iterate(Path<?>... paths) { queryMixin.setProjection(paths); return iterate(); }
3.26
querydsl_AbstractMongodbQuery_fetch_rdh
/** * Fetch with the specific fields * * @param paths * fields to return * @return results */ public List<K> fetch(Path<?>... paths) { queryMixin.setProjection(paths); return fetch(); }
3.26
querydsl_AbstractMongodbQuery_setReadPreference_rdh
/** * Sets the read preference for this query * * @param readPreference * read preference */ public void setReadPreference(ReadPreference readPreference) { this.readPreference = readPreference; }
3.26
querydsl_AbstractMongodbQuery_asDBObject_rdh
/** * Get the where definition as a DBObject instance * * @return */ public DBObject asDBObject() { return createQuery(queryMixin.getMetadata().getWhere()); }
3.26
querydsl_AbstractMongodbQuery_fetchOne_rdh
/** * Fetch one with the specific fields * * @param paths * fields to return * @return first result */ public K fetchOne(Path<?>... paths) { queryMixin.setProjection(paths); return fetchOne(); }
3.26
querydsl_AbstractMongodbQuery_fetchFirst_rdh
/** * Fetch first with the specific fields * * @param paths * fields to return * @return first result */ public K fetchFirst(Path<?>... paths) { queryMixin.setProjection(paths); return fetchFirst(); }
3.26
querydsl_CollQueryFactory_delete_rdh
/** * Create a new delete clause * * @param path * source expression * @param col * source collection * @return delete clause */ public static <A> CollDeleteClause<A> delete(Path<A> path, Collection<A> col) { return new CollDeleteClause<A>(path, col); }
3.26
querydsl_CollQueryFactory_update_rdh
/** * Create a new update clause * * @param path * source expression * @param col * source collection * @return query */ public static <A> CollUpdateClause<A> update(Path<A> path, Iterable<A> col) { return new CollUpdateClause<A>(path, col); }
3.26
querydsl_CollQueryFactory_from_rdh
/** * Create a new query * * @param path * source expression * @param col * source collection * @return query */ public static <A> CollQuery<A> from(Path<A> path, Iterable<A> col) { return new CollQuery<Void>().from(path, col).select(path); }
3.26