name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
querydsl_AbstractCollQuery_leftJoin_rdh
/** * Define a left join from the Map typed path to the alias * * @param <P> * type of expression * @param target * target of the join * @param alias * alias for the joint target * @return current object */ public <P> Q leftJoin(MapExpression<?, P> target, Path<P> alias) { m1().addJoin(JoinType.LEFTJOIN, createAlias(target, alias)); return queryMixin.getSelf(); }
3.26
querydsl_ColumnMetadata_getDigits_rdh
/** * the number of fractional digits * * @return digits */ public int getDigits() { return decimalDigits; }
3.26
querydsl_ColumnMetadata_m0_rdh
/** * Creates default column meta data with the given column name, but without * any type or constraint information. Use the fluent builder methods to * further configure it. * * @throws NullPointerException * if the name is null */ public static ColumnMetadata m0(String name) { return new ColumnMetadata(null, name, null, true, UNDEFINED, UNDEFINED); }
3.26
querydsl_ColumnMetadata_getColumnMetadata_rdh
/** * Returns this path's column metadata if present. Otherwise returns default * metadata where the column name is equal to the path's name. */ public static ColumnMetadata getColumnMetadata(Path<?> path) { Path<?> v0 = path.getMetadata().getParent(); if (v0 instanceof EntityPath) { Object v1 = ((EntityPath<?>) (v0)).getMetadata(path); if (v1 instanceof ColumnMetadata) { return ((ColumnMetadata) (v1)); }} return ColumnMetadata.m0(path.getMetadata().getName()); }
3.26
querydsl_AbstractGeometryCollectionExpression_numGeometries_rdh
/** * Returns the number of geometries in this GeometryCollection. * * @return number of geometries */ public NumberExpression<Integer> numGeometries() { if (numGeometries == null) { numGeometries = Expressions.numberOperation(Integer.class, SpatialOps.NUM_GEOMETRIES, mixin); } return numGeometries; }
3.26
querydsl_AbstractGeometryCollectionExpression_geometryN_rdh
/** * Returns the Nth geometry in this GeometryCollection. * * @param n * one based index * @return matching geometry */ public GeometryExpression<Geometry> geometryN(Integer n) { return GeometryExpressions.geometryOperation(SpatialOps.GEOMETRYN, mixin, ConstantImpl.create(n)); }
3.26
querydsl_MySQLQueryFactory_insertOnDuplicateKeyUpdate_rdh
/** * Create a INSERT ... ON DUPLICATE KEY UPDATE clause * * @param entity * table to insert to * @param clauses * clauses * @return insert clause */ public SQLInsertClause insertOnDuplicateKeyUpdate(RelationalPath<?> entity, Expression<?>... clauses) { SQLInsertClause insert = insert(entity); StringBuilder flag = new StringBuilder(" on duplicate key update "); for (int i = 0; i < clauses.length; i++) { flag.append(i > 0 ? ", " : "").append("{").append(i).append("}"); } insert.addFlag(Position.END, ExpressionUtils.template(String.class, flag.toString(), clauses)); return insert; }
3.26
querydsl_MySQLQueryFactory_insertIgnore_rdh
/** * Create a INSERT IGNORE INTO clause * * @param entity * table to insert to * @return insert clause */ public SQLInsertClause insertIgnore(RelationalPath<?> entity) { SQLInsertClause insert = insert(entity); insert.addFlag(Position.START_OVERRIDE, "insert ignore into "); return insert; }
3.26
querydsl_JTSGeometryExpression_touches_rdh
/** * Returns 1 (TRUE) if this geometric object “spatially touches” anotherGeometry. * * @param geometry * other geometry * @return true, if touches */ public BooleanExpression touches(Expression<? extends Geometry> geometry) { return Expressions.booleanOperation(SpatialOps.TOUCHES, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_boundary_rdh
/** * Returns the closure of the combinatorial boundary of this geometric object * * @return boundary */ public JTSGeometryExpression<Geometry> boundary() { if (boundary == null) { boundary = JTSGeometryExpressions.geometryOperation(SpatialOps.BOUNDARY, mixin); } return boundary; }
3.26
querydsl_JTSGeometryExpression_overlaps_rdh
/** * Returns 1 (TRUE) if this geometric object “spatially overlaps” anotherGeometry. * * @param geometry * other geometry * @return true, if overlaps */ public BooleanExpression overlaps(Geometry geometry) { return overlaps(ConstantImpl.create(geometry)); }
3.26
querydsl_JTSGeometryExpression_crosses_rdh
/** * Returns 1 (TRUE) if this geometric object “spatially crosses’ anotherGeometry. * * @param geometry * other geometry * @return true, if crosses */ public BooleanExpression crosses(Expression<? extends Geometry> geometry) { return Expressions.booleanOperation(SpatialOps.CROSSES, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_union_rdh
/** * Returns a geometric object that represents the Point set * union of this geometric object with anotherGeometry. * * @param geometry * other geometry * @return union of this and the other geometry */ public JTSGeometryExpression<Geometry> union(Geometry geometry) { return union(ConstantImpl.create(geometry)); }
3.26
querydsl_JTSGeometryExpression_distanceSphere_rdh
// TODO maybe move out public NumberExpression<Double> distanceSphere(Expression<? extends Geometry> geometry) { return Expressions.numberOperation(Double.class, SpatialOps.DISTANCE_SPHERE, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_envelope_rdh
/** * The minimum bounding box for this Geometry, returned as a Geometry. The * polygon is defined by the corner points of the bounding box [(MINX, MINY), (MAXX, MINY), (MAXX, MAXY), * (MINX, MAXY), (MINX, MINY)]. Minimums for Z and M may be added. The simplest representation of an * Envelope is as two direct positions, one containing all the minimums, and another all the maximums. In some * cases, this coordinate will be outside the range of validity for the Spatial Reference System. * * @return envelope */ public JTSGeometryExpression<Geometry> envelope() { if (envelope == null) { envelope = JTSGeometryExpressions.geometryOperation(SpatialOps.ENVELOPE, mixin); } return envelope; }
3.26
querydsl_JTSGeometryExpression_symDifference_rdh
/** * Returns a geometric object that represents the * Point set symmetric difference of this geometric object with anotherGeometry. * * @param geometry * other geometry * @return symmetric difference */ public JTSGeometryExpression<Geometry> symDifference(Expression<? extends Geometry> geometry) { return JTSGeometryExpressions.geometryOperation(SpatialOps.SYMDIFFERENCE, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_intersection_rdh
/** * Returns a geometric object that represents the Point set intersection of this geometric * object with anotherGeometry. * * @param geometry * other geometry * @return intersection of this and the other geometry */ public JTSGeometryExpression<Geometry> intersection(Expression<? extends Geometry> geometry) { return JTSGeometryExpressions.geometryOperation(SpatialOps.INTERSECTION, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_contains_rdh
/** * Returns 1 (TRUE) if this geometric object “spatially contains” anotherGeometry. * * @param geometry * other geometry * @return true, if contains */public BooleanExpression contains(Expression<? extends Geometry> geometry) { return Expressions.booleanOperation(SpatialOps.CONTAINS, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_relate_rdh
/** * Returns 1 (TRUE) if this geometric object is spatially related to anotherGeometry by testing * for intersections between the interior, boundary and exterior of the two geometric objects * as specified by the values in the intersectionPatternMatrix. This returns FALSE if all the * tested intersections are empty except exterior (this) intersect exterior (another). * * @param geometry * other geometry * @param matrix * matrix * @return true, if this geometry is spatially related to the other */ public BooleanExpression relate(Expression<? extends Geometry> geometry, String matrix) { return Expressions.booleanOperation(SpatialOps.RELATE, mixin, geometry, ConstantImpl.create(matrix)); }
3.26
querydsl_JTSGeometryExpression_eq_rdh
/* (non-Javadoc) @see com.querydsl.core.types.dsl.SimpleExpression#eq(com.querydsl.core.types.Expression) */ @Override public BooleanExpression eq(Expression<? super T> right) { return Expressions.booleanOperation(SpatialOps.EQUALS, mixin, right); }
3.26
querydsl_JTSGeometryExpression_isEmpty_rdh
/** * Returns 1 (TRUE) if this geometric object is the empty Geometry. If true, then this * geometric object represents the empty point set ∅ for the coordinate space. * * @return empty */ public BooleanExpression isEmpty() { if (empty == null) { empty = Expressions.booleanOperation(SpatialOps.IS_EMPTY, mixin); } return empty; }
3.26
querydsl_JTSGeometryExpression_isSimple_rdh
/** * Returns 1 (TRUE) if this geometric object has no anomalous geometric points, such * as self intersection or self tangency. The description of each instantiable geometric class * will include the specific conditions that cause an instance of that class to be classified as not simple. * * @return simple */ public BooleanExpression isSimple() { if (f0 == null) { f0 = Expressions.booleanOperation(SpatialOps.IS_SIMPLE, mixin); } return f0; }
3.26
querydsl_JTSGeometryExpression_buffer_rdh
/** * Returns a geometric object that represents all Points whose distance from this geometric * object is less than or equal to distance. Calculations are in the spatial reference system * of this geometric object. Because of the limitations of linear interpolation, there will * often be some relatively small error in this distance, but it should be near the resolution * of the coordinates used. * * @param distance * distance * @return buffer */ public JTSGeometryExpression<Geometry> buffer(double distance) { return JTSGeometryExpressions.geometryOperation(SpatialOps.BUFFER, mixin, ConstantImpl.create(distance)); }
3.26
querydsl_JTSGeometryExpression_disjoint_rdh
/** * Returns 1 (TRUE) if this geometric object is “spatially disjoint” from anotherGeometry. * * @param geometry * other geometry * @return true, if disjoint */ public BooleanExpression disjoint(Expression<? extends Geometry> geometry) { return Expressions.booleanOperation(SpatialOps.DISJOINT, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_dimension_rdh
/** * The inherent dimension of this geometric object, which must be less than or equal * to the coordinate dimension. In non-homogeneous collections, this will return the largest topological * dimension of the contained objects. * * @return dimension */ public NumberExpression<Integer> dimension() {if (dimension == null) { dimension = Expressions.numberOperation(Integer.class, SpatialOps.DIMENSION, mixin); } return dimension; }
3.26
querydsl_JTSGeometryExpression_distance_rdh
/** * Returns the shortest distance between any two Points in the two geometric objects as * calculated in the spatial reference system of this geometric object. Because the geometries * are closed, it is possible to find a point on each geometric object involved, such that the * distance between these 2 points is the returned distance between their geometric objects. * * @param geometry * other geometry * @return distance */ public NumberExpression<Double> distance(Expression<? extends Geometry> geometry) { return Expressions.numberOperation(Double.class, SpatialOps.DISTANCE, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_asBinary_rdh
/** * Exports this geometric object to a specific Well-known Binary Representation of * Geometry. * * @return binary representation */ public SimpleExpression<byte[]> asBinary() { if (binary == null) { binary = Expressions.operation(byte[].class, SpatialOps.AS_BINARY, mixin); } return binary; }
3.26
querydsl_JTSGeometryExpression_difference_rdh
/** * Returns a geometric object that represents the Point * set difference of this geometric object with anotherGeometry. * * @param geometry * other geometry * @return difference between this and the other geometry */ public JTSGeometryExpression<Geometry> difference(Expression<? extends Geometry> geometry) { return JTSGeometryExpressions.geometryOperation(SpatialOps.DIFFERENCE, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_geometryType_rdh
/** * Returns the name of the instantiable subtype of Geometry of which this * geometric object is an instantiable member. The name of the subtype of Geometry is returned as a string. * * @return geometry type */ public StringExpression geometryType() { if (geometryType == null) { geometryType = Expressions.stringOperation(SpatialOps.GEOMETRY_TYPE, mixin); } return geometryType; }
3.26
querydsl_JTSGeometryExpression_within_rdh
/** * Returns 1 (TRUE) if this geometric object is “spatially within” anotherGeometry. * * @param geometry * other geometry * @return true, if within */ public BooleanExpression within(Expression<? extends Geometry> geometry) { return Expressions.booleanOperation(SpatialOps.WITHIN, mixin, geometry); }
3.26
querydsl_JTSGeometryExpression_convexHull_rdh
/** * Returns a geometric object that represents the convex hull of this geometric object. * Convex hulls, being dependent on straight lines, can be accurately represented in linear * interpolations for any geometry restricted to linear interpolations. * * @return convex hull */ public JTSGeometryExpression<Geometry> convexHull() { if (convexHull == null) { convexHull = JTSGeometryExpressions.geometryOperation(SpatialOps.CONVEXHULL, mixin); } return convexHull; }
3.26
querydsl_JTSGeometryExpression_intersects_rdh
/** * Returns 1 (TRUE) if this geometric object “spatially intersects” anotherGeometry. * * @param geometry * other geometry * @return true, if intersects */ public BooleanExpression intersects(Expression<? extends Geometry> geometry) {return Expressions.booleanOperation(SpatialOps.INTERSECTS, mixin, geometry); }
3.26
querydsl_TeradataQuery_m0_rdh
/** * Adds a qualify expression * * @param predicate * qualify expression * @return the current object */ public TeradataQuery<T> m0(Predicate predicate) { predicate = ExpressionUtils.predicate(SQLOps.QUALIFY, predicate); return queryMixin.addFlag(new QueryFlag(Position.BEFORE_ORDER, predicate));}
3.26
querydsl_AbstractMySQLQuery_withRollup_rdh
/** * The GROUP BY clause permits a WITH ROLLUP modifier that causes extra rows to be added to the * summary output. These rows represent higher-level (or super-aggregate) summary operations. * ROLLUP thus enables you to answer questions at multiple levels of analysis with a single query. * It can be used, for example, to provide support for OLAP (Online Analytical Processing) operations. * * @return the current object */ public C withRollup() { return addFlag(Position.AFTER_GROUP_BY, WITH_ROLLUP);}
3.26
querydsl_AbstractMySQLQuery_forceIndex_rdh
/** * You can use FORCE INDEX, which acts like USE INDEX (index_list) but with the addition that a * table scan is assumed to be very expensive. In other words, a table scan is used only if there * is no way to use one of the given indexes to find rows in the table. * * @param indexes * index names * @return the current object */ public C forceIndex(String... indexes) { return addJoinFlag((" force index (" + String.join(", ", indexes)) + ")", Position.END); }
3.26
querydsl_AbstractMySQLQuery_useIndex_rdh
/** * By specifying USE INDEX (index_list), you can tell MySQL to use only one of the named indexes * to find rows in the table. * * @param indexes * index names * @return the current object */ public C useIndex(String... indexes) {return addJoinFlag((" use index (" + String.join(", ", indexes)) + ")", Position.END); }
3.26
querydsl_AbstractMySQLQuery_ignoreIndex_rdh
/** * The alternative syntax IGNORE INDEX (index_list) can be used to tell MySQL to not use some * particular index or indexes. * * @param indexes * index names * @return the current object */ public C ignoreIndex(String... indexes) { return addJoinFlag((" ignore index (" + String.join(", ", indexes)) + ")", Position.END); }
3.26
querydsl_AbstractMySQLQuery_into_rdh
/** * SELECT ... INTO var_list selects column values and stores them into variables. * * @param var * variable name * @return the current object */ public C into(String var) { return addFlag(Position.END, "\ninto " + var); }
3.26
querydsl_AbstractMySQLQuery_intoDumpfile_rdh
/** * SELECT ... INTO DUMPFILE writes a single row to a file without any formatting. * * @param file * file to write to * @return the current object */ public C intoDumpfile(File file) { return addFlag(Position.END, ("\ninto dumpfile '" + file.getPath()) + "'"); }
3.26
querydsl_AbstractMySQLQuery_noCache_rdh
/** * With SQL_NO_CACHE, the server does not use the query cache. It neither checks the query cache * to see whether the result is already cached, nor does it cache the query result. * * @return the current object */ public C noCache() { return addFlag(Position.AFTER_SELECT, SQL_NO_CACHE); }
3.26
querydsl_AbstractMySQLQuery_straightJoin_rdh
/** * STRAIGHT_JOIN forces the optimizer to join the tables in the order in which they are listed * in the FROM clause. You can use this to speed up a query if the optimizer joins the tables * in nonoptimal order. STRAIGHT_JOIN also can be used in the table_references list. * * @return the current object */ public C straightJoin() { return addFlag(Position.AFTER_SELECT, STRAIGHT_JOIN); }
3.26
querydsl_AbstractMySQLQuery_highPriority_rdh
/** * HIGH_PRIORITY gives the SELECT higher priority than a statement that updates a table. * You should use this only for queries that are very fast and must be done at once. * * @return the current object */ public C highPriority() { return addFlag(Position.AFTER_SELECT, HIGH_PRIORITY);}
3.26
querydsl_AbstractSQLUpdateClause_m0_rdh
/** * Add the given Expression at the given position as a query flag * * @param position * position * @param flag * query flag * @return the current object */ public C m0(Position position, Expression<?> flag) { metadata.addFlag(new QueryFlag(position, flag)); return ((C) (this)); }
3.26
querydsl_AbstractSQLUpdateClause_addBatch_rdh
/** * Add the current state of bindings as a batch item * * @return the current object */ public C addBatch() { batches.add(new SQLUpdateBatch(metadata, updates)); updates = new LinkedHashMap<>(); metadata = new DefaultQueryMetadata(); metadata.addJoin(JoinType.DEFAULT, entity); return ((C) (this)); }
3.26
querydsl_AbstractSQLUpdateClause_populate_rdh
/** * Populate the UPDATE clause with the properties of the given bean using the given Mapper. * * @param obj * object to use for population * @param mapper * mapper to use * @return the current object */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T> C populate(T obj, Mapper<T> mapper) {Collection<? extends Path<?>> primaryKeyColumns = (entity.getPrimaryKey() != null) ? entity.getPrimaryKey().getLocalColumns() : Collections.<Path<?>>emptyList(); Map<Path<?>, Object> values = mapper.createMap(entity, obj); for (Map.Entry<Path<?>, Object> entry : values.entrySet()) { if (!primaryKeyColumns.contains(entry.getKey())) { set(((Path) (entry.getKey())), entry.getValue()); } } return ((C) (this)); }
3.26
querydsl_AbstractSQLUpdateClause_addFlag_rdh
/** * Add the given String literal at the given position as a query flag * * @param position * position * @param flag * query flag * @return the current object */ public C addFlag(Position position, String flag) { metadata.addFlag(new QueryFlag(position, flag)); return ((C) (this)); }
3.26
querydsl_PropertyHandling_getConfig_rdh
/** * JPA compatibility */ JPA() { @Override public Config getConfig(Class<?> type) { boolean fields = false; boolean methods = false; for (Field field : type.getDeclaredFields()) { fields |= hasAnnotations(field, "javax.persistence."); fields |= hasAnnotations(field, "jakarta.persistence."); } for (Method method : type.getDeclaredMethods()) { methods |= hasAnnotations(method, "javax.persistence."); methods |= hasAnnotations(method, "jakarta.persistence.");} return Config.of(fields, methods, Config.f0); }
3.26
querydsl_GenericExporter_setUseFieldTypes_rdh
/** * Set whether field types should be used instead of getter return types (default false) * * @param b */ public void setUseFieldTypes(boolean b) { f0 = b; }
3.26
querydsl_GenericExporter_setEmbeddedAnnotation_rdh
/** * Set the embedded annotation * * @param embeddedAnnotation * embedded annotation */ public void setEmbeddedAnnotation(Class<? extends Annotation> embeddedAnnotation) { this.embeddedAnnotation = embeddedAnnotation; }
3.26
querydsl_GenericExporter_setHandleMethods_rdh
/** * Set whether methods are handled (default true) * * @param b * @deprecated Use {@link #setPropertyHandling(PropertyHandling)} instead */ @Deprecated public void setHandleMethods(boolean b) { handleMethods = b; setPropertyHandling(); }
3.26
querydsl_GenericExporter_setKeywords_rdh
/** * Set the keywords to be used * * @param keywords */ public void setKeywords(Collection<String> keywords) { codegenModule.bind(CodegenModule.KEYWORDS, keywords); }
3.26
querydsl_GenericExporter_getGeneratedFiles_rdh
/** * Return the set of generated files * * @return a set of generated files */ public Set<File> getGeneratedFiles() { return generatedFiles; }
3.26
querydsl_GenericExporter_setTargetFolder_rdh
/** * Set the target folder for generated sources * * @param targetFolder */ public void setTargetFolder(File targetFolder) { this.targetFolder = targetFolder; }
3.26
querydsl_GenericExporter_addAnnotationHelper_rdh
/** * Add a annotation helper object to process custom annotations * * @param annotationHelper */ public void addAnnotationHelper(AnnotationHelper annotationHelper) { annotationHelpers.add(annotationHelper); }
3.26
querydsl_GenericExporter_setGeneratedAnnotationClass_rdh
/** * Set the Generated annotation class. Will default to java {@code @Generated} * * @param generatedAnnotationClass * the fully qualified class name of the <em>Single-Element Annotation</em> (with {@code String} element) to be used on * the generated sources, or {@code null} (defaulting to {@code javax.annotation.Generated} or * {@code javax.annotation.processing.Generated} depending on the java version). * @see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7.3">Single-Element Annotation</a> */ public void setGeneratedAnnotationClass(@Nullable String generatedAnnotationClass) { codegenModule.bindInstance(CodegenModule.GENERATED_ANNOTATION_CLASS, GeneratedAnnotationResolver.resolve(generatedAnnotationClass)); }
3.26
querydsl_GenericExporter_setPackageSuffix_rdh
/** * Set the package suffix * * @param suffix */ public void setPackageSuffix(String suffix) { codegenModule.bind(CodegenModule.PACKAGE_SUFFIX, suffix); }
3.26
querydsl_GenericExporter_addStopClass_rdh
/** * Add a stop class to be used (default Object.class and Enum.class) * * @param cl */ public void addStopClass(Class<?> cl) { stopClasses.add(cl); }
3.26
querydsl_GenericExporter_setNamePrefix_rdh
/** * Set the name prefix * * @param prefix */ public void setNamePrefix(String prefix) { codegenModule.bind(CodegenModule.PREFIX, prefix);}
3.26
querydsl_GenericExporter_setSerializerConfig_rdh
/** * Set the serializer configuration to use * * @param serializerConfig */ public void setSerializerConfig(SerializerConfig serializerConfig) { this.serializerConfig = serializerConfig;}
3.26
querydsl_GenericExporter_setSkipAnnotation_rdh
/** * Set the skip annotation * * @param skipAnnotation * skip annotation */ public void setSkipAnnotation(Class<? extends Annotation> skipAnnotation) { this.skipAnnotation = skipAnnotation; }
3.26
querydsl_GenericExporter_setSupertypeAnnotation_rdh
/** * Set the supertype annotation * * @param supertypeAnnotation * supertype annotation */ public void setSupertypeAnnotation(Class<? extends Annotation> supertypeAnnotation) { this.supertypeAnnotation = supertypeAnnotation; }
3.26
querydsl_GenericExporter_setTypeMappingsClass_rdh
/** * Set the typemappings class to be used * * @param typeMappingsClass */public void setTypeMappingsClass(Class<? extends TypeMappings> typeMappingsClass) { codegenModule.bind(TypeMappings.class, typeMappingsClass); }
3.26
querydsl_GenericExporter_setEntityAnnotation_rdh
/** * Set the entity annotation * * @param entityAnnotation * entity annotation */ public void setEntityAnnotation(Class<? extends Annotation> entityAnnotation) { this.entityAnnotation = entityAnnotation; }
3.26
querydsl_GenericExporter_setHandleFields_rdh
/** * Set whether fields are handled (default true) * * @param b * @deprecated Use {@link #setPropertyHandling(PropertyHandling)} instead */ @Deprecated public void setHandleFields(boolean b) { handleFields = b; setPropertyHandling(); }
3.26
querydsl_GenericExporter_setNameSuffix_rdh
/** * Set the name suffix * * @param suffix */ public void setNameSuffix(String suffix) { codegenModule.bind(CodegenModule.SUFFIX, suffix); }
3.26
querydsl_GenericExporter_setSerializerClass_rdh
/** * Set the serializer class to be used * * @param serializerClass */ public void setSerializerClass(Class<? extends Serializer> serializerClass) { codegenModule.bind(serializerClass); this.serializerClass = serializerClass; }
3.26
querydsl_GenericExporter_export_rdh
/** * Export the given classes * * @param classes * classes to be scanned */ public void export(Class<?>... classes) { for (Class<?> cl : classes) { handleClass(cl); } innerExport(); }
3.26
querydsl_GenericExporter_setPropertyHandling_rdh
/** * Set the property handling mode * * @param propertyHandling */ public void setPropertyHandling(PropertyHandling propertyHandling) { this.propertyHandling = propertyHandling; }
3.26
querydsl_GenericExporter_setStrictMode_rdh
/** * Set whether annotationless superclasses are handled or not (default: true) * * @param s */ public void setStrictMode(boolean s) { strictMode = s; }
3.26
querydsl_GenericExporter_setCreateScalaSources_rdh
/** * Set whether Scala sources are generated * * @param createScalaSources */ public void setCreateScalaSources(boolean createScalaSources) { this.createScalaSources = createScalaSources; }
3.26
querydsl_GenericExporter_setEmbeddableAnnotation_rdh
/** * Set the embeddable annotation * * @param embeddableAnnotation * embeddable annotation */ public void setEmbeddableAnnotation(Class<? extends Annotation> embeddableAnnotation) { this.embeddableAnnotation = embeddableAnnotation; }
3.26
querydsl_QueryModifiers_subList_rdh
/** * Get a sublist based on the restriction of limit and offset * * @param <T> * @param list * list to be handled * @return sublist with limit and offset applied */ public <T> List<T> subList(List<T> list) { if (!list.isEmpty()) { int from = (offset != null) ? toInt(offset) : 0; int to = (limit != null) ? from + toInt(limit) : list.size(); return list.subList(from, Math.min(to, list.size())); } else { return list; } }
3.26
querydsl_JPAExpressions_treat_rdh
/** * Create a JPA 2.1 treated path. * * @param path * The path to apply the treat operation on * @param subtype * subtype class * @param <U> * the subtype class * @param <T> * the expression type * @return subtype instance with the same identity */ public static <U extends BeanPath<? extends T>, T> U treat(BeanPath<? extends T> path, Class<U> subtype) { try { Class<? extends T> entitySubType = getConcreteEntitySubType(subtype); PathMetadata pathMetadata = new PathMetadata(path, getEntityName(entitySubType), PathType.TREATED_PATH); return subtype.getConstructor(PathMetadata.class).newInstance(pathMetadata); } catch (InstantiationException e) { throw new ExpressionException(e.getMessage(), e); } catch (IllegalAccessException e) { throw new ExpressionException(e.getMessage(), e); } catch (InvocationTargetException e) { throw new ExpressionException(e.getMessage(), e); } catch (NoSuchMethodException e) {throw new ExpressionException(e.getMessage(), e); } }
3.26
querydsl_JPAExpressions_selectZero_rdh
/** * Create a new detached JPQLQuery instance with the projection zero * * @return select(0) */public static JPQLQuery<Integer> selectZero() { return select(Expressions.ZERO);}
3.26
querydsl_JPAExpressions_selectFrom_rdh
/** * Create a new detached JPQLQuery instance with the given projection * * @param expr * projection and source * @param <T> * @return select(expr).from(expr) */ public static <T> JPQLQuery<T> selectFrom(EntityPath<T> expr) { return select(expr).from(expr); }
3.26
querydsl_JPAExpressions_type_rdh
/** * Create a type(path) expression * * @param path * entity * @return type(path) */ public static StringExpression type(EntityPath<?> path) { return Expressions.stringOperation(JPQLOps.TYPE, path); }
3.26
querydsl_JPAExpressions_selectDistinct_rdh
/** * Create a new detached JPQLQuery instance with the given projection * * @param exprs * projection * @return select(distinct expr) */ public static JPQLQuery<Tuple> selectDistinct(Expression<?>... exprs) { return new JPASubQuery<Void>().select(exprs).distinct(); }
3.26
querydsl_JPAExpressions_select_rdh
/** * Create a new detached JPQLQuery instance with the given projection * * @param exprs * projection * @return select(exprs) */ public static JPQLQuery<Tuple> select(Expression<?>... exprs) { return new JPASubQuery<Void>().select(exprs); }
3.26
querydsl_JPAExpressions_min_rdh
/** * Create a min(col) expression * * @param left * collection * @return min(col) */ public static <A extends Comparable<? super A>> ComparableExpression<A> min(CollectionExpression<?, A> left) { return Expressions.comparableOperation(((Class) (left.getParameter(0))), QuantOps.MIN_IN_COL, ((Expression<?>) (left))); }
3.26
querydsl_JPAExpressions_max_rdh
/** * Create a max(col) expression * * @param left * collection * @return max(col) */public static <A extends Comparable<? super A>> ComparableExpression<A> max(CollectionExpression<?, A> left) { return Expressions.comparableOperation(((Class) (left.getParameter(0))), QuantOps.MAX_IN_COL, ((Expression<?>) (left))); }
3.26
querydsl_JPAExpressions_avg_rdh
/** * Create a avg(col) expression * * @param col * collection * @return avg(col) */ public static <A extends Comparable<? super A>> ComparableExpression<A> avg(CollectionExpression<?, A> col) { return Expressions.comparableOperation(((Class) (col.getParameter(0))), QuantOps.AVG_IN_COL, ((Expression<?>) (col))); }
3.26
querydsl_JTSCurveExpression_startPoint_rdh
/** * The start Point of this Curve. * * @return start point */ public JTSPointExpression<Point> startPoint() { if (startPoint == null) { startPoint = JTSGeometryExpressions.pointOperation(SpatialOps.START_POINT, mixin); } return startPoint; }
3.26
querydsl_JTSCurveExpression_m0_rdh
/** * The end Point of this Curve. * * @return end point */ public JTSPointExpression<Point> m0() { if (endPoint == null) { endPoint = JTSGeometryExpressions.pointOperation(SpatialOps.END_POINT, mixin); } return endPoint; }
3.26
querydsl_JTSCurveExpression_length_rdh
/** * The length of this Curve in its associated spatial reference. * * @return length */ public NumberExpression<Double> length() { if (length == null) { length = Expressions.numberOperation(Double.class, SpatialOps.LENGTH, mixin); } return length; }
3.26
querydsl_JTSCurveExpression_isClosed_rdh
/** * Returns 1 (TRUE) if this Curve is closed [StartPoint ( ) = EndPoint ( )]. * * @return closed */ public BooleanExpression isClosed() { if (f0 == null) { f0 = Expressions.booleanOperation(SpatialOps.IS_CLOSED, mixin); } return f0; }
3.26
querydsl_AbstractSQLQuery_forShare_rdh
/** * FOR SHARE causes the rows retrieved by the SELECT statement to be locked as though for update. * * Supported by MySQL, PostgreSQL, SQLServer. * * @param fallbackToForUpdate * if the FOR SHARE is not supported and this parameter is <code>true</code>, the * {@link #forUpdate()} functionality will be used. * @return the current object * @throws QueryException * if the FOR SHARE is not supported and <i>fallbackToForUpdate</i> is set to * <code>false</code>. */ public Q forShare(boolean fallbackToForUpdate) { SQLTemplates sqlTemplates = configuration.getTemplates(); if (sqlTemplates.isForShareSupported()) { QueryFlag forShareFlag = sqlTemplates.getForShareFlag(); return addFlag(forShareFlag); } if (fallbackToForUpdate) { return forUpdate();} throw new QueryException("Using forShare() is not supported"); }
3.26
querydsl_AbstractSQLQuery_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 * @return the newly started context */ protected SQLListenerContextImpl startContext(Connection connection, QueryMetadata metadata) { SQLListenerContextImpl context = new SQLListenerContextImpl(metadata, connection); if (parentContext != null) { context.setData(PARENT_CONTEXT, parentContext); } listeners.start(context); return context; }
3.26
querydsl_AbstractSQLQuery_m2_rdh
/** * Set whether literals are used in SQL strings instead of parameter bindings (default: false) * * <p>Warning: When literals are used, prepared statement won't have any parameter bindings * and also batch statements will only be simulated, but not executed as actual batch statements.</p> * * @param useLiterals * true for literals and false for bindings */ public void m2(boolean useLiterals) { this.useLiterals = useLiterals; }
3.26
querydsl_AbstractSQLQuery_addListener_rdh
/** * Add a listener * * @param listener * listener to add */ public void addListener(SQLListener listener) { listeners.add(listener);}
3.26
querydsl_AbstractSQLQuery_getResults_rdh
/** * Get the results as a JDBC ResultSet * * @return results as ResultSet */ public ResultSet getResults() { final SQLListenerContextImpl v6 = startContext(connection(), queryMixin.getMetadata()); String queryString = null; List<Object> constants = Collections.emptyList(); try { listeners.preRender(v6); SQLSerializer serializer = serialize(false); queryString = serializer.toString(); logQuery(queryString, serializer.getConstants()); v6.addSQL(getSQL(serializer)); listeners.rendered(v6); listeners.notifyQuery(queryMixin.getMetadata()); constants = serializer.getConstants(); listeners.prePrepare(v6); final PreparedStatement stmt = getPreparedStatement(queryString); m1(stmt, constants, serializer.getConstantPaths(), getMetadata().getParams()); v6.addPreparedStatement(stmt); listeners.prepared(v6); listeners.preExecute(v6); final ResultSet rs = stmt.executeQuery(); listeners.executed(v6); return new ResultSetAdapter(rs) { @Override public void close() throws SQLException { try { super.close(); } finally { stmt.close(); reset(); endContext(v6); } } }; } catch (SQLException e) { onException(v6, e); reset(); endContext(v6); throw configuration.translate(queryString, constants, e); } }
3.26
querydsl_AbstractSQLQuery_setStatementOptions_rdh
/** * Set the options to be applied to the JDBC statements of this query * * @param statementOptions * options to be applied to statements */ public void setStatementOptions(StatementOptions statementOptions) { this.statementOptions = statementOptions; }
3.26
querydsl_AbstractSQLQuery_forUpdate_rdh
/** * If you use forUpdate() with a backend that uses page or row locks, rows examined by the * query are write-locked until the end of the current transaction. * * Not supported for SQLite and CUBRID * * @return the current object */ public Q forUpdate() { QueryFlag forUpdateFlag = configuration.getTemplates().getForUpdateFlag();return addFlag(forUpdateFlag); }
3.26
querydsl_AbstractSQLQuery_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_AbstractSQLQuery_as_rdh
/** * Create an alias for the expression * * @param alias * alias * @return this as alias */ @SuppressWarnings("unchecked") public SimpleExpression<T> as(Path<?> alias) { return Expressions.as(this, ((Path) (alias))); }
3.26
querydsl_LineStringExpression_pointN_rdh
/** * Returns the specified Point N in this LineString. * * @param idx * one-based index of element * @return matched element */ public PointExpression<Point> pointN(int idx) { return GeometryExpressions.pointOperation(SpatialOps.POINTN, mixin, ConstantImpl.create(idx)); }
3.26
querydsl_MapPath_getKeyType_rdh
/** * Get the key type * * @return key type */public Class<K> getKeyType() { return f0; }
3.26
graphhopper_LocationIndexTree_setMaxRegionSearch_rdh
/** * Searches also neighbouring tiles until the maximum distance from the query point is reached * (minResolutionInMeter*regionAround). Set to 1 to only search one tile. Good if you * have strict performance requirements and want the search to terminate early, and you can tolerate * that edges that may be in neighboring tiles are not found. Default is 4, which means approximately * that a square of three tiles upwards, downwards, leftwards and rightwards from the tile the query tile * is in is searched. */ public LocationIndexTree setMaxRegionSearch(int numTiles) { if (numTiles < 1) throw new IllegalArgumentException("Region of location index must be at least 1 but was " + numTiles); this.maxRegionSearch = numTiles; return this; }
3.26
graphhopper_LocationIndexTree_calculateRMin_rdh
/** * Calculates the distance to the nearest tile border, where the tile border is the rectangular * region with dimension 2*paddingTiles + 1 and where the center tile contains the given lat/lon * coordinate */ final double calculateRMin(double lat, double lon, int paddingTiles) { int x = indexStructureInfo.getKeyAlgo().x(lon); int y = indexStructureInfo.getKeyAlgo().y(lat); double minLat = graph.getBounds().minLat + ((y - paddingTiles) * indexStructureInfo.getDeltaLat()); double maxLat = graph.getBounds().minLat + (((y + paddingTiles) + 1) * indexStructureInfo.getDeltaLat()); double minLon = graph.getBounds().minLon + ((x - paddingTiles) * indexStructureInfo.getDeltaLon()); double maxLon = graph.getBounds().minLon + (((x + paddingTiles) + 1) * indexStructureInfo.getDeltaLon()); double dSouthernLat = lat - minLat; double dNorthernLat = maxLat - lat; double dWesternLon = lon - minLon; double dEasternLon = maxLon - lon; // convert degree deltas into a radius in meter double dMinLat; double dMinLon; if (dSouthernLat < dNorthernLat) { dMinLat = DIST_PLANE.calcDist(lat, lon, minLat, lon); } else { dMinLat = DIST_PLANE.calcDist(lat, lon, maxLat, lon);} if (dWesternLon < dEasternLon) { dMinLon = DIST_PLANE.calcDist(lat, lon, lat, minLon); } else { dMinLon = DIST_PLANE.calcDist(lat, lon, lat, maxLon); } return Math.min(dMinLat, dMinLon); }
3.26
graphhopper_NameSimilarityEdgeFilter_prepareName_rdh
/** * Removes any characters in the String that we don't care about in the matching procedure * TODO Currently limited to certain 'western' languages */ private String prepareName(String name) { StringBuilder sb = new StringBuilder(name.length()); Matcher wordCharMatcher = WORD_CHAR.matcher(name);while (wordCharMatcher.find()) { String normalizedToken = toLowerCase(wordCharMatcher.group()); String rewrite = rewriteMap.get(normalizedToken); if (rewrite != null) normalizedToken = rewrite; if (normalizedToken.isEmpty()) continue; // Ignore matching short phrases like de, la, ... except it is a number if (normalizedToken.length() > 2) { sb.append(normalizedToken); } else if (Character.isDigit(normalizedToken.charAt(0)) && ((normalizedToken.length() == 1) || Character.isDigit(normalizedToken.charAt(1)))) { sb.append(normalizedToken); } } return sb.toString(); }
3.26
graphhopper_PrepareLandmarks_setAreaIndex_rdh
/** * * @see LandmarkStorage#setAreaIndex(AreaIndex) */ public PrepareLandmarks setAreaIndex(AreaIndex<SplitArea> areaIndex) { lms.setAreaIndex(areaIndex); return this; }
3.26