id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
18,100
querydsl/querydsl
querydsl-collections/src/main/java/com/querydsl/collections/GuavaHelpers.java
GuavaHelpers.wrap
public static <F,T> Function<F,T> wrap(Expression<T> projection) { Path<?> path = projection.accept(PathExtractor.DEFAULT, null); if (path != null) { final Evaluator<T> ev = createEvaluator(path.getRoot(), projection); return new Function<F,T>() { @Override public T apply(F input) { return ev.evaluate(input); } }; } else { throw new IllegalArgumentException("No path in " + projection); } }
java
public static <F,T> Function<F,T> wrap(Expression<T> projection) { Path<?> path = projection.accept(PathExtractor.DEFAULT, null); if (path != null) { final Evaluator<T> ev = createEvaluator(path.getRoot(), projection); return new Function<F,T>() { @Override public T apply(F input) { return ev.evaluate(input); } }; } else { throw new IllegalArgumentException("No path in " + projection); } }
[ "public", "static", "<", "F", ",", "T", ">", "Function", "<", "F", ",", "T", ">", "wrap", "(", "Expression", "<", "T", ">", "projection", ")", "{", "Path", "<", "?", ">", "path", "=", "projection", ".", "accept", "(", "PathExtractor", ".", "DEFAULT", ",", "null", ")", ";", "if", "(", "path", "!=", "null", ")", "{", "final", "Evaluator", "<", "T", ">", "ev", "=", "createEvaluator", "(", "path", ".", "getRoot", "(", ")", ",", "projection", ")", ";", "return", "new", "Function", "<", "F", ",", "T", ">", "(", ")", "{", "@", "Override", "public", "T", "apply", "(", "F", "input", ")", "{", "return", "ev", ".", "evaluate", "(", "input", ")", ";", "}", "}", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "\"No path in \"", "+", "projection", ")", ";", "}", "}" ]
Wrap a Querydsl expression into a Guava function @param projection projection to wrap @return Guava function
[ "Wrap", "a", "Querydsl", "expression", "into", "a", "Guava", "function" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-collections/src/main/java/com/querydsl/collections/GuavaHelpers.java#L65-L78
18,101
querydsl/querydsl
querydsl-lucene4/src/main/java/com/querydsl/lucene4/LuceneExpressions.java
LuceneExpressions.fuzzyLike
public static BooleanExpression fuzzyLike(Path<String> path, String value, int maxEdits) { Term term = new Term(path.getMetadata().getName(), value); return new QueryElement(new FuzzyQuery(term, maxEdits)); }
java
public static BooleanExpression fuzzyLike(Path<String> path, String value, int maxEdits) { Term term = new Term(path.getMetadata().getName(), value); return new QueryElement(new FuzzyQuery(term, maxEdits)); }
[ "public", "static", "BooleanExpression", "fuzzyLike", "(", "Path", "<", "String", ">", "path", ",", "String", "value", ",", "int", "maxEdits", ")", "{", "Term", "term", "=", "new", "Term", "(", "path", ".", "getMetadata", "(", ")", ".", "getName", "(", ")", ",", "value", ")", ";", "return", "new", "QueryElement", "(", "new", "FuzzyQuery", "(", "term", ",", "maxEdits", ")", ")", ";", "}" ]
Create a fuzzy query @param path path @param value value to match @param maxEdits must be &gt;= 0 and &lt;= {@link LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE}. @return condition
[ "Create", "a", "fuzzy", "query" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-lucene4/src/main/java/com/querydsl/lucene4/LuceneExpressions.java#L52-L55
18,102
querydsl/querydsl
querydsl-codegen/src/main/java/com/querydsl/codegen/ClassPathUtils.java
ClassPathUtils.safeClassForName
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 e) { return null; } catch (NoClassDefFoundError e) { return null; } }
java
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 e) { return null; } catch (NoClassDefFoundError e) { return null; } }
[ "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", "e", ")", "{", "return", "null", ";", "}", "catch", "(", "NoClassDefFoundError", "e", ")", "{", "return", "null", ";", "}", "}" ]
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
[ "Get", "the", "class", "for", "the", "given", "className", "via", "the", "given", "classLoader" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-codegen/src/main/java/com/querydsl/codegen/ClassPathUtils.java#L74-L86
18,103
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mssql/AbstractSQLServerQuery.java
AbstractSQLServerQuery.tableHints
@WithBridgeMethods(value = SQLServerQuery.class, castRequired = true) public C tableHints(SQLServerTableHints... tableHints) { if (tableHints.length > 0) { String hints = SQLServerGrammar.tableHints(tableHints); addJoinFlag(hints, JoinFlag.Position.END); } return (C) this; }
java
@WithBridgeMethods(value = SQLServerQuery.class, castRequired = true) public C tableHints(SQLServerTableHints... tableHints) { if (tableHints.length > 0) { String hints = SQLServerGrammar.tableHints(tableHints); addJoinFlag(hints, JoinFlag.Position.END); } return (C) this; }
[ "@", "WithBridgeMethods", "(", "value", "=", "SQLServerQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "tableHints", "(", "SQLServerTableHints", "...", "tableHints", ")", "{", "if", "(", "tableHints", ".", "length", ">", "0", ")", "{", "String", "hints", "=", "SQLServerGrammar", ".", "tableHints", "(", "tableHints", ")", ";", "addJoinFlag", "(", "hints", ",", "JoinFlag", ".", "Position", ".", "END", ")", ";", "}", "return", "(", "C", ")", "this", ";", "}" ]
Set the table hints @param tableHints table hints @return the current object
[ "Set", "the", "table", "hints" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mssql/AbstractSQLServerQuery.java#L49-L56
18,104
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplatesRegistry.java
SQLTemplatesRegistry.getBuilder
public SQLTemplates.Builder getBuilder(DatabaseMetaData md) throws SQLException { String name = md.getDatabaseProductName().toLowerCase(); if (name.equals("cubrid")) { return CUBRIDTemplates.builder(); } else if (name.equals("apache derby")) { return DerbyTemplates.builder(); } else if (name.startsWith("firebird")) { return FirebirdTemplates.builder(); } else if (name.equals("h2")) { return H2Templates.builder(); } else if (name.equals("hsql")) { return HSQLDBTemplates.builder(); } else if (name.equals("mysql")) { return MySQLTemplates.builder(); } else if (name.equals("oracle")) { return OracleTemplates.builder(); } else if (name.equals("postgresql")) { return PostgreSQLTemplates.builder(); } else if (name.equals("sqlite")) { return SQLiteTemplates.builder(); } else if (name.startsWith("teradata")) { return TeradataTemplates.builder(); } else if (name.equals("microsoft sql server")) { switch (md.getDatabaseMajorVersion()) { case 13: case 12: case 11: return SQLServer2012Templates.builder(); case 10: return SQLServer2008Templates.builder(); case 9: return SQLServer2005Templates.builder(); default: return SQLServerTemplates.builder(); } } else { return new SQLTemplates.Builder() { @Override protected SQLTemplates build(char escape, boolean quote) { return new SQLTemplates(Keywords.DEFAULT, "\"", escape, quote, false); } }; } }
java
public SQLTemplates.Builder getBuilder(DatabaseMetaData md) throws SQLException { String name = md.getDatabaseProductName().toLowerCase(); if (name.equals("cubrid")) { return CUBRIDTemplates.builder(); } else if (name.equals("apache derby")) { return DerbyTemplates.builder(); } else if (name.startsWith("firebird")) { return FirebirdTemplates.builder(); } else if (name.equals("h2")) { return H2Templates.builder(); } else if (name.equals("hsql")) { return HSQLDBTemplates.builder(); } else if (name.equals("mysql")) { return MySQLTemplates.builder(); } else if (name.equals("oracle")) { return OracleTemplates.builder(); } else if (name.equals("postgresql")) { return PostgreSQLTemplates.builder(); } else if (name.equals("sqlite")) { return SQLiteTemplates.builder(); } else if (name.startsWith("teradata")) { return TeradataTemplates.builder(); } else if (name.equals("microsoft sql server")) { switch (md.getDatabaseMajorVersion()) { case 13: case 12: case 11: return SQLServer2012Templates.builder(); case 10: return SQLServer2008Templates.builder(); case 9: return SQLServer2005Templates.builder(); default: return SQLServerTemplates.builder(); } } else { return new SQLTemplates.Builder() { @Override protected SQLTemplates build(char escape, boolean quote) { return new SQLTemplates(Keywords.DEFAULT, "\"", escape, quote, false); } }; } }
[ "public", "SQLTemplates", ".", "Builder", "getBuilder", "(", "DatabaseMetaData", "md", ")", "throws", "SQLException", "{", "String", "name", "=", "md", ".", "getDatabaseProductName", "(", ")", ".", "toLowerCase", "(", ")", ";", "if", "(", "name", ".", "equals", "(", "\"cubrid\"", ")", ")", "{", "return", "CUBRIDTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"apache derby\"", ")", ")", "{", "return", "DerbyTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "startsWith", "(", "\"firebird\"", ")", ")", "{", "return", "FirebirdTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"h2\"", ")", ")", "{", "return", "H2Templates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"hsql\"", ")", ")", "{", "return", "HSQLDBTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"mysql\"", ")", ")", "{", "return", "MySQLTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"oracle\"", ")", ")", "{", "return", "OracleTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"postgresql\"", ")", ")", "{", "return", "PostgreSQLTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"sqlite\"", ")", ")", "{", "return", "SQLiteTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "startsWith", "(", "\"teradata\"", ")", ")", "{", "return", "TeradataTemplates", ".", "builder", "(", ")", ";", "}", "else", "if", "(", "name", ".", "equals", "(", "\"microsoft sql server\"", ")", ")", "{", "switch", "(", "md", ".", "getDatabaseMajorVersion", "(", ")", ")", "{", "case", "13", ":", "case", "12", ":", "case", "11", ":", "return", "SQLServer2012Templates", ".", "builder", "(", ")", ";", "case", "10", ":", "return", "SQLServer2008Templates", ".", "builder", "(", ")", ";", "case", "9", ":", "return", "SQLServer2005Templates", ".", "builder", "(", ")", ";", "default", ":", "return", "SQLServerTemplates", ".", "builder", "(", ")", ";", "}", "}", "else", "{", "return", "new", "SQLTemplates", ".", "Builder", "(", ")", "{", "@", "Override", "protected", "SQLTemplates", "build", "(", "char", "escape", ",", "boolean", "quote", ")", "{", "return", "new", "SQLTemplates", "(", "Keywords", ".", "DEFAULT", ",", "\"\\\"\"", ",", "escape", ",", "quote", ",", "false", ")", ";", "}", "}", ";", "}", "}" ]
Get a SQLTemplates.Builder instance that matches best the SQL engine of the given database metadata @param md database metadata @return templates @throws SQLException
[ "Get", "a", "SQLTemplates", ".", "Builder", "instance", "that", "matches", "best", "the", "SQL", "engine", "of", "the", "given", "database", "metadata" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplatesRegistry.java#L44-L83
18,105
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSCurveExpression.java
JTSCurveExpression.length
public NumberExpression<Double> length() { if (length == null) { length = Expressions.numberOperation(Double.class, SpatialOps.LENGTH, mixin); } return length; }
java
public NumberExpression<Double> length() { if (length == null) { length = Expressions.numberOperation(Double.class, SpatialOps.LENGTH, mixin); } return length; }
[ "public", "NumberExpression", "<", "Double", ">", "length", "(", ")", "{", "if", "(", "length", "==", "null", ")", "{", "length", "=", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "LENGTH", ",", "mixin", ")", ";", "}", "return", "length", ";", "}" ]
The length of this Curve in its associated spatial reference. @return length
[ "The", "length", "of", "this", "Curve", "in", "its", "associated", "spatial", "reference", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSCurveExpression.java#L57-L62
18,106
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java
DateTimeExpression.currentDate
public static <T extends Comparable> DateTimeExpression<T> currentDate(Class<T> cl) { return Expressions.dateTimeOperation(cl, Ops.DateTimeOps.CURRENT_DATE); }
java
public static <T extends Comparable> DateTimeExpression<T> currentDate(Class<T> cl) { return Expressions.dateTimeOperation(cl, Ops.DateTimeOps.CURRENT_DATE); }
[ "public", "static", "<", "T", "extends", "Comparable", ">", "DateTimeExpression", "<", "T", ">", "currentDate", "(", "Class", "<", "T", ">", "cl", ")", "{", "return", "Expressions", ".", "dateTimeOperation", "(", "cl", ",", "Ops", ".", "DateTimeOps", ".", "CURRENT_DATE", ")", ";", "}" ]
Create an expression representing the current date as a DateTimeExpression instance @return current date
[ "Create", "an", "expression", "representing", "the", "current", "date", "as", "a", "DateTimeExpression", "instance" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java#L57-L59
18,107
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java
DateTimeExpression.currentTimestamp
public static <T extends Comparable> DateTimeExpression<T> currentTimestamp(Class<T> cl) { return Expressions.dateTimeOperation(cl, Ops.DateTimeOps.CURRENT_TIMESTAMP); }
java
public static <T extends Comparable> DateTimeExpression<T> currentTimestamp(Class<T> cl) { return Expressions.dateTimeOperation(cl, Ops.DateTimeOps.CURRENT_TIMESTAMP); }
[ "public", "static", "<", "T", "extends", "Comparable", ">", "DateTimeExpression", "<", "T", ">", "currentTimestamp", "(", "Class", "<", "T", ">", "cl", ")", "{", "return", "Expressions", ".", "dateTimeOperation", "(", "cl", ",", "Ops", ".", "DateTimeOps", ".", "CURRENT_TIMESTAMP", ")", ";", "}" ]
Create an expression representing the current time instant as a DateTimeExpression instance @return current timestamp
[ "Create", "an", "expression", "representing", "the", "current", "time", "instant", "as", "a", "DateTimeExpression", "instance" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java#L75-L77
18,108
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java
DateTimeExpression.week
public NumberExpression<Integer> week() { if (week == null) { week = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.WEEK, mixin); } return week; }
java
public NumberExpression<Integer> week() { if (week == null) { week = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.WEEK, mixin); } return week; }
[ "public", "NumberExpression", "<", "Integer", ">", "week", "(", ")", "{", "if", "(", "week", "==", "null", ")", "{", "week", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "Ops", ".", "DateTimeOps", ".", "WEEK", ",", "mixin", ")", ";", "}", "return", "week", ";", "}" ]
Create a week expression @return week
[ "Create", "a", "week", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java#L233-L238
18,109
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java
DateTimeExpression.year
public NumberExpression<Integer> year() { if (year == null) { year = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.YEAR, mixin); } return year; }
java
public NumberExpression<Integer> year() { if (year == null) { year = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.YEAR, mixin); } return year; }
[ "public", "NumberExpression", "<", "Integer", ">", "year", "(", ")", "{", "if", "(", "year", "==", "null", ")", "{", "year", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "Ops", ".", "DateTimeOps", ".", "YEAR", ",", "mixin", ")", ";", "}", "return", "year", ";", "}" ]
Create a year expression @return year
[ "Create", "a", "year", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java#L245-L250
18,110
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java
DateTimeExpression.yearWeek
public NumberExpression<Integer> yearWeek() { if (yearWeek == null) { yearWeek = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.YEAR_WEEK, mixin); } return yearWeek; }
java
public NumberExpression<Integer> yearWeek() { if (yearWeek == null) { yearWeek = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.YEAR_WEEK, mixin); } return yearWeek; }
[ "public", "NumberExpression", "<", "Integer", ">", "yearWeek", "(", ")", "{", "if", "(", "yearWeek", "==", "null", ")", "{", "yearWeek", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "Ops", ".", "DateTimeOps", ".", "YEAR_WEEK", ",", "mixin", ")", ";", "}", "return", "yearWeek", ";", "}" ]
Create a ISO yearweek expression @return year week
[ "Create", "a", "ISO", "yearweek", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java#L269-L274
18,111
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/EnumExpression.java
EnumExpression.ordinal
public NumberExpression<Integer> ordinal() { if (ordinal == null) { ordinal = Expressions.numberOperation(Integer.class, Ops.ORDINAL, mixin); } return ordinal; }
java
public NumberExpression<Integer> ordinal() { if (ordinal == null) { ordinal = Expressions.numberOperation(Integer.class, Ops.ORDINAL, mixin); } return ordinal; }
[ "public", "NumberExpression", "<", "Integer", ">", "ordinal", "(", ")", "{", "if", "(", "ordinal", "==", "null", ")", "{", "ordinal", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "Ops", ".", "ORDINAL", ",", "mixin", ")", ";", "}", "return", "ordinal", ";", "}" ]
Get the ordinal of this enum @return ordinal number
[ "Get", "the", "ordinal", "of", "this", "enum" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/EnumExpression.java#L53-L58
18,112
querydsl/querydsl
querydsl-mongodb/src/main/java/com/querydsl/mongodb/AbstractMongodbQuery.java
AbstractMongodbQuery.join
public <T> JoinBuilder<Q, K,T> join(Path<T> ref, Path<T> target) { return new JoinBuilder<Q, K,T>(queryMixin, ref, target); }
java
public <T> JoinBuilder<Q, K,T> join(Path<T> ref, Path<T> target) { return new JoinBuilder<Q, K,T>(queryMixin, ref, target); }
[ "public", "<", "T", ">", "JoinBuilder", "<", "Q", ",", "K", ",", "T", ">", "join", "(", "Path", "<", "T", ">", "ref", ",", "Path", "<", "T", ">", "target", ")", "{", "return", "new", "JoinBuilder", "<", "Q", ",", "K", ",", "T", ">", "(", "queryMixin", ",", "ref", ",", "target", ")", ";", "}" ]
Define a join @param ref reference @param target join target @return join builder
[ "Define", "a", "join" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-mongodb/src/main/java/com/querydsl/mongodb/AbstractMongodbQuery.java#L81-L83
18,113
querydsl/querydsl
querydsl-mongodb/src/main/java/com/querydsl/mongodb/AbstractMongodbQuery.java
AbstractMongodbQuery.anyEmbedded
public <T> AnyEmbeddedBuilder<Q, K> anyEmbedded(Path<? extends Collection<T>> collection, Path<T> target) { return new AnyEmbeddedBuilder<Q, K>(queryMixin, collection); }
java
public <T> AnyEmbeddedBuilder<Q, K> anyEmbedded(Path<? extends Collection<T>> collection, Path<T> target) { return new AnyEmbeddedBuilder<Q, K>(queryMixin, collection); }
[ "public", "<", "T", ">", "AnyEmbeddedBuilder", "<", "Q", ",", "K", ">", "anyEmbedded", "(", "Path", "<", "?", "extends", "Collection", "<", "T", ">", ">", "collection", ",", "Path", "<", "T", ">", "target", ")", "{", "return", "new", "AnyEmbeddedBuilder", "<", "Q", ",", "K", ">", "(", "queryMixin", ",", "collection", ")", ";", "}" ]
Define a constraint for an embedded object @param collection collection @param target target @return builder
[ "Define", "a", "constraint", "for", "an", "embedded", "object" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-mongodb/src/main/java/com/querydsl/mongodb/AbstractMongodbQuery.java#L103-L105
18,114
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java
GeometryExpression.dimension
public NumberExpression<Integer> dimension() { if (dimension == null) { dimension = Expressions.numberOperation(Integer.class, SpatialOps.DIMENSION, mixin); } return dimension; }
java
public NumberExpression<Integer> dimension() { if (dimension == null) { dimension = Expressions.numberOperation(Integer.class, SpatialOps.DIMENSION, mixin); } return dimension; }
[ "public", "NumberExpression", "<", "Integer", ">", "dimension", "(", ")", "{", "if", "(", "dimension", "==", "null", ")", "{", "dimension", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "SpatialOps", ".", "DIMENSION", ",", "mixin", ")", ";", "}", "return", "dimension", ";", "}" ]
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
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java#L63-L68
18,115
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java
GeometryExpression.geometryType
public StringExpression geometryType() { if (geometryType == null) { geometryType = Expressions.stringOperation(SpatialOps.GEOMETRY_TYPE, mixin); } return geometryType; }
java
public StringExpression geometryType() { if (geometryType == null) { geometryType = Expressions.stringOperation(SpatialOps.GEOMETRY_TYPE, mixin); } return geometryType; }
[ "public", "StringExpression", "geometryType", "(", ")", "{", "if", "(", "geometryType", "==", "null", ")", "{", "geometryType", "=", "Expressions", ".", "stringOperation", "(", "SpatialOps", ".", "GEOMETRY_TYPE", ",", "mixin", ")", ";", "}", "return", "geometryType", ";", "}" ]
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
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java#L76-L81
18,116
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java
GeometryExpression.srid
public NumberExpression<Integer> srid() { if (srid == null) { srid = Expressions.numberOperation(Integer.class, SpatialOps.SRID, mixin); } return srid; }
java
public NumberExpression<Integer> srid() { if (srid == null) { srid = Expressions.numberOperation(Integer.class, SpatialOps.SRID, mixin); } return srid; }
[ "public", "NumberExpression", "<", "Integer", ">", "srid", "(", ")", "{", "if", "(", "srid", "==", "null", ")", "{", "srid", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "SpatialOps", ".", "SRID", ",", "mixin", ")", ";", "}", "return", "srid", ";", "}" ]
Returns the Spatial Reference System ID for this geometric object. This will normally be a foreign key to an index of reference systems stored in either the same or some other datastore. @return SRID
[ "Returns", "the", "Spatial", "Reference", "System", "ID", "for", "this", "geometric", "object", ".", "This", "will", "normally", "be", "a", "foreign", "key", "to", "an", "index", "of", "reference", "systems", "stored", "in", "either", "the", "same", "or", "some", "other", "datastore", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java#L89-L94
18,117
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java
GeometryExpression.asText
public StringExpression asText() { if (text == null) { text = Expressions.stringOperation(SpatialOps.AS_TEXT, mixin); } return text; }
java
public StringExpression asText() { if (text == null) { text = Expressions.stringOperation(SpatialOps.AS_TEXT, mixin); } return text; }
[ "public", "StringExpression", "asText", "(", ")", "{", "if", "(", "text", "==", "null", ")", "{", "text", "=", "Expressions", ".", "stringOperation", "(", "SpatialOps", ".", "AS_TEXT", ",", "mixin", ")", ";", "}", "return", "text", ";", "}" ]
Exports this geometric object to a specific Well-known Text Representation of Geometry. @return text representation
[ "Exports", "this", "geometric", "object", "to", "a", "specific", "Well", "-", "known", "Text", "Representation", "of", "Geometry", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java#L117-L122
18,118
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java
GeometryExpression.asBinary
public SimpleExpression<byte[]> asBinary() { if (binary == null) { binary = Expressions.operation(byte[].class, SpatialOps.AS_BINARY, mixin); } return binary; }
java
public SimpleExpression<byte[]> asBinary() { if (binary == null) { binary = Expressions.operation(byte[].class, SpatialOps.AS_BINARY, mixin); } return binary; }
[ "public", "SimpleExpression", "<", "byte", "[", "]", ">", "asBinary", "(", ")", "{", "if", "(", "binary", "==", "null", ")", "{", "binary", "=", "Expressions", ".", "operation", "(", "byte", "[", "]", ".", "class", ",", "SpatialOps", ".", "AS_BINARY", ",", "mixin", ")", ";", "}", "return", "binary", ";", "}" ]
Exports this geometric object to a specific Well-known Binary Representation of Geometry. @return binary representation
[ "Exports", "this", "geometric", "object", "to", "a", "specific", "Well", "-", "known", "Binary", "Representation", "of", "Geometry", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java#L130-L135
18,119
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java
GeometryExpression.distance
public NumberExpression<Double> distance(Expression<? extends Geometry> geometry) { return Expressions.numberOperation(Double.class, SpatialOps.DISTANCE, mixin, geometry); }
java
public NumberExpression<Double> distance(Expression<? extends Geometry> geometry) { return Expressions.numberOperation(Double.class, SpatialOps.DISTANCE, mixin, geometry); }
[ "public", "NumberExpression", "<", "Double", ">", "distance", "(", "Expression", "<", "?", "extends", "Geometry", ">", "geometry", ")", "{", "return", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "DISTANCE", ",", "mixin", ",", "geometry", ")", ";", "}" ]
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 between this and the other geometry
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpression.java#L386-L388
18,120
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java
PathBuilder.get
@SuppressWarnings("unchecked") public PathBuilder<Object> get(String property) { SimpleEntry<String, Class<?>> entry = new SimpleEntry<String, Class<?>>(property, Object.class); PathBuilder<Object> path = (PathBuilder<Object>) properties.get(entry); PathBuilder<?> existingPath = null; if (path == null) { Class<?> vtype = validate(property, Object.class); path = new PathBuilder<Object>(vtype, forProperty(property), validator); existingPath = properties.putIfAbsent(entry, path); } return existingPath == null ? path : (PathBuilder<Object>) existingPath; }
java
@SuppressWarnings("unchecked") public PathBuilder<Object> get(String property) { SimpleEntry<String, Class<?>> entry = new SimpleEntry<String, Class<?>>(property, Object.class); PathBuilder<Object> path = (PathBuilder<Object>) properties.get(entry); PathBuilder<?> existingPath = null; if (path == null) { Class<?> vtype = validate(property, Object.class); path = new PathBuilder<Object>(vtype, forProperty(property), validator); existingPath = properties.putIfAbsent(entry, path); } return existingPath == null ? path : (PathBuilder<Object>) existingPath; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "PathBuilder", "<", "Object", ">", "get", "(", "String", "property", ")", "{", "SimpleEntry", "<", "String", ",", "Class", "<", "?", ">", ">", "entry", "=", "new", "SimpleEntry", "<", "String", ",", "Class", "<", "?", ">", ">", "(", "property", ",", "Object", ".", "class", ")", ";", "PathBuilder", "<", "Object", ">", "path", "=", "(", "PathBuilder", "<", "Object", ">", ")", "properties", ".", "get", "(", "entry", ")", ";", "PathBuilder", "<", "?", ">", "existingPath", "=", "null", ";", "if", "(", "path", "==", "null", ")", "{", "Class", "<", "?", ">", "vtype", "=", "validate", "(", "property", ",", "Object", ".", "class", ")", ";", "path", "=", "new", "PathBuilder", "<", "Object", ">", "(", "vtype", ",", "forProperty", "(", "property", ")", ",", "validator", ")", ";", "existingPath", "=", "properties", ".", "putIfAbsent", "(", "entry", ",", "path", ")", ";", "}", "return", "existingPath", "==", "null", "?", "path", ":", "(", "PathBuilder", "<", "Object", ">", ")", "existingPath", ";", "}" ]
Create a PathBuilder instance for the given property @param property property name @return property path
[ "Create", "a", "PathBuilder", "instance", "for", "the", "given", "property" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L129-L140
18,121
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java
PathBuilder.get
@SuppressWarnings("unchecked") public <A> PathBuilder<A> get(String property, Class<A> type) { SimpleEntry<String, Class<?>> entry = new SimpleEntry<String, Class<?>>(property, type); PathBuilder<A> path = (PathBuilder<A>) properties.get(entry); PathBuilder<?> existingPath = null; if (path == null) { Class<? extends A> vtype = validate(property, type); path = new PathBuilder<A>(vtype, forProperty(property), validator); existingPath = properties.putIfAbsent(entry, path); } return existingPath == null ? path : (PathBuilder<A>) existingPath; }
java
@SuppressWarnings("unchecked") public <A> PathBuilder<A> get(String property, Class<A> type) { SimpleEntry<String, Class<?>> entry = new SimpleEntry<String, Class<?>>(property, type); PathBuilder<A> path = (PathBuilder<A>) properties.get(entry); PathBuilder<?> existingPath = null; if (path == null) { Class<? extends A> vtype = validate(property, type); path = new PathBuilder<A>(vtype, forProperty(property), validator); existingPath = properties.putIfAbsent(entry, path); } return existingPath == null ? path : (PathBuilder<A>) existingPath; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "A", ">", "PathBuilder", "<", "A", ">", "get", "(", "String", "property", ",", "Class", "<", "A", ">", "type", ")", "{", "SimpleEntry", "<", "String", ",", "Class", "<", "?", ">", ">", "entry", "=", "new", "SimpleEntry", "<", "String", ",", "Class", "<", "?", ">", ">", "(", "property", ",", "type", ")", ";", "PathBuilder", "<", "A", ">", "path", "=", "(", "PathBuilder", "<", "A", ">", ")", "properties", ".", "get", "(", "entry", ")", ";", "PathBuilder", "<", "?", ">", "existingPath", "=", "null", ";", "if", "(", "path", "==", "null", ")", "{", "Class", "<", "?", "extends", "A", ">", "vtype", "=", "validate", "(", "property", ",", "type", ")", ";", "path", "=", "new", "PathBuilder", "<", "A", ">", "(", "vtype", ",", "forProperty", "(", "property", ")", ",", "validator", ")", ";", "existingPath", "=", "properties", ".", "putIfAbsent", "(", "entry", ",", "path", ")", ";", "}", "return", "existingPath", "==", "null", "?", "path", ":", "(", "PathBuilder", "<", "A", ">", ")", "existingPath", ";", "}" ]
Create a PathBuilder for the given property with the given type @param <A> @param property property name @param type property type @return property path
[ "Create", "a", "PathBuilder", "for", "the", "given", "property", "with", "the", "given", "type" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L150-L161
18,122
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java
PathBuilder.getArray
public <A, E> ArrayPath<A, E> getArray(String property, Class<A> type) { validate(property, Array.newInstance(type, 0).getClass()); return super.createArray(property, type); }
java
public <A, E> ArrayPath<A, E> getArray(String property, Class<A> type) { validate(property, Array.newInstance(type, 0).getClass()); return super.createArray(property, type); }
[ "public", "<", "A", ",", "E", ">", "ArrayPath", "<", "A", ",", "E", ">", "getArray", "(", "String", "property", ",", "Class", "<", "A", ">", "type", ")", "{", "validate", "(", "property", ",", "Array", ".", "newInstance", "(", "type", ",", "0", ")", ".", "getClass", "(", ")", ")", ";", "return", "super", ".", "createArray", "(", "property", ",", "type", ")", ";", "}" ]
Create a ArrayPath instance for the given property and the given array type @param <A> @param <E> @param property property name @param type property type @return property path
[ "Create", "a", "ArrayPath", "instance", "for", "the", "given", "property", "and", "the", "given", "array", "type" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L172-L175
18,123
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java
PathBuilder.get
public BooleanPath get(BooleanPath path) { BooleanPath newPath = getBoolean(toString(path)); return addMetadataOf(newPath, path); }
java
public BooleanPath get(BooleanPath path) { BooleanPath newPath = getBoolean(toString(path)); return addMetadataOf(newPath, path); }
[ "public", "BooleanPath", "get", "(", "BooleanPath", "path", ")", "{", "BooleanPath", "newPath", "=", "getBoolean", "(", "toString", "(", "path", ")", ")", ";", "return", "addMetadataOf", "(", "newPath", ",", "path", ")", ";", "}" ]
Create a new Boolean typed path @param path existing path @return property path
[ "Create", "a", "new", "Boolean", "typed", "path" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L183-L186
18,124
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java
PathBuilder.get
public StringPath get(StringPath path) { StringPath newPath = getString(toString(path)); return addMetadataOf(newPath, path); }
java
public StringPath get(StringPath path) { StringPath newPath = getString(toString(path)); return addMetadataOf(newPath, path); }
[ "public", "StringPath", "get", "(", "StringPath", "path", ")", "{", "StringPath", "newPath", "=", "getString", "(", "toString", "(", "path", ")", ")", ";", "return", "addMetadataOf", "(", "newPath", ",", "path", ")", ";", "}" ]
Create a new String typed path @param path existing path @return property path
[ "Create", "a", "new", "String", "typed", "path" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L478-L481
18,125
querydsl/querydsl
querydsl-sql-codegen/src/main/java/com/querydsl/sql/codegen/ant/AntMetaDataExporter.java
AntMetaDataExporter.getCustomTypes
public String[] getCustomTypes() { String[] customTypes = new String[this.customTypes.size()]; for (int i = 0; i < this.customTypes.size(); i++) { CustomType customType = this.customTypes.get(i); customTypes[i] = customType.getClassName(); } return customTypes; }
java
public String[] getCustomTypes() { String[] customTypes = new String[this.customTypes.size()]; for (int i = 0; i < this.customTypes.size(); i++) { CustomType customType = this.customTypes.get(i); customTypes[i] = customType.getClassName(); } return customTypes; }
[ "public", "String", "[", "]", "getCustomTypes", "(", ")", "{", "String", "[", "]", "customTypes", "=", "new", "String", "[", "this", ".", "customTypes", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "customTypes", ".", "size", "(", ")", ";", "i", "++", ")", "{", "CustomType", "customType", "=", "this", ".", "customTypes", ".", "get", "(", "i", ")", ";", "customTypes", "[", "i", "]", "=", "customType", ".", "getClassName", "(", ")", ";", "}", "return", "customTypes", ";", "}" ]
Gets a list of custom types @return a list of custom types @deprecated Use addCustomType instead
[ "Gets", "a", "list", "of", "custom", "types" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql-codegen/src/main/java/com/querydsl/sql/codegen/ant/AntMetaDataExporter.java#L607-L614
18,126
querydsl/querydsl
querydsl-sql-codegen/src/main/java/com/querydsl/sql/codegen/ant/AntMetaDataExporter.java
AntMetaDataExporter.setCustomTypes
public void setCustomTypes(String[] strings) { this.customTypes.clear(); for (String string : strings) { CustomType customType = new CustomType(); customType.setClassName(string); this.customTypes.add(customType); } }
java
public void setCustomTypes(String[] strings) { this.customTypes.clear(); for (String string : strings) { CustomType customType = new CustomType(); customType.setClassName(string); this.customTypes.add(customType); } }
[ "public", "void", "setCustomTypes", "(", "String", "[", "]", "strings", ")", "{", "this", ".", "customTypes", ".", "clear", "(", ")", ";", "for", "(", "String", "string", ":", "strings", ")", "{", "CustomType", "customType", "=", "new", "CustomType", "(", ")", ";", "customType", ".", "setClassName", "(", "string", ")", ";", "this", ".", "customTypes", ".", "add", "(", "customType", ")", ";", "}", "}" ]
Sets a list of custom types @param strings a list of custom types @deprecated Use addCustomType instead
[ "Sets", "a", "list", "of", "custom", "types" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql-codegen/src/main/java/com/querydsl/sql/codegen/ant/AntMetaDataExporter.java#L621-L628
18,127
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLSerializer.java
SQLSerializer.getIdentifierColumns
@SuppressWarnings("unchecked") protected List<Expression<?>> getIdentifierColumns(List<JoinExpression> joins, boolean alias) { if (joins.size() == 1) { JoinExpression join = joins.get(0); if (join.getTarget() instanceof RelationalPath) { return ((RelationalPath) join.getTarget()).getColumns(); } else { return Collections.emptyList(); } } else { List<Expression<?>> rv = Lists.newArrayList(); int counter = 0; for (JoinExpression join : joins) { if (join.getTarget() instanceof RelationalPath) { RelationalPath path = (RelationalPath) join.getTarget(); List<Expression<?>> columns; if (path.getPrimaryKey() != null) { columns = path.getPrimaryKey().getLocalColumns(); } else { columns = path.getColumns(); } if (alias) { for (Expression<?> column : columns) { rv.add(ExpressionUtils.as(column, "col" + (++counter))); } } else { rv.addAll(columns); } } else { // not able to provide a distinct list of columns return Collections.emptyList(); } } return rv; } }
java
@SuppressWarnings("unchecked") protected List<Expression<?>> getIdentifierColumns(List<JoinExpression> joins, boolean alias) { if (joins.size() == 1) { JoinExpression join = joins.get(0); if (join.getTarget() instanceof RelationalPath) { return ((RelationalPath) join.getTarget()).getColumns(); } else { return Collections.emptyList(); } } else { List<Expression<?>> rv = Lists.newArrayList(); int counter = 0; for (JoinExpression join : joins) { if (join.getTarget() instanceof RelationalPath) { RelationalPath path = (RelationalPath) join.getTarget(); List<Expression<?>> columns; if (path.getPrimaryKey() != null) { columns = path.getPrimaryKey().getLocalColumns(); } else { columns = path.getColumns(); } if (alias) { for (Expression<?> column : columns) { rv.add(ExpressionUtils.as(column, "col" + (++counter))); } } else { rv.addAll(columns); } } else { // not able to provide a distinct list of columns return Collections.emptyList(); } } return rv; } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "List", "<", "Expression", "<", "?", ">", ">", "getIdentifierColumns", "(", "List", "<", "JoinExpression", ">", "joins", ",", "boolean", "alias", ")", "{", "if", "(", "joins", ".", "size", "(", ")", "==", "1", ")", "{", "JoinExpression", "join", "=", "joins", ".", "get", "(", "0", ")", ";", "if", "(", "join", ".", "getTarget", "(", ")", "instanceof", "RelationalPath", ")", "{", "return", "(", "(", "RelationalPath", ")", "join", ".", "getTarget", "(", ")", ")", ".", "getColumns", "(", ")", ";", "}", "else", "{", "return", "Collections", ".", "emptyList", "(", ")", ";", "}", "}", "else", "{", "List", "<", "Expression", "<", "?", ">", ">", "rv", "=", "Lists", ".", "newArrayList", "(", ")", ";", "int", "counter", "=", "0", ";", "for", "(", "JoinExpression", "join", ":", "joins", ")", "{", "if", "(", "join", ".", "getTarget", "(", ")", "instanceof", "RelationalPath", ")", "{", "RelationalPath", "path", "=", "(", "RelationalPath", ")", "join", ".", "getTarget", "(", ")", ";", "List", "<", "Expression", "<", "?", ">", ">", "columns", ";", "if", "(", "path", ".", "getPrimaryKey", "(", ")", "!=", "null", ")", "{", "columns", "=", "path", ".", "getPrimaryKey", "(", ")", ".", "getLocalColumns", "(", ")", ";", "}", "else", "{", "columns", "=", "path", ".", "getColumns", "(", ")", ";", "}", "if", "(", "alias", ")", "{", "for", "(", "Expression", "<", "?", ">", "column", ":", "columns", ")", "{", "rv", ".", "add", "(", "ExpressionUtils", ".", "as", "(", "column", ",", "\"col\"", "+", "(", "++", "counter", ")", ")", ")", ";", "}", "}", "else", "{", "rv", ".", "addAll", "(", "columns", ")", ";", "}", "}", "else", "{", "// not able to provide a distinct list of columns", "return", "Collections", ".", "emptyList", "(", ")", ";", "}", "}", "return", "rv", ";", "}", "}" ]
Return a list of expressions that can be used to uniquely define the query sources @param joins @return identifier columns
[ "Return", "a", "list", "of", "expressions", "that", "can", "be", "used", "to", "uniquely", "define", "the", "query", "sources" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLSerializer.java#L125-L163
18,128
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilderFactory.java
PathBuilderFactory.create
@SuppressWarnings("unchecked") public <T> PathBuilder<T> create(Class<T> type) { PathBuilder<T> rv = (PathBuilder<T>) paths.get(type); if (rv == null) { rv = new PathBuilder<T>(type, variableName(type)); paths.put(type, rv); } return rv; }
java
@SuppressWarnings("unchecked") public <T> PathBuilder<T> create(Class<T> type) { PathBuilder<T> rv = (PathBuilder<T>) paths.get(type); if (rv == null) { rv = new PathBuilder<T>(type, variableName(type)); paths.put(type, rv); } return rv; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "PathBuilder", "<", "T", ">", "create", "(", "Class", "<", "T", ">", "type", ")", "{", "PathBuilder", "<", "T", ">", "rv", "=", "(", "PathBuilder", "<", "T", ">", ")", "paths", ".", "get", "(", "type", ")", ";", "if", "(", "rv", "==", "null", ")", "{", "rv", "=", "new", "PathBuilder", "<", "T", ">", "(", "type", ",", "variableName", "(", "type", ")", ")", ";", "paths", ".", "put", "(", "type", ",", "rv", ")", ";", "}", "return", "rv", ";", "}" ]
Create a new PathBuilder instance for the given type @param type type of expression @return new PathBuilder instance
[ "Create", "a", "new", "PathBuilder", "instance", "for", "the", "given", "type" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilderFactory.java#L47-L55
18,129
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.bigResult
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C bigResult() { return addFlag(Position.AFTER_SELECT, SQL_BIG_RESULT); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C bigResult() { return addFlag(Position.AFTER_SELECT, SQL_BIG_RESULT); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "bigResult", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "SQL_BIG_RESULT", ")", ";", "}" ]
For SQL_BIG_RESULT, MySQL directly uses disk-based temporary tables if needed, and prefers sorting to using a temporary table with a key on the GROUP BY elements. @return the current object
[ "For", "SQL_BIG_RESULT", "MySQL", "directly", "uses", "disk", "-", "based", "temporary", "tables", "if", "needed", "and", "prefers", "sorting", "to", "using", "a", "temporary", "table", "with", "a", "key", "on", "the", "GROUP", "BY", "elements", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L76-L79
18,130
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.bufferResult
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C bufferResult() { return addFlag(Position.AFTER_SELECT, SQL_BUFFER_RESULT); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C bufferResult() { return addFlag(Position.AFTER_SELECT, SQL_BUFFER_RESULT); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "bufferResult", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "SQL_BUFFER_RESULT", ")", ";", "}" ]
SQL_BUFFER_RESULT forces the result to be put into a temporary table. This helps MySQL free the table locks early and helps in cases where it takes a long time to send the result set to the client. This option can be used only for top-level SELECT statements, not for subqueries or following UNION. @return the current object
[ "SQL_BUFFER_RESULT", "forces", "the", "result", "to", "be", "put", "into", "a", "temporary", "table", ".", "This", "helps", "MySQL", "free", "the", "table", "locks", "early", "and", "helps", "in", "cases", "where", "it", "takes", "a", "long", "time", "to", "send", "the", "result", "set", "to", "the", "client", ".", "This", "option", "can", "be", "used", "only", "for", "top", "-", "level", "SELECT", "statements", "not", "for", "subqueries", "or", "following", "UNION", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L89-L92
18,131
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.cache
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C cache() { return addFlag(Position.AFTER_SELECT, SQL_CACHE); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C cache() { return addFlag(Position.AFTER_SELECT, SQL_CACHE); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "cache", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "SQL_CACHE", ")", ";", "}" ]
SQL_CACHE tells MySQL to store the result in the query cache if it is cacheable and the value of the query_cache_type system variable is 2 or DEMAND. @return the current object
[ "SQL_CACHE", "tells", "MySQL", "to", "store", "the", "result", "in", "the", "query", "cache", "if", "it", "is", "cacheable", "and", "the", "value", "of", "the", "query_cache_type", "system", "variable", "is", "2", "or", "DEMAND", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L100-L103
18,132
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.highPriority
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C highPriority() { return addFlag(Position.AFTER_SELECT, HIGH_PRIORITY); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C highPriority() { return addFlag(Position.AFTER_SELECT, HIGH_PRIORITY); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "highPriority", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "HIGH_PRIORITY", ")", ";", "}" ]
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
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L122-L125
18,133
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.into
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C into(String var) { return addFlag(Position.END, "\ninto " + var); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C into(String var) { return addFlag(Position.END, "\ninto " + var); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "into", "(", "String", "var", ")", "{", "return", "addFlag", "(", "Position", ".", "END", ",", "\"\\ninto \"", "+", "var", ")", ";", "}" ]
SELECT ... INTO var_list selects column values and stores them into variables. @param var variable name @return the current object
[ "SELECT", "...", "INTO", "var_list", "selects", "column", "values", "and", "stores", "them", "into", "variables", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L133-L136
18,134
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.intoOutfile
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C intoOutfile(File file) { return addFlag(Position.END, "\ninto outfile '" + file.getPath() + "'"); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C intoOutfile(File file) { return addFlag(Position.END, "\ninto outfile '" + file.getPath() + "'"); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "intoOutfile", "(", "File", "file", ")", "{", "return", "addFlag", "(", "Position", ".", "END", ",", "\"\\ninto outfile '\"", "+", "file", ".", "getPath", "(", ")", "+", "\"'\"", ")", ";", "}" ]
SELECT ... INTO OUTFILE writes the selected rows to a file. Column and line terminators c an be specified to produce a specific output format. @param file file to write to @return the current object
[ "SELECT", "...", "INTO", "OUTFILE", "writes", "the", "selected", "rows", "to", "a", "file", ".", "Column", "and", "line", "terminators", "c", "an", "be", "specified", "to", "produce", "a", "specific", "output", "format", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L156-L159
18,135
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.lockInShareMode
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C lockInShareMode() { return addFlag(Position.END, LOCK_IN_SHARE_MODE); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C lockInShareMode() { return addFlag(Position.END, LOCK_IN_SHARE_MODE); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "lockInShareMode", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "END", ",", "LOCK_IN_SHARE_MODE", ")", ";", "}" ]
Using LOCK IN SHARE MODE sets a shared lock that permits other transactions to read the examined rows but not to update or delete them. @return the current object
[ "Using", "LOCK", "IN", "SHARE", "MODE", "sets", "a", "shared", "lock", "that", "permits", "other", "transactions", "to", "read", "the", "examined", "rows", "but", "not", "to", "update", "or", "delete", "them", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L167-L170
18,136
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.noCache
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C noCache() { return addFlag(Position.AFTER_SELECT, SQL_NO_CACHE); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C noCache() { return addFlag(Position.AFTER_SELECT, SQL_NO_CACHE); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "noCache", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "SQL_NO_CACHE", ")", ";", "}" ]
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
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L178-L181
18,137
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.smallResult
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C smallResult() { return addFlag(Position.AFTER_SELECT, SQL_SMALL_RESULT); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C smallResult() { return addFlag(Position.AFTER_SELECT, SQL_SMALL_RESULT); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "smallResult", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "SQL_SMALL_RESULT", ")", ";", "}" ]
For SQL_SMALL_RESULT, MySQL uses fast temporary tables to store the resulting table instead of using sorting. This should not normally be needed. @return the current object
[ "For", "SQL_SMALL_RESULT", "MySQL", "uses", "fast", "temporary", "tables", "to", "store", "the", "resulting", "table", "instead", "of", "using", "sorting", ".", "This", "should", "not", "normally", "be", "needed", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L189-L192
18,138
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.straightJoin
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C straightJoin() { return addFlag(Position.AFTER_SELECT, STRAIGHT_JOIN); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C straightJoin() { return addFlag(Position.AFTER_SELECT, STRAIGHT_JOIN); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "straightJoin", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_SELECT", ",", "STRAIGHT_JOIN", ")", ";", "}" ]
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
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L201-L204
18,139
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java
PathMetadataFactory.forDelegate
public static <T> PathMetadata forDelegate(Path<T> delegate) { return new PathMetadata(delegate, delegate, PathType.DELEGATE); }
java
public static <T> PathMetadata forDelegate(Path<T> delegate) { return new PathMetadata(delegate, delegate, PathType.DELEGATE); }
[ "public", "static", "<", "T", ">", "PathMetadata", "forDelegate", "(", "Path", "<", "T", ">", "delegate", ")", "{", "return", "new", "PathMetadata", "(", "delegate", ",", "delegate", ",", "PathType", ".", "DELEGATE", ")", ";", "}" ]
Create a new PathMetadata instance for delegate access @param delegate delegate path @return wrapped path
[ "Create", "a", "new", "PathMetadata", "instance", "for", "delegate", "access" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java#L64-L66
18,140
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java
PathMetadataFactory.forMapAccess
public static <KT> PathMetadata forMapAccess(Path<?> parent, Expression<KT> key) { return new PathMetadata(parent, key, PathType.MAPVALUE); }
java
public static <KT> PathMetadata forMapAccess(Path<?> parent, Expression<KT> key) { return new PathMetadata(parent, key, PathType.MAPVALUE); }
[ "public", "static", "<", "KT", ">", "PathMetadata", "forMapAccess", "(", "Path", "<", "?", ">", "parent", ",", "Expression", "<", "KT", ">", "key", ")", "{", "return", "new", "PathMetadata", "(", "parent", ",", "key", ",", "PathType", ".", "MAPVALUE", ")", ";", "}" ]
Create a new PathMetadata instance for key based map access @param parent parent path @param key key for map access @return map access path
[ "Create", "a", "new", "PathMetadata", "instance", "for", "key", "based", "map", "access" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java#L97-L99
18,141
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java
PathMetadataFactory.forMapAccess
public static <KT> PathMetadata forMapAccess(Path<?> parent, KT key) { return new PathMetadata(parent, key, PathType.MAPVALUE_CONSTANT); }
java
public static <KT> PathMetadata forMapAccess(Path<?> parent, KT key) { return new PathMetadata(parent, key, PathType.MAPVALUE_CONSTANT); }
[ "public", "static", "<", "KT", ">", "PathMetadata", "forMapAccess", "(", "Path", "<", "?", ">", "parent", ",", "KT", "key", ")", "{", "return", "new", "PathMetadata", "(", "parent", ",", "key", ",", "PathType", ".", "MAPVALUE_CONSTANT", ")", ";", "}" ]
Create a new PathMetadata instance for for key based map access @param parent parent path @param key key for map access @return map access path
[ "Create", "a", "new", "PathMetadata", "instance", "for", "for", "key", "based", "map", "access" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java#L108-L110
18,142
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java
PathMetadataFactory.forProperty
public static PathMetadata forProperty(Path<?> parent, String property) { return new PathMetadata(parent, property, PathType.PROPERTY); }
java
public static PathMetadata forProperty(Path<?> parent, String property) { return new PathMetadata(parent, property, PathType.PROPERTY); }
[ "public", "static", "PathMetadata", "forProperty", "(", "Path", "<", "?", ">", "parent", ",", "String", "property", ")", "{", "return", "new", "PathMetadata", "(", "parent", ",", "property", ",", "PathType", ".", "PROPERTY", ")", ";", "}" ]
Create a new PathMetadata instance for property access @param parent parent path @param property property name @return property path
[ "Create", "a", "new", "PathMetadata", "instance", "for", "property", "access" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/PathMetadataFactory.java#L119-L121
18,143
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java
BeanMap.put
@Override public Object put(String name, Object value) { if (bean != null) { Object oldValue = get(name); Method method = getWriteMethod(name); if (method == null) { throw new IllegalArgumentException("The bean of type: " + bean.getClass().getName() + " has no property called: " + name); } try { Object[] arguments = createWriteMethodArguments(method, value); method.invoke(bean, arguments); Object newValue = get(name); firePropertyChange(name, oldValue, newValue); } catch (InvocationTargetException e) { throw new IllegalArgumentException(e.getMessage()); } catch (IllegalAccessException e) { throw new IllegalArgumentException(e.getMessage()); } return oldValue; } return null; }
java
@Override public Object put(String name, Object value) { if (bean != null) { Object oldValue = get(name); Method method = getWriteMethod(name); if (method == null) { throw new IllegalArgumentException("The bean of type: " + bean.getClass().getName() + " has no property called: " + name); } try { Object[] arguments = createWriteMethodArguments(method, value); method.invoke(bean, arguments); Object newValue = get(name); firePropertyChange(name, oldValue, newValue); } catch (InvocationTargetException e) { throw new IllegalArgumentException(e.getMessage()); } catch (IllegalAccessException e) { throw new IllegalArgumentException(e.getMessage()); } return oldValue; } return null; }
[ "@", "Override", "public", "Object", "put", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "bean", "!=", "null", ")", "{", "Object", "oldValue", "=", "get", "(", "name", ")", ";", "Method", "method", "=", "getWriteMethod", "(", "name", ")", ";", "if", "(", "method", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The bean of type: \"", "+", "bean", ".", "getClass", "(", ")", ".", "getName", "(", ")", "+", "\" has no property called: \"", "+", "name", ")", ";", "}", "try", "{", "Object", "[", "]", "arguments", "=", "createWriteMethodArguments", "(", "method", ",", "value", ")", ";", "method", ".", "invoke", "(", "bean", ",", "arguments", ")", ";", "Object", "newValue", "=", "get", "(", "name", ")", ";", "firePropertyChange", "(", "name", ",", "oldValue", ",", "newValue", ")", ";", "}", "catch", "(", "InvocationTargetException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "e", ".", "getMessage", "(", ")", ")", ";", "}", "catch", "(", "IllegalAccessException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "e", ".", "getMessage", "(", ")", ")", ";", "}", "return", "oldValue", ";", "}", "return", "null", ";", "}" ]
Sets the bean property with the given name to the given value. @param name the name of the property to set @param value the value to set that property to @return the previous value of that property
[ "Sets", "the", "bean", "property", "with", "the", "given", "name", "to", "the", "given", "value", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java#L308-L330
18,144
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java
BeanMap.values
@Override public Collection<Object> values() { List<Object> answer = new ArrayList<Object>(readMethods.size()); for (Iterator<Object> iter = valueIterator(); iter.hasNext();) { answer.add(iter.next()); } return answer; }
java
@Override public Collection<Object> values() { List<Object> answer = new ArrayList<Object>(readMethods.size()); for (Iterator<Object> iter = valueIterator(); iter.hasNext();) { answer.add(iter.next()); } return answer; }
[ "@", "Override", "public", "Collection", "<", "Object", ">", "values", "(", ")", "{", "List", "<", "Object", ">", "answer", "=", "new", "ArrayList", "<", "Object", ">", "(", "readMethods", ".", "size", "(", ")", ")", ";", "for", "(", "Iterator", "<", "Object", ">", "iter", "=", "valueIterator", "(", ")", ";", "iter", ".", "hasNext", "(", ")", ";", ")", "{", "answer", ".", "add", "(", "iter", ".", "next", "(", ")", ")", ";", "}", "return", "answer", ";", "}" ]
Returns the values for the BeanMap. @return values for the BeanMap. The returned collection is not modifiable.
[ "Returns", "the", "values", "for", "the", "BeanMap", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java#L386-L393
18,145
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java
BeanMap.entryIterator
public Iterator<Entry<String, Object>> entryIterator() { final Iterator<String> iter = keyIterator(); return new Iterator<Entry<String, Object>>() { @Override public boolean hasNext() { return iter.hasNext(); } @Override public Entry<String, Object> next() { String key = iter.next(); Object value = get(key); return new MyMapEntry(BeanMap.this, key, value); } @Override public void remove() { throw new UnsupportedOperationException("remove() not supported for BeanMap"); } }; }
java
public Iterator<Entry<String, Object>> entryIterator() { final Iterator<String> iter = keyIterator(); return new Iterator<Entry<String, Object>>() { @Override public boolean hasNext() { return iter.hasNext(); } @Override public Entry<String, Object> next() { String key = iter.next(); Object value = get(key); return new MyMapEntry(BeanMap.this, key, value); } @Override public void remove() { throw new UnsupportedOperationException("remove() not supported for BeanMap"); } }; }
[ "public", "Iterator", "<", "Entry", "<", "String", ",", "Object", ">", ">", "entryIterator", "(", ")", "{", "final", "Iterator", "<", "String", ">", "iter", "=", "keyIterator", "(", ")", ";", "return", "new", "Iterator", "<", "Entry", "<", "String", ",", "Object", ">", ">", "(", ")", "{", "@", "Override", "public", "boolean", "hasNext", "(", ")", "{", "return", "iter", ".", "hasNext", "(", ")", ";", "}", "@", "Override", "public", "Entry", "<", "String", ",", "Object", ">", "next", "(", ")", "{", "String", "key", "=", "iter", ".", "next", "(", ")", ";", "Object", "value", "=", "get", "(", "key", ")", ";", "return", "new", "MyMapEntry", "(", "BeanMap", ".", "this", ",", "key", ",", "value", ")", ";", "}", "@", "Override", "public", "void", "remove", "(", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"remove() not supported for BeanMap\"", ")", ";", "}", "}", ";", "}" ]
Convenience method for getting an iterator over the entries. @return an iterator over the entries
[ "Convenience", "method", "for", "getting", "an", "iterator", "over", "the", "entries", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java#L452-L472
18,146
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/QueryModifiers.java
QueryModifiers.subList
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; } }
java
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; } }
[ "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", ";", "}", "}" ]
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
[ "Get", "a", "sublist", "based", "on", "the", "restriction", "of", "limit", "and", "offset" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/QueryModifiers.java#L114-L122
18,147
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java
PointExpression.x
public NumberExpression<Double> x() { if (x == null) { x = Expressions.numberOperation(Double.class, SpatialOps.X, mixin); } return x; }
java
public NumberExpression<Double> x() { if (x == null) { x = Expressions.numberOperation(Double.class, SpatialOps.X, mixin); } return x; }
[ "public", "NumberExpression", "<", "Double", ">", "x", "(", ")", "{", "if", "(", "x", "==", "null", ")", "{", "x", "=", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "X", ",", "mixin", ")", ";", "}", "return", "x", ";", "}" ]
The x-coordinate value for this Point. @return x-coordinate
[ "The", "x", "-", "coordinate", "value", "for", "this", "Point", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java#L49-L54
18,148
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java
PointExpression.y
public NumberExpression<Double> y() { if (y == null) { y = Expressions.numberOperation(Double.class, SpatialOps.Y, mixin); } return y; }
java
public NumberExpression<Double> y() { if (y == null) { y = Expressions.numberOperation(Double.class, SpatialOps.Y, mixin); } return y; }
[ "public", "NumberExpression", "<", "Double", ">", "y", "(", ")", "{", "if", "(", "y", "==", "null", ")", "{", "y", "=", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "Y", ",", "mixin", ")", ";", "}", "return", "y", ";", "}" ]
The y-coordinate value for this Point. @return y-coordinate
[ "The", "y", "-", "coordinate", "value", "for", "this", "Point", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java#L61-L66
18,149
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java
PointExpression.z
public NumberExpression<Double> z() { if (z == null) { z = Expressions.numberOperation(Double.class, SpatialOps.Z, mixin); } return z; }
java
public NumberExpression<Double> z() { if (z == null) { z = Expressions.numberOperation(Double.class, SpatialOps.Z, mixin); } return z; }
[ "public", "NumberExpression", "<", "Double", ">", "z", "(", ")", "{", "if", "(", "z", "==", "null", ")", "{", "z", "=", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "Z", ",", "mixin", ")", ";", "}", "return", "z", ";", "}" ]
The z-coordinate value for this Point, if it has one. Returns NIL otherwise. @return z-coordinate
[ "The", "z", "-", "coordinate", "value", "for", "this", "Point", "if", "it", "has", "one", ".", "Returns", "NIL", "otherwise", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java#L73-L78
18,150
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java
PointExpression.m
public NumberExpression<Double> m() { if (m == null) { m = Expressions.numberOperation(Double.class, SpatialOps.M, mixin); } return m; }
java
public NumberExpression<Double> m() { if (m == null) { m = Expressions.numberOperation(Double.class, SpatialOps.M, mixin); } return m; }
[ "public", "NumberExpression", "<", "Double", ">", "m", "(", ")", "{", "if", "(", "m", "==", "null", ")", "{", "m", "=", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "M", ",", "mixin", ")", ";", "}", "return", "m", ";", "}" ]
The m-coordinate value for this Point, if it has one. Returns NIL otherwise. @return m-coordinate
[ "The", "m", "-", "coordinate", "value", "for", "this", "Point", "if", "it", "has", "one", ".", "Returns", "NIL", "otherwise", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PointExpression.java#L85-L90
18,151
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLBindings.java
SQLBindings.getBindings
@Deprecated public ImmutableList<Object> getBindings() { final ImmutableList.Builder<Object> builder = ImmutableList.builder(); for (Object o : getNullFriendlyBindings()) { if (o != null) { builder.add(o); } } return builder.build(); }
java
@Deprecated public ImmutableList<Object> getBindings() { final ImmutableList.Builder<Object> builder = ImmutableList.builder(); for (Object o : getNullFriendlyBindings()) { if (o != null) { builder.add(o); } } return builder.build(); }
[ "@", "Deprecated", "public", "ImmutableList", "<", "Object", ">", "getBindings", "(", ")", "{", "final", "ImmutableList", ".", "Builder", "<", "Object", ">", "builder", "=", "ImmutableList", ".", "builder", "(", ")", ";", "for", "(", "Object", "o", ":", "getNullFriendlyBindings", "(", ")", ")", "{", "if", "(", "o", "!=", "null", ")", "{", "builder", ".", "add", "(", "o", ")", ";", "}", "}", "return", "builder", ".", "build", "(", ")", ";", "}" ]
Returns the bindings for this instance. @deprecated use {@link #getNullFriendlyBindings()} instead - this method is broken as null is a meaningful element and ImmutableList is null-hostile. @return an ImmutableList copy of the contents of {@link #getNullFriendlyBindings()}, with nulls removed
[ "Returns", "the", "bindings", "for", "this", "instance", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLBindings.java#L63-L73
18,152
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/MultiSurfaceExpression.java
MultiSurfaceExpression.centroid
public PointExpression<Point> centroid() { if (centroid == null) { centroid = GeometryExpressions.pointOperation(SpatialOps.CENTROID, mixin); } return centroid; }
java
public PointExpression<Point> centroid() { if (centroid == null) { centroid = GeometryExpressions.pointOperation(SpatialOps.CENTROID, mixin); } return centroid; }
[ "public", "PointExpression", "<", "Point", ">", "centroid", "(", ")", "{", "if", "(", "centroid", "==", "null", ")", "{", "centroid", "=", "GeometryExpressions", ".", "pointOperation", "(", "SpatialOps", ".", "CENTROID", ",", "mixin", ")", ";", "}", "return", "centroid", ";", "}" ]
The mathematical centroid for this MultiSurface. The result is not guaranteed to be on this MultiSurface. @return centroid
[ "The", "mathematical", "centroid", "for", "this", "MultiSurface", ".", "The", "result", "is", "not", "guaranteed", "to", "be", "on", "this", "MultiSurface", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/MultiSurfaceExpression.java#L68-L73
18,153
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/MultiSurfaceExpression.java
MultiSurfaceExpression.pointOnSurface
public PointExpression<Point> pointOnSurface() { if (pointOnSurface == null) { pointOnSurface = GeometryExpressions.pointOperation(SpatialOps.POINT_ON_SURFACE, mixin); } return pointOnSurface; }
java
public PointExpression<Point> pointOnSurface() { if (pointOnSurface == null) { pointOnSurface = GeometryExpressions.pointOperation(SpatialOps.POINT_ON_SURFACE, mixin); } return pointOnSurface; }
[ "public", "PointExpression", "<", "Point", ">", "pointOnSurface", "(", ")", "{", "if", "(", "pointOnSurface", "==", "null", ")", "{", "pointOnSurface", "=", "GeometryExpressions", ".", "pointOperation", "(", "SpatialOps", ".", "POINT_ON_SURFACE", ",", "mixin", ")", ";", "}", "return", "pointOnSurface", ";", "}" ]
A Point guaranteed to be on this MultiSurface. @return point on surface
[ "A", "Point", "guaranteed", "to", "be", "on", "this", "MultiSurface", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/MultiSurfaceExpression.java#L80-L85
18,154
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java
BeanPath.as
@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 rv; // the inits for the subtype will be wider, if it's a variable path if (inits != null && pathMixin.getMetadata().getPathType() != PathType.VARIABLE) { rv = clazz.getConstructor(PathMetadata.class, PathInits.class).newInstance(metadata, inits); } else { rv = clazz.getConstructor(PathMetadata.class).newInstance(metadata); } casts.put(clazz, rv); return rv; } else { return (U) casts.get(clazz); } } 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); } }
java
@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 rv; // the inits for the subtype will be wider, if it's a variable path if (inits != null && pathMixin.getMetadata().getPathType() != PathType.VARIABLE) { rv = clazz.getConstructor(PathMetadata.class, PathInits.class).newInstance(metadata, inits); } else { rv = clazz.getConstructor(PathMetadata.class).newInstance(metadata); } casts.put(clazz, rv); return rv; } else { return (U) casts.get(clazz); } } 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); } }
[ "@", "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", "rv", ";", "// the inits for the subtype will be wider, if it's a variable path", "if", "(", "inits", "!=", "null", "&&", "pathMixin", ".", "getMetadata", "(", ")", ".", "getPathType", "(", ")", "!=", "PathType", ".", "VARIABLE", ")", "{", "rv", "=", "clazz", ".", "getConstructor", "(", "PathMetadata", ".", "class", ",", "PathInits", ".", "class", ")", ".", "newInstance", "(", "metadata", ",", "inits", ")", ";", "}", "else", "{", "rv", "=", "clazz", ".", "getConstructor", "(", "PathMetadata", ".", "class", ")", ".", "newInstance", "(", "metadata", ")", ";", "}", "casts", ".", "put", "(", "clazz", ",", "rv", ")", ";", "return", "rv", ";", "}", "else", "{", "return", "(", "U", ")", "casts", ".", "get", "(", "clazz", ")", ";", "}", "}", "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", ")", ";", "}", "}" ]
Cast the path to a subtype querytype @param <U> @param clazz subtype class @return subtype instance with the same identity
[ "Cast", "the", "path", "to", "a", "subtype", "querytype" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java#L74-L106
18,155
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java
BeanPath.createArray
protected <A, E> ArrayPath<A, E> createArray(String property, Class<? super A> type) { return add(new ArrayPath<A, E>(type, forProperty(property))); }
java
protected <A, E> ArrayPath<A, E> createArray(String property, Class<? super A> type) { return add(new ArrayPath<A, E>(type, forProperty(property))); }
[ "protected", "<", "A", ",", "E", ">", "ArrayPath", "<", "A", ",", "E", ">", "createArray", "(", "String", "property", ",", "Class", "<", "?", "super", "A", ">", "type", ")", "{", "return", "add", "(", "new", "ArrayPath", "<", "A", ",", "E", ">", "(", "type", ",", "forProperty", "(", "property", ")", ")", ")", ";", "}" ]
Create a new array path @param <A> @param property property name @param type property type @return property path
[ "Create", "a", "new", "array", "path" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java#L127-L129
18,156
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java
BeanPath.createNumber
@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))); }
java
@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))); }
[ "@", "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", ")", ")", ")", ";", "}" ]
Create a new Number path @param <A> @param property property name @param type property type @return property path
[ "Create", "a", "new", "Number", "path" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java#L246-L249
18,157
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java
BeanPath.createTime
@SuppressWarnings("unchecked") protected <A extends Comparable> TimePath<A> createTime(String property, Class<? super A> type) { return add(new TimePath<A>((Class) type, forProperty(property))); }
java
@SuppressWarnings("unchecked") protected <A extends Comparable> TimePath<A> createTime(String property, Class<? super A> type) { return add(new TimePath<A>((Class) type, forProperty(property))); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "A", "extends", "Comparable", ">", "TimePath", "<", "A", ">", "createTime", "(", "String", "property", ",", "Class", "<", "?", "super", "A", ">", "type", ")", "{", "return", "add", "(", "new", "TimePath", "<", "A", ">", "(", "(", "Class", ")", "type", ",", "forProperty", "(", "property", ")", ")", ")", ";", "}" ]
Create a new Time path @param <A> @param property property name @param type property type @return property path
[ "Create", "a", "new", "Time", "path" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java#L295-L298
18,158
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.setSRID
public static <T extends Geometry> JTSGeometryExpression<T> setSRID(Expression<T> expr, int srid) { return geometryOperation(expr.getType(), SpatialOps.SET_SRID, expr, ConstantImpl.create(srid)); }
java
public static <T extends Geometry> JTSGeometryExpression<T> setSRID(Expression<T> expr, int srid) { return geometryOperation(expr.getType(), SpatialOps.SET_SRID, expr, ConstantImpl.create(srid)); }
[ "public", "static", "<", "T", "extends", "Geometry", ">", "JTSGeometryExpression", "<", "T", ">", "setSRID", "(", "Expression", "<", "T", ">", "expr", ",", "int", "srid", ")", "{", "return", "geometryOperation", "(", "expr", ".", "getType", "(", ")", ",", "SpatialOps", ".", "SET_SRID", ",", "expr", ",", "ConstantImpl", ".", "create", "(", "srid", ")", ")", ";", "}" ]
Sets the SRID on a geometry to a particular integer value. @param expr geometry @param srid SRID @param <T> @return geometry
[ "Sets", "the", "SRID", "on", "a", "geometry", "to", "a", "particular", "integer", "value", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L73-L76
18,159
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.xmin
public static NumberExpression<Double> xmin(JTSGeometryExpression<?> expr) { return Expressions.numberOperation(Double.class, SpatialOps.XMIN, expr); }
java
public static NumberExpression<Double> xmin(JTSGeometryExpression<?> expr) { return Expressions.numberOperation(Double.class, SpatialOps.XMIN, expr); }
[ "public", "static", "NumberExpression", "<", "Double", ">", "xmin", "(", "JTSGeometryExpression", "<", "?", ">", "expr", ")", "{", "return", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "XMIN", ",", "expr", ")", ";", "}" ]
Returns X minima of a bounding box 2d or 3d or a geometry. @param expr geometry @return x minima
[ "Returns", "X", "minima", "of", "a", "bounding", "box", "2d", "or", "3d", "or", "a", "geometry", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L84-L86
18,160
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.xmax
public static NumberExpression<Double> xmax(JTSGeometryExpression<?> expr) { return Expressions.numberOperation(Double.class, SpatialOps.XMAX, expr); }
java
public static NumberExpression<Double> xmax(JTSGeometryExpression<?> expr) { return Expressions.numberOperation(Double.class, SpatialOps.XMAX, expr); }
[ "public", "static", "NumberExpression", "<", "Double", ">", "xmax", "(", "JTSGeometryExpression", "<", "?", ">", "expr", ")", "{", "return", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "XMAX", ",", "expr", ")", ";", "}" ]
Returns X maxima of a bounding box 2d or 3d or a geometry. @param expr geometry @return x maxima
[ "Returns", "X", "maxima", "of", "a", "bounding", "box", "2d", "or", "3d", "or", "a", "geometry", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L94-L96
18,161
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.ymin
public static NumberExpression<Double> ymin(JTSGeometryExpression<?> expr) { return Expressions.numberOperation(Double.class, SpatialOps.YMIN, expr); }
java
public static NumberExpression<Double> ymin(JTSGeometryExpression<?> expr) { return Expressions.numberOperation(Double.class, SpatialOps.YMIN, expr); }
[ "public", "static", "NumberExpression", "<", "Double", ">", "ymin", "(", "JTSGeometryExpression", "<", "?", ">", "expr", ")", "{", "return", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "SpatialOps", ".", "YMIN", ",", "expr", ")", ";", "}" ]
Returns Y minima of a bounding box 2d or 3d or a geometry. @param expr geometry @return y minima
[ "Returns", "Y", "minima", "of", "a", "bounding", "box", "2d", "or", "3d", "or", "a", "geometry", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L104-L106
18,162
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.collect
public static JTSGeometryExpression<?> collect(Expression<? extends Geometry> expr1, Expression<? extends Geometry> expr2) { return geometryOperation(SpatialOps.COLLECT2, expr1, expr2); }
java
public static JTSGeometryExpression<?> collect(Expression<? extends Geometry> expr1, Expression<? extends Geometry> expr2) { return geometryOperation(SpatialOps.COLLECT2, expr1, expr2); }
[ "public", "static", "JTSGeometryExpression", "<", "?", ">", "collect", "(", "Expression", "<", "?", "extends", "Geometry", ">", "expr1", ",", "Expression", "<", "?", "extends", "Geometry", ">", "expr2", ")", "{", "return", "geometryOperation", "(", "SpatialOps", ".", "COLLECT2", ",", "expr1", ",", "expr2", ")", ";", "}" ]
Return a specified ST_Geometry value from a collection of other geometries. @param expr1 geometry @param expr2 other geometry @return geometry collection
[ "Return", "a", "specified", "ST_Geometry", "value", "from", "a", "collection", "of", "other", "geometries", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L173-L175
18,163
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.translate
public static <T extends Geometry> JTSGeometryExpression<T> translate(Expression<T> expr, float deltax, float deltay) { return geometryOperation(expr.getType(), SpatialOps.TRANSLATE, expr, ConstantImpl.create(deltax), ConstantImpl.create(deltay)); }
java
public static <T extends Geometry> JTSGeometryExpression<T> translate(Expression<T> expr, float deltax, float deltay) { return geometryOperation(expr.getType(), SpatialOps.TRANSLATE, expr, ConstantImpl.create(deltax), ConstantImpl.create(deltay)); }
[ "public", "static", "<", "T", "extends", "Geometry", ">", "JTSGeometryExpression", "<", "T", ">", "translate", "(", "Expression", "<", "T", ">", "expr", ",", "float", "deltax", ",", "float", "deltay", ")", "{", "return", "geometryOperation", "(", "expr", ".", "getType", "(", ")", ",", "SpatialOps", ".", "TRANSLATE", ",", "expr", ",", "ConstantImpl", ".", "create", "(", "deltax", ")", ",", "ConstantImpl", ".", "create", "(", "deltay", ")", ")", ";", "}" ]
Translates the geometry to a new location using the numeric parameters as offsets. @param expr geometry @param deltax x offset @param deltay y offset @param <T> @return geometry
[ "Translates", "the", "geometry", "to", "a", "new", "location", "using", "the", "numeric", "parameters", "as", "offsets", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L186-L189
18,164
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java
SQLMergeClause.addFlag
public SQLMergeClause addFlag(Position position, String flag) { metadata.addFlag(new QueryFlag(position, flag)); return this; }
java
public SQLMergeClause addFlag(Position position, String flag) { metadata.addFlag(new QueryFlag(position, flag)); return this; }
[ "public", "SQLMergeClause", "addFlag", "(", "Position", "position", ",", "String", "flag", ")", "{", "metadata", ".", "addFlag", "(", "new", "QueryFlag", "(", "position", ",", "flag", ")", ")", ";", "return", "this", ";", "}" ]
Add the given String literal at the given position as a query flag @param position position @param flag query flag @return the current object
[ "Add", "the", "given", "String", "literal", "at", "the", "given", "position", "as", "a", "query", "flag" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java#L88-L91
18,165
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java
SQLMergeClause.executeWithKey
@SuppressWarnings("unchecked") @Nullable public <T> T executeWithKey(Path<T> path) { return executeWithKey((Class<T>) path.getType(), path); }
java
@SuppressWarnings("unchecked") @Nullable public <T> T executeWithKey(Path<T> path) { return executeWithKey((Class<T>) path.getType(), path); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Nullable", "public", "<", "T", ">", "T", "executeWithKey", "(", "Path", "<", "T", ">", "path", ")", "{", "return", "executeWithKey", "(", "(", "Class", "<", "T", ">", ")", "path", ".", "getType", "(", ")", ",", "path", ")", ";", "}" ]
Execute the clause and return the generated key with the type of the given path. If no rows were created, null is returned, otherwise the key of the first row is returned. @param <T> @param path path for key @return generated key
[ "Execute", "the", "clause", "and", "return", "the", "generated", "key", "with", "the", "type", "of", "the", "given", "path", ".", "If", "no", "rows", "were", "created", "null", "is", "returned", "otherwise", "the", "key", "of", "the", "first", "row", "is", "returned", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java#L155-L159
18,166
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java
SQLMergeClause.executeWithKeys
@SuppressWarnings("unchecked") public <T> List<T> executeWithKeys(Path<T> path) { return executeWithKeys((Class<T>) path.getType(), path); }
java
@SuppressWarnings("unchecked") public <T> List<T> executeWithKeys(Path<T> path) { return executeWithKeys((Class<T>) path.getType(), path); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "List", "<", "T", ">", "executeWithKeys", "(", "Path", "<", "T", ">", "path", ")", "{", "return", "executeWithKeys", "(", "(", "Class", "<", "T", ">", ")", "path", ".", "getType", "(", ")", ",", "path", ")", ";", "}" ]
Execute the clause and return the generated key with the type of the given path. If no rows were created, or the referenced column is not a generated key, null is returned. Otherwise, the key of the first row is returned. @param <T> @param path path for key @return generated keys
[ "Execute", "the", "clause", "and", "return", "the", "generated", "key", "with", "the", "type", "of", "the", "given", "path", ".", "If", "no", "rows", "were", "created", "or", "the", "referenced", "column", "is", "not", "a", "generated", "key", "null", "is", "returned", ".", "Otherwise", "the", "key", "of", "the", "first", "row", "is", "returned", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java#L197-L200
18,167
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLUpdateClause.java
AbstractSQLUpdateClause.populate
@SuppressWarnings("unchecked") @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true) public C populate(Object bean) { return populate(bean, DefaultMapper.DEFAULT); }
java
@SuppressWarnings("unchecked") @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true) public C populate(Object bean) { return populate(bean, DefaultMapper.DEFAULT); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "WithBridgeMethods", "(", "value", "=", "SQLUpdateClause", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "populate", "(", "Object", "bean", ")", "{", "return", "populate", "(", "bean", ",", "DefaultMapper", ".", "DEFAULT", ")", ";", "}" ]
Populate the UPDATE clause with the properties of the given bean. The properties need to match the fields of the clause's entity instance. Primary key columns are skipped in the population. @param bean bean to use for population @return the current object
[ "Populate", "the", "UPDATE", "clause", "with", "the", "properties", "of", "the", "given", "bean", ".", "The", "properties", "need", "to", "match", "the", "fields", "of", "the", "clause", "s", "entity", "instance", ".", "Primary", "key", "columns", "are", "skipped", "in", "the", "population", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLUpdateClause.java#L333-L337
18,168
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLUpdateClause.java
AbstractSQLUpdateClause.populate
@SuppressWarnings({ "rawtypes", "unchecked" }) @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true) 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; }
java
@SuppressWarnings({ "rawtypes", "unchecked" }) @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true) 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; }
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "@", "WithBridgeMethods", "(", "value", "=", "SQLUpdateClause", ".", "class", ",", "castRequired", "=", "true", ")", "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", ";", "}" ]
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
[ "Populate", "the", "UPDATE", "clause", "with", "the", "properties", "of", "the", "given", "bean", "using", "the", "given", "Mapper", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLUpdateClause.java#L346-L359
18,169
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.allOf
public static BooleanExpression allOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = rv == null ? b : rv.and(b); } return rv; }
java
public static BooleanExpression allOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = rv == null ? b : rv.and(b); } return rv; }
[ "public", "static", "BooleanExpression", "allOf", "(", "BooleanExpression", "...", "exprs", ")", "{", "BooleanExpression", "rv", "=", "null", ";", "for", "(", "BooleanExpression", "b", ":", "exprs", ")", "{", "rv", "=", "rv", "==", "null", "?", "b", ":", "rv", ".", "and", "(", "b", ")", ";", "}", "return", "rv", ";", "}" ]
Get the intersection of the given Boolean expressions @param exprs predicates @return intersection of predicates
[ "Get", "the", "intersection", "of", "the", "given", "Boolean", "expressions" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L108-L114
18,170
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.anyOf
public static BooleanExpression anyOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = rv == null ? b : rv.or(b); } return rv; }
java
public static BooleanExpression anyOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = rv == null ? b : rv.or(b); } return rv; }
[ "public", "static", "BooleanExpression", "anyOf", "(", "BooleanExpression", "...", "exprs", ")", "{", "BooleanExpression", "rv", "=", "null", ";", "for", "(", "BooleanExpression", "b", ":", "exprs", ")", "{", "rv", "=", "rv", "==", "null", "?", "b", ":", "rv", ".", "or", "(", "b", ")", ";", "}", "return", "rv", ";", "}" ]
Get the union of the given Boolean expressions @param exprs predicates @return union of predicates
[ "Get", "the", "union", "of", "the", "given", "Boolean", "expressions" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L122-L128
18,171
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.numberPath
public static <T extends Number & Comparable<?>> NumberPath<T> numberPath(Class<? extends T> type, PathMetadata metadata) { return new NumberPath<T>(type, metadata); }
java
public static <T extends Number & Comparable<?>> NumberPath<T> numberPath(Class<? extends T> type, PathMetadata metadata) { return new NumberPath<T>(type, metadata); }
[ "public", "static", "<", "T", "extends", "Number", "&", "Comparable", "<", "?", ">", ">", "NumberPath", "<", "T", ">", "numberPath", "(", "Class", "<", "?", "extends", "T", ">", "type", ",", "PathMetadata", "metadata", ")", "{", "return", "new", "NumberPath", "<", "T", ">", "(", "type", ",", "metadata", ")", ";", "}" ]
Create new Path expression @param type type of expression @param metadata path metadata @param <T> type of expression @return path expression
[ "Create", "new", "Path", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1485-L1487
18,172
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.list
@SuppressWarnings("unchecked") public static <T> SimpleExpression<T> list(Class<T> clazz, SimpleExpression<?>... exprs) { SimpleExpression<T> rv = (SimpleExpression<T>) exprs[0]; for (int i = 1; i < exprs.length; i++) { rv = new SimpleOperation<T>(clazz, Ops.LIST, rv, exprs[i]); } return rv; }
java
@SuppressWarnings("unchecked") public static <T> SimpleExpression<T> list(Class<T> clazz, SimpleExpression<?>... exprs) { SimpleExpression<T> rv = (SimpleExpression<T>) exprs[0]; for (int i = 1; i < exprs.length; i++) { rv = new SimpleOperation<T>(clazz, Ops.LIST, rv, exprs[i]); } return rv; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "SimpleExpression", "<", "T", ">", "list", "(", "Class", "<", "T", ">", "clazz", ",", "SimpleExpression", "<", "?", ">", "...", "exprs", ")", "{", "SimpleExpression", "<", "T", ">", "rv", "=", "(", "SimpleExpression", "<", "T", ">", ")", "exprs", "[", "0", "]", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "exprs", ".", "length", ";", "i", "++", ")", "{", "rv", "=", "new", "SimpleOperation", "<", "T", ">", "(", "clazz", ",", "Ops", ".", "LIST", ",", "rv", ",", "exprs", "[", "i", "]", ")", ";", "}", "return", "rv", ";", "}" ]
Combine the given expressions into a list expression @param clazz type of list expression @param exprs list elements @return list expression
[ "Combine", "the", "given", "expressions", "into", "a", "list", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1577-L1584
18,173
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.set
@SuppressWarnings("unchecked") public static <T> SimpleExpression<T> set(Class<T> clazz, SimpleExpression<?>... exprs) { SimpleExpression<T> rv = (SimpleExpression<T>) exprs[0]; for (int i = 1; i < exprs.length; i++) { rv = new SimpleOperation<T>(clazz, Ops.SET, rv, exprs[i]); } return rv; }
java
@SuppressWarnings("unchecked") public static <T> SimpleExpression<T> set(Class<T> clazz, SimpleExpression<?>... exprs) { SimpleExpression<T> rv = (SimpleExpression<T>) exprs[0]; for (int i = 1; i < exprs.length; i++) { rv = new SimpleOperation<T>(clazz, Ops.SET, rv, exprs[i]); } return rv; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "SimpleExpression", "<", "T", ">", "set", "(", "Class", "<", "T", ">", "clazz", ",", "SimpleExpression", "<", "?", ">", "...", "exprs", ")", "{", "SimpleExpression", "<", "T", ">", "rv", "=", "(", "SimpleExpression", "<", "T", ">", ")", "exprs", "[", "0", "]", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "exprs", ".", "length", ";", "i", "++", ")", "{", "rv", "=", "new", "SimpleOperation", "<", "T", ">", "(", "clazz", ",", "Ops", ".", "SET", ",", "rv", ",", "exprs", "[", "i", "]", ")", ";", "}", "return", "rv", ";", "}" ]
Combine the given expressions into a set expression @param clazz type of list expression @param exprs list elements @return list expression
[ "Combine", "the", "given", "expressions", "into", "a", "set", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1610-L1617
18,174
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.enumOperation
public static <T extends Enum<T>> EnumOperation<T> enumOperation(Class<? extends T> type, Operator operator, Expression<?>... args) { return new EnumOperation<T>(type, operator, args); }
java
public static <T extends Enum<T>> EnumOperation<T> enumOperation(Class<? extends T> type, Operator operator, Expression<?>... args) { return new EnumOperation<T>(type, operator, args); }
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "EnumOperation", "<", "T", ">", "enumOperation", "(", "Class", "<", "?", "extends", "T", ">", "type", ",", "Operator", "operator", ",", "Expression", "<", "?", ">", "...", "args", ")", "{", "return", "new", "EnumOperation", "<", "T", ">", "(", "type", ",", "operator", ",", "args", ")", ";", "}" ]
Create a new Enum operation expression @param type type of expression @param operator operator @param args operation arguments @param <T> type of expression @return operation expression
[ "Create", "a", "new", "Enum", "operation", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1696-L1699
18,175
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.collectionOperation
public static <T> CollectionExpression<Collection<T>, T> collectionOperation(Class<T> elementType, Operator operator, Expression<?>... args) { return new CollectionOperation<T>(elementType, operator, args); }
java
public static <T> CollectionExpression<Collection<T>, T> collectionOperation(Class<T> elementType, Operator operator, Expression<?>... args) { return new CollectionOperation<T>(elementType, operator, args); }
[ "public", "static", "<", "T", ">", "CollectionExpression", "<", "Collection", "<", "T", ">", ",", "T", ">", "collectionOperation", "(", "Class", "<", "T", ">", "elementType", ",", "Operator", "operator", ",", "Expression", "<", "?", ">", "...", "args", ")", "{", "return", "new", "CollectionOperation", "<", "T", ">", "(", "elementType", ",", "operator", ",", "args", ")", ";", "}" ]
Create a new Collection operation expression @param elementType element type @param operator operator @param args operation arguments @param <T> type of expression @return operation expression
[ "Create", "a", "new", "Collection", "operation", "expression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1745-L1748
18,176
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.asBoolean
public static BooleanExpression asBoolean(Expression<Boolean> expr) { Expression<Boolean> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new BooleanPath((PathImpl<Boolean>) underlyingMixin); } else if (underlyingMixin instanceof PredicateOperation) { return new BooleanOperation((PredicateOperation) underlyingMixin); } else if (underlyingMixin instanceof PredicateTemplate) { return new BooleanTemplate((PredicateTemplate) underlyingMixin); } else { return new BooleanExpression(underlyingMixin) { private static final long serialVersionUID = -8712299418891960222L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
java
public static BooleanExpression asBoolean(Expression<Boolean> expr) { Expression<Boolean> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new BooleanPath((PathImpl<Boolean>) underlyingMixin); } else if (underlyingMixin instanceof PredicateOperation) { return new BooleanOperation((PredicateOperation) underlyingMixin); } else if (underlyingMixin instanceof PredicateTemplate) { return new BooleanTemplate((PredicateTemplate) underlyingMixin); } else { return new BooleanExpression(underlyingMixin) { private static final long serialVersionUID = -8712299418891960222L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
[ "public", "static", "BooleanExpression", "asBoolean", "(", "Expression", "<", "Boolean", ">", "expr", ")", "{", "Expression", "<", "Boolean", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", "(", "expr", ")", ";", "if", "(", "underlyingMixin", "instanceof", "PathImpl", ")", "{", "return", "new", "BooleanPath", "(", "(", "PathImpl", "<", "Boolean", ">", ")", "underlyingMixin", ")", ";", "}", "else", "if", "(", "underlyingMixin", "instanceof", "PredicateOperation", ")", "{", "return", "new", "BooleanOperation", "(", "(", "PredicateOperation", ")", "underlyingMixin", ")", ";", "}", "else", "if", "(", "underlyingMixin", "instanceof", "PredicateTemplate", ")", "{", "return", "new", "BooleanTemplate", "(", "(", "PredicateTemplate", ")", "underlyingMixin", ")", ";", "}", "else", "{", "return", "new", "BooleanExpression", "(", "underlyingMixin", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "-", "8712299418891960222L", ";", "@", "Override", "public", "<", "R", ",", "C", ">", "R", "accept", "(", "Visitor", "<", "R", ",", "C", ">", "v", ",", "C", "context", ")", "{", "return", "this", ".", "mixin", ".", "accept", "(", "v", ",", "context", ")", ";", "}", "}", ";", "}", "}" ]
Create a new BooleanExpression @param expr Expression of type Boolean @return new BooleanExpression
[ "Create", "a", "new", "BooleanExpression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1861-L1881
18,177
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.asString
public static StringExpression asString(Expression<String> expr) { Expression<String> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new StringPath((PathImpl<String>) underlyingMixin); } else if (underlyingMixin instanceof OperationImpl) { return new StringOperation((OperationImpl<String>) underlyingMixin); } else if (underlyingMixin instanceof TemplateExpressionImpl) { return new StringTemplate((TemplateExpressionImpl<String>) underlyingMixin); } else { return new StringExpression(underlyingMixin) { private static final long serialVersionUID = 8007203530480765244L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
java
public static StringExpression asString(Expression<String> expr) { Expression<String> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new StringPath((PathImpl<String>) underlyingMixin); } else if (underlyingMixin instanceof OperationImpl) { return new StringOperation((OperationImpl<String>) underlyingMixin); } else if (underlyingMixin instanceof TemplateExpressionImpl) { return new StringTemplate((TemplateExpressionImpl<String>) underlyingMixin); } else { return new StringExpression(underlyingMixin) { private static final long serialVersionUID = 8007203530480765244L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
[ "public", "static", "StringExpression", "asString", "(", "Expression", "<", "String", ">", "expr", ")", "{", "Expression", "<", "String", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", "(", "expr", ")", ";", "if", "(", "underlyingMixin", "instanceof", "PathImpl", ")", "{", "return", "new", "StringPath", "(", "(", "PathImpl", "<", "String", ">", ")", "underlyingMixin", ")", ";", "}", "else", "if", "(", "underlyingMixin", "instanceof", "OperationImpl", ")", "{", "return", "new", "StringOperation", "(", "(", "OperationImpl", "<", "String", ">", ")", "underlyingMixin", ")", ";", "}", "else", "if", "(", "underlyingMixin", "instanceof", "TemplateExpressionImpl", ")", "{", "return", "new", "StringTemplate", "(", "(", "TemplateExpressionImpl", "<", "String", ">", ")", "underlyingMixin", ")", ";", "}", "else", "{", "return", "new", "StringExpression", "(", "underlyingMixin", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "8007203530480765244L", ";", "@", "Override", "public", "<", "R", ",", "C", ">", "R", "accept", "(", "Visitor", "<", "R", ",", "C", ">", "v", ",", "C", "context", ")", "{", "return", "this", ".", "mixin", ".", "accept", "(", "v", ",", "context", ")", ";", "}", "}", ";", "}", "}" ]
Create a new StringExpression @param expr Expression of type String @return new StringExpression
[ "Create", "a", "new", "StringExpression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L2131-L2151
18,178
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.asSimple
public static <T> SimpleExpression<T> asSimple(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new SimplePath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof OperationImpl) { return new SimpleOperation<T>((OperationImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof TemplateExpressionImpl) { return new SimpleTemplate<T>((TemplateExpressionImpl<T>) underlyingMixin); } else { return new SimpleExpression<T>(underlyingMixin) { private static final long serialVersionUID = -8712299418891960222L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
java
public static <T> SimpleExpression<T> asSimple(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new SimplePath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof OperationImpl) { return new SimpleOperation<T>((OperationImpl<T>) underlyingMixin); } else if (underlyingMixin instanceof TemplateExpressionImpl) { return new SimpleTemplate<T>((TemplateExpressionImpl<T>) underlyingMixin); } else { return new SimpleExpression<T>(underlyingMixin) { private static final long serialVersionUID = -8712299418891960222L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
[ "public", "static", "<", "T", ">", "SimpleExpression", "<", "T", ">", "asSimple", "(", "Expression", "<", "T", ">", "expr", ")", "{", "Expression", "<", "T", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", "(", "expr", ")", ";", "if", "(", "underlyingMixin", "instanceof", "PathImpl", ")", "{", "return", "new", "SimplePath", "<", "T", ">", "(", "(", "PathImpl", "<", "T", ">", ")", "underlyingMixin", ")", ";", "}", "else", "if", "(", "underlyingMixin", "instanceof", "OperationImpl", ")", "{", "return", "new", "SimpleOperation", "<", "T", ">", "(", "(", "OperationImpl", "<", "T", ">", ")", "underlyingMixin", ")", ";", "}", "else", "if", "(", "underlyingMixin", "instanceof", "TemplateExpressionImpl", ")", "{", "return", "new", "SimpleTemplate", "<", "T", ">", "(", "(", "TemplateExpressionImpl", "<", "T", ">", ")", "underlyingMixin", ")", ";", "}", "else", "{", "return", "new", "SimpleExpression", "<", "T", ">", "(", "underlyingMixin", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "-", "8712299418891960222L", ";", "@", "Override", "public", "<", "R", ",", "C", ">", "R", "accept", "(", "Visitor", "<", "R", ",", "C", ">", "v", ",", "C", "context", ")", "{", "return", "this", ".", "mixin", ".", "accept", "(", "v", ",", "context", ")", ";", "}", "}", ";", "}", "}" ]
Create a new SimpleExpression @param expr expression @return new SimpleExpression
[ "Create", "a", "new", "SimpleExpression" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L2169-L2189
18,179
querydsl/querydsl
querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbExpressions.java
MongodbExpressions.near
public static BooleanExpression near(Expression<Double[]> expr, double latVal, double longVal) { return Expressions.booleanOperation(MongodbOps.NEAR, expr, ConstantImpl.create(new Double[]{latVal, longVal})); }
java
public static BooleanExpression near(Expression<Double[]> expr, double latVal, double longVal) { return Expressions.booleanOperation(MongodbOps.NEAR, expr, ConstantImpl.create(new Double[]{latVal, longVal})); }
[ "public", "static", "BooleanExpression", "near", "(", "Expression", "<", "Double", "[", "]", ">", "expr", ",", "double", "latVal", ",", "double", "longVal", ")", "{", "return", "Expressions", ".", "booleanOperation", "(", "MongodbOps", ".", "NEAR", ",", "expr", ",", "ConstantImpl", ".", "create", "(", "new", "Double", "[", "]", "{", "latVal", ",", "longVal", "}", ")", ")", ";", "}" ]
Finds the closest points relative to the given location and orders the results with decreasing proximity @param expr location @param latVal latitude @param longVal longitude @return predicate
[ "Finds", "the", "closest", "points", "relative", "to", "the", "given", "location", "and", "orders", "the", "results", "with", "decreasing", "proximity" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbExpressions.java#L39-L41
18,180
querydsl/querydsl
querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbExpressions.java
MongodbExpressions.nearSphere
public static BooleanExpression nearSphere(Expression<Double[]> expr, double latVal, double longVal) { return Expressions.booleanOperation(MongodbOps.NEAR_SPHERE, expr, ConstantImpl.create(new Double[]{latVal, longVal})); }
java
public static BooleanExpression nearSphere(Expression<Double[]> expr, double latVal, double longVal) { return Expressions.booleanOperation(MongodbOps.NEAR_SPHERE, expr, ConstantImpl.create(new Double[]{latVal, longVal})); }
[ "public", "static", "BooleanExpression", "nearSphere", "(", "Expression", "<", "Double", "[", "]", ">", "expr", ",", "double", "latVal", ",", "double", "longVal", ")", "{", "return", "Expressions", ".", "booleanOperation", "(", "MongodbOps", ".", "NEAR_SPHERE", ",", "expr", ",", "ConstantImpl", ".", "create", "(", "new", "Double", "[", "]", "{", "latVal", ",", "longVal", "}", ")", ")", ";", "}" ]
Finds the closest points relative to the given location on a sphere and orders the results with decreasing proximity @param expr location @param latVal latitude @param longVal longitude @return predicate
[ "Finds", "the", "closest", "points", "relative", "to", "the", "given", "location", "on", "a", "sphere", "and", "orders", "the", "results", "with", "decreasing", "proximity" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbExpressions.java#L51-L53
18,181
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/ConstructorUtils.java
ConstructorUtils.getConstructor
public static <C> Constructor<C> getConstructor(Class<C> type, Class<?>[] givenTypes) throws NoSuchMethodException { return type.getConstructor(givenTypes); }
java
public static <C> Constructor<C> getConstructor(Class<C> type, Class<?>[] givenTypes) throws NoSuchMethodException { return type.getConstructor(givenTypes); }
[ "public", "static", "<", "C", ">", "Constructor", "<", "C", ">", "getConstructor", "(", "Class", "<", "C", ">", "type", ",", "Class", "<", "?", ">", "[", "]", "givenTypes", ")", "throws", "NoSuchMethodException", "{", "return", "type", ".", "getConstructor", "(", "givenTypes", ")", ";", "}" ]
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
[ "Returns", "the", "constructor", "where", "the", "formal", "parameter", "list", "matches", "the", "givenTypes", "argument", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/ConstructorUtils.java#L72-L74
18,182
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/ConstructorUtils.java
ConstructorUtils.getConstructorParameters
public static Class<?>[] getConstructorParameters(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)); }
java
public static Class<?>[] getConstructorParameters(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)); }
[ "public", "static", "Class", "<", "?", ">", "[", "]", "getConstructorParameters", "(", "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", ")", ")", ";", "}" ]
Returns the parameters for the constructor that matches the given types. @param type type @param givenTypes parameter types @return constructor parameters
[ "Returns", "the", "parameters", "for", "the", "constructor", "that", "matches", "the", "given", "types", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/ConstructorUtils.java#L83-L120
18,183
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/ConstructorUtils.java
ConstructorUtils.getTransformers
public static Iterable<Function<Object[], Object[]>> getTransformers(Constructor<?> constructor) { Iterable<ArgumentTransformer> transformers = Lists.newArrayList( new PrimitiveAwareVarArgsTransformer(constructor), new PrimitiveTransformer(constructor), new VarArgsTransformer(constructor)); return ImmutableList .<Function<Object[], Object[]>>copyOf(filter(transformers, applicableFilter)); }
java
public static Iterable<Function<Object[], Object[]>> getTransformers(Constructor<?> constructor) { Iterable<ArgumentTransformer> transformers = Lists.newArrayList( new PrimitiveAwareVarArgsTransformer(constructor), new PrimitiveTransformer(constructor), new VarArgsTransformer(constructor)); return ImmutableList .<Function<Object[], Object[]>>copyOf(filter(transformers, applicableFilter)); }
[ "public", "static", "Iterable", "<", "Function", "<", "Object", "[", "]", ",", "Object", "[", "]", ">", ">", "getTransformers", "(", "Constructor", "<", "?", ">", "constructor", ")", "{", "Iterable", "<", "ArgumentTransformer", ">", "transformers", "=", "Lists", ".", "newArrayList", "(", "new", "PrimitiveAwareVarArgsTransformer", "(", "constructor", ")", ",", "new", "PrimitiveTransformer", "(", "constructor", ")", ",", "new", "VarArgsTransformer", "(", "constructor", ")", ")", ";", "return", "ImmutableList", ".", "<", "Function", "<", "Object", "[", "]", ",", "Object", "[", "]", ">", ">", "copyOf", "(", "filter", "(", "transformers", ",", "applicableFilter", ")", ")", ";", "}" ]
Returns a fetch of transformers applicable to the given constructor. @param constructor constructor @return transformers
[ "Returns", "a", "fetch", "of", "transformers", "applicable", "to", "the", "given", "constructor", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/ConstructorUtils.java#L128-L136
18,184
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PolyhedralSurfaceExpression.java
PolyhedralSurfaceExpression.numPatches
public NumberExpression<Integer> numPatches() { if (numPatches == null) { numPatches = Expressions.numberOperation(Integer.class, SpatialOps.NUM_SURFACES, mixin); } return numPatches; }
java
public NumberExpression<Integer> numPatches() { if (numPatches == null) { numPatches = Expressions.numberOperation(Integer.class, SpatialOps.NUM_SURFACES, mixin); } return numPatches; }
[ "public", "NumberExpression", "<", "Integer", ">", "numPatches", "(", ")", "{", "if", "(", "numPatches", "==", "null", ")", "{", "numPatches", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "SpatialOps", ".", "NUM_SURFACES", ",", "mixin", ")", ";", "}", "return", "numPatches", ";", "}" ]
Returns the number of including polygons @return number of polygons
[ "Returns", "the", "number", "of", "including", "polygons" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PolyhedralSurfaceExpression.java#L55-L60
18,185
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PolyhedralSurfaceExpression.java
PolyhedralSurfaceExpression.patchN
public PolygonExpression<?> patchN(int n) { return GeometryExpressions.polygonOperation(SpatialOps.SURFACE, mixin, ConstantImpl.create(n)); }
java
public PolygonExpression<?> patchN(int n) { return GeometryExpressions.polygonOperation(SpatialOps.SURFACE, mixin, ConstantImpl.create(n)); }
[ "public", "PolygonExpression", "<", "?", ">", "patchN", "(", "int", "n", ")", "{", "return", "GeometryExpressions", ".", "polygonOperation", "(", "SpatialOps", ".", "SURFACE", ",", "mixin", ",", "ConstantImpl", ".", "create", "(", "n", ")", ")", ";", "}" ]
Returns a polygon in this surface, the order is arbitrary. @param n one based index @return polygon at index
[ "Returns", "a", "polygon", "in", "this", "surface", "the", "order", "is", "arbitrary", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PolyhedralSurfaceExpression.java#L68-L70
18,186
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/PolygonExpression.java
PolygonExpression.numInteriorRing
public NumberExpression<Integer> numInteriorRing() { if (numInteriorRing == null) { numInteriorRing = Expressions.numberOperation(Integer.class, SpatialOps.NUM_INTERIOR_RING, mixin); } return numInteriorRing; }
java
public NumberExpression<Integer> numInteriorRing() { if (numInteriorRing == null) { numInteriorRing = Expressions.numberOperation(Integer.class, SpatialOps.NUM_INTERIOR_RING, mixin); } return numInteriorRing; }
[ "public", "NumberExpression", "<", "Integer", ">", "numInteriorRing", "(", ")", "{", "if", "(", "numInteriorRing", "==", "null", ")", "{", "numInteriorRing", "=", "Expressions", ".", "numberOperation", "(", "Integer", ".", "class", ",", "SpatialOps", ".", "NUM_INTERIOR_RING", ",", "mixin", ")", ";", "}", "return", "numInteriorRing", ";", "}" ]
Returns the number of interior rings in this Polygon. @return number of interior rings
[ "Returns", "the", "number", "of", "interior", "rings", "in", "this", "Polygon", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/PolygonExpression.java#L66-L71
18,187
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java
ProjectableSQLQuery.addJoinFlag
@Override public Q addJoinFlag(String flag) { return addJoinFlag(flag, JoinFlag.Position.BEFORE_TARGET); }
java
@Override public Q addJoinFlag(String flag) { return addJoinFlag(flag, JoinFlag.Position.BEFORE_TARGET); }
[ "@", "Override", "public", "Q", "addJoinFlag", "(", "String", "flag", ")", "{", "return", "addJoinFlag", "(", "flag", ",", "JoinFlag", ".", "Position", ".", "BEFORE_TARGET", ")", ";", "}" ]
Add the given String literal as a join flag to the last added join with the position BEFORE_TARGET @param flag join flag @return the current object
[ "Add", "the", "given", "String", "literal", "as", "a", "join", "flag", "to", "the", "last", "added", "join", "with", "the", "position", "BEFORE_TARGET" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java#L83-L86
18,188
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java
ProjectableSQLQuery.addJoinFlag
@Override @SuppressWarnings("unchecked") public Q addJoinFlag(String flag, JoinFlag.Position position) { queryMixin.addJoinFlag(new JoinFlag(flag, position)); return (Q) this; }
java
@Override @SuppressWarnings("unchecked") public Q addJoinFlag(String flag, JoinFlag.Position position) { queryMixin.addJoinFlag(new JoinFlag(flag, position)); return (Q) this; }
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Q", "addJoinFlag", "(", "String", "flag", ",", "JoinFlag", ".", "Position", "position", ")", "{", "queryMixin", ".", "addJoinFlag", "(", "new", "JoinFlag", "(", "flag", ",", "position", ")", ")", ";", "return", "(", "Q", ")", "this", ";", "}" ]
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
[ "Add", "the", "given", "String", "literal", "as", "a", "join", "flag", "to", "the", "last", "added", "join" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java#L95-L100
18,189
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java
ProjectableSQLQuery.addFlag
@Override public Q addFlag(Position position, String prefix, Expression<?> expr) { Expression<?> flag = Expressions.template(expr.getType(), prefix + "{0}", expr); return queryMixin.addFlag(new QueryFlag(position, flag)); }
java
@Override public Q addFlag(Position position, String prefix, Expression<?> expr) { Expression<?> flag = Expressions.template(expr.getType(), prefix + "{0}", expr); return queryMixin.addFlag(new QueryFlag(position, flag)); }
[ "@", "Override", "public", "Q", "addFlag", "(", "Position", "position", ",", "String", "prefix", ",", "Expression", "<", "?", ">", "expr", ")", "{", "Expression", "<", "?", ">", "flag", "=", "Expressions", ".", "template", "(", "expr", ".", "getType", "(", ")", ",", "prefix", "+", "\"{0}\"", ",", "expr", ")", ";", "return", "queryMixin", ".", "addFlag", "(", "new", "QueryFlag", "(", "position", ",", "flag", ")", ")", ";", "}" ]
Add the given prefix and expression as a general query flag @param position position of the flag @param prefix prefix for the flag @param expr expression of the flag @return the current object
[ "Add", "the", "given", "prefix", "and", "expression", "as", "a", "general", "query", "flag" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java#L110-L114
18,190
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java
ProjectableSQLQuery.addFlag
@Override public Q addFlag(Position position, String flag) { return queryMixin.addFlag(new QueryFlag(position, flag)); }
java
@Override public Q addFlag(Position position, String flag) { return queryMixin.addFlag(new QueryFlag(position, flag)); }
[ "@", "Override", "public", "Q", "addFlag", "(", "Position", "position", ",", "String", "flag", ")", "{", "return", "queryMixin", ".", "addFlag", "(", "new", "QueryFlag", "(", "position", ",", "flag", ")", ")", ";", "}" ]
Add the given String literal as query flag @param position position @param flag query flag @return the current object
[ "Add", "the", "given", "String", "literal", "as", "query", "flag" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ProjectableSQLQuery.java#L133-L136
18,191
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java
SQLTemplates.serialize
public void serialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) { context.serializeForQuery(metadata, forCountRow); if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
java
public void serialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) { context.serializeForQuery(metadata, forCountRow); if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
[ "public", "void", "serialize", "(", "QueryMetadata", "metadata", ",", "boolean", "forCountRow", ",", "SQLSerializer", "context", ")", "{", "context", ".", "serializeForQuery", "(", "metadata", ",", "forCountRow", ")", ";", "if", "(", "!", "metadata", ".", "getFlags", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "context", ".", "serialize", "(", "Position", ".", "END", ",", "metadata", ".", "getFlags", "(", ")", ")", ";", "}", "}" ]
template method for SELECT serialization @param metadata @param forCountRow @param context
[ "template", "method", "for", "SELECT", "serialization" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java#L854-L860
18,192
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java
SQLTemplates.serializeMerge
public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) { context.serializeForMerge(metadata, entity, keys, columns, values, subQuery); if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
java
public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) { context.serializeForMerge(metadata, entity, keys, columns, values, subQuery); if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
[ "public", "void", "serializeMerge", "(", "QueryMetadata", "metadata", ",", "RelationalPath", "<", "?", ">", "entity", ",", "List", "<", "Path", "<", "?", ">", ">", "keys", ",", "List", "<", "Path", "<", "?", ">", ">", "columns", ",", "List", "<", "Expression", "<", "?", ">", ">", "values", ",", "SubQueryExpression", "<", "?", ">", "subQuery", ",", "SQLSerializer", "context", ")", "{", "context", ".", "serializeForMerge", "(", "metadata", ",", "entity", ",", "keys", ",", "columns", ",", "values", ",", "subQuery", ")", ";", "if", "(", "!", "metadata", ".", "getFlags", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "context", ".", "serialize", "(", "Position", ".", "END", ",", "metadata", ".", "getFlags", "(", ")", ")", ";", "}", "}" ]
template method for MERGE serialization @param metadata @param entity @param keys @param columns @param values @param subQuery @param context
[ "template", "method", "for", "MERGE", "serialization" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java#L929-L937
18,193
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java
SQLTemplates.serializeModifiers
protected void serializeModifiers(QueryMetadata metadata, SQLSerializer context) { QueryModifiers mod = metadata.getModifiers(); if (mod.getLimit() != null) { context.handle(limitTemplate, mod.getLimit()); } else if (limitRequired) { context.handle(limitTemplate, maxLimit); } if (mod.getOffset() != null) { context.handle(offsetTemplate, mod.getOffset()); } }
java
protected void serializeModifiers(QueryMetadata metadata, SQLSerializer context) { QueryModifiers mod = metadata.getModifiers(); if (mod.getLimit() != null) { context.handle(limitTemplate, mod.getLimit()); } else if (limitRequired) { context.handle(limitTemplate, maxLimit); } if (mod.getOffset() != null) { context.handle(offsetTemplate, mod.getOffset()); } }
[ "protected", "void", "serializeModifiers", "(", "QueryMetadata", "metadata", ",", "SQLSerializer", "context", ")", "{", "QueryModifiers", "mod", "=", "metadata", ".", "getModifiers", "(", ")", ";", "if", "(", "mod", ".", "getLimit", "(", ")", "!=", "null", ")", "{", "context", ".", "handle", "(", "limitTemplate", ",", "mod", ".", "getLimit", "(", ")", ")", ";", "}", "else", "if", "(", "limitRequired", ")", "{", "context", ".", "handle", "(", "limitTemplate", ",", "maxLimit", ")", ";", "}", "if", "(", "mod", ".", "getOffset", "(", ")", "!=", "null", ")", "{", "context", ".", "handle", "(", "offsetTemplate", ",", "mod", ".", "getOffset", "(", ")", ")", ";", "}", "}" ]
template method for LIMIT and OFFSET serialization @param metadata @param context
[ "template", "method", "for", "LIMIT", "and", "OFFSET", "serialization" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java#L967-L977
18,194
querydsl/querydsl
querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/HibernateUpdateClause.java
HibernateUpdateClause.setLockMode
@SuppressWarnings("unchecked") public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) { lockModes.put(path, lockMode); return this; }
java
@SuppressWarnings("unchecked") public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) { lockModes.put(path, lockMode); return this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "HibernateUpdateClause", "setLockMode", "(", "Path", "<", "?", ">", "path", ",", "LockMode", "lockMode", ")", "{", "lockModes", ".", "put", "(", "path", ",", "lockMode", ")", ";", "return", "this", ";", "}" ]
Set the lock mode for the given path. @return the current object
[ "Set", "the", "lock", "mode", "for", "the", "given", "path", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/HibernateUpdateClause.java#L143-L147
18,195
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ColumnMetadata.java
ColumnMetadata.getColumnMetadata
public static ColumnMetadata getColumnMetadata(Path<?> path) { Path<?> parent = path.getMetadata().getParent(); if (parent instanceof EntityPath) { Object columnMetadata = ((EntityPath<?>) parent).getMetadata(path); if (columnMetadata instanceof ColumnMetadata) { return (ColumnMetadata) columnMetadata; } } return ColumnMetadata.named(path.getMetadata().getName()); }
java
public static ColumnMetadata getColumnMetadata(Path<?> path) { Path<?> parent = path.getMetadata().getParent(); if (parent instanceof EntityPath) { Object columnMetadata = ((EntityPath<?>) parent).getMetadata(path); if (columnMetadata instanceof ColumnMetadata) { return (ColumnMetadata) columnMetadata; } } return ColumnMetadata.named(path.getMetadata().getName()); }
[ "public", "static", "ColumnMetadata", "getColumnMetadata", "(", "Path", "<", "?", ">", "path", ")", "{", "Path", "<", "?", ">", "parent", "=", "path", ".", "getMetadata", "(", ")", ".", "getParent", "(", ")", ";", "if", "(", "parent", "instanceof", "EntityPath", ")", "{", "Object", "columnMetadata", "=", "(", "(", "EntityPath", "<", "?", ">", ")", "parent", ")", ".", "getMetadata", "(", "path", ")", ";", "if", "(", "columnMetadata", "instanceof", "ColumnMetadata", ")", "{", "return", "(", "ColumnMetadata", ")", "columnMetadata", ";", "}", "}", "return", "ColumnMetadata", ".", "named", "(", "path", ".", "getMetadata", "(", ")", ".", "getName", "(", ")", ")", ";", "}" ]
Returns this path's column metadata if present. Otherwise returns default metadata where the column name is equal to the path's name.
[ "Returns", "this", "path", "s", "column", "metadata", "if", "present", ".", "Otherwise", "returns", "default", "metadata", "where", "the", "column", "name", "is", "equal", "to", "the", "path", "s", "name", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ColumnMetadata.java#L33-L42
18,196
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ColumnMetadata.java
ColumnMetadata.getName
public static String getName(Path<?> path) { Path<?> parent = path.getMetadata().getParent(); if (parent instanceof EntityPath) { Object columnMetadata = ((EntityPath<?>) parent).getMetadata(path); if (columnMetadata instanceof ColumnMetadata) { return ((ColumnMetadata) columnMetadata).getName(); } } return path.getMetadata().getName(); }
java
public static String getName(Path<?> path) { Path<?> parent = path.getMetadata().getParent(); if (parent instanceof EntityPath) { Object columnMetadata = ((EntityPath<?>) parent).getMetadata(path); if (columnMetadata instanceof ColumnMetadata) { return ((ColumnMetadata) columnMetadata).getName(); } } return path.getMetadata().getName(); }
[ "public", "static", "String", "getName", "(", "Path", "<", "?", ">", "path", ")", "{", "Path", "<", "?", ">", "parent", "=", "path", ".", "getMetadata", "(", ")", ".", "getParent", "(", ")", ";", "if", "(", "parent", "instanceof", "EntityPath", ")", "{", "Object", "columnMetadata", "=", "(", "(", "EntityPath", "<", "?", ">", ")", "parent", ")", ".", "getMetadata", "(", "path", ")", ";", "if", "(", "columnMetadata", "instanceof", "ColumnMetadata", ")", "{", "return", "(", "(", "ColumnMetadata", ")", "columnMetadata", ")", ".", "getName", "(", ")", ";", "}", "}", "return", "path", ".", "getMetadata", "(", ")", ".", "getName", "(", ")", ";", "}" ]
Extract the column name for the given path, returns the path name, if no ColumnMetadata is attached @param path patch @return column name or path name
[ "Extract", "the", "column", "name", "for", "the", "given", "path", "returns", "the", "path", "name", "if", "no", "ColumnMetadata", "is", "attached" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ColumnMetadata.java#L50-L59
18,197
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/ColumnMetadata.java
ColumnMetadata.named
public static ColumnMetadata named(String name) { return new ColumnMetadata(null, name, null, true, UNDEFINED, UNDEFINED); }
java
public static ColumnMetadata named(String name) { return new ColumnMetadata(null, name, null, true, UNDEFINED, UNDEFINED); }
[ "public", "static", "ColumnMetadata", "named", "(", "String", "name", ")", "{", "return", "new", "ColumnMetadata", "(", "null", ",", "name", ",", "null", ",", "true", ",", "UNDEFINED", ",", "UNDEFINED", ")", ";", "}" ]
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
[ "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", "." ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/ColumnMetadata.java#L69-L71
18,198
querydsl/querydsl
querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java
AbstractCollQuery.from
public <A> Q from(Path<A> entity, Iterable<? extends A> col) { iterables.put(entity, col); getMetadata().addJoin(JoinType.DEFAULT, entity); return queryMixin.getSelf(); }
java
public <A> Q from(Path<A> entity, Iterable<? extends A> col) { iterables.put(entity, col); getMetadata().addJoin(JoinType.DEFAULT, entity); return queryMixin.getSelf(); }
[ "public", "<", "A", ">", "Q", "from", "(", "Path", "<", "A", ">", "entity", ",", "Iterable", "<", "?", "extends", "A", ">", "col", ")", "{", "iterables", ".", "put", "(", "entity", ",", "col", ")", ";", "getMetadata", "(", ")", ".", "addJoin", "(", "JoinType", ".", "DEFAULT", ",", "entity", ")", ";", "return", "queryMixin", ".", "getSelf", "(", ")", ";", "}" ]
Add a query source @param <A> type of expression @param entity Path for the source @param col content of the source @return current object
[ "Add", "a", "query", "source" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java#L76-L80
18,199
querydsl/querydsl
querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java
AbstractCollQuery.bind
public <A> Q bind(Path<A> entity, Iterable<? extends A> col) { iterables.put(entity, col); return queryMixin.getSelf(); }
java
public <A> Q bind(Path<A> entity, Iterable<? extends A> col) { iterables.put(entity, col); return queryMixin.getSelf(); }
[ "public", "<", "A", ">", "Q", "bind", "(", "Path", "<", "A", ">", "entity", ",", "Iterable", "<", "?", "extends", "A", ">", "col", ")", "{", "iterables", ".", "put", "(", "entity", ",", "col", ")", ";", "return", "queryMixin", ".", "getSelf", "(", ")", ";", "}" ]
Bind the given collection to an already existing query source @param <A> type of expression @param entity Path for the source @param col content of the source @return current object
[ "Bind", "the", "given", "collection", "to", "an", "already", "existing", "query", "source" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-collections/src/main/java/com/querydsl/collections/AbstractCollQuery.java#L90-L93