name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
querydsl_QueryBase_restrict_rdh | /**
* Defines both limit and offset of the query results,
* use {@link QueryModifiers#EMPTY} to apply no paging.
*
* @param modifiers
* query modifiers
* @return the current object
*/
public Q restrict(QueryModifiers modifiers) {
return queryMixin.restrict(modifiers);
} | 3.26 |
querydsl_QueryBase_where_rdh | /**
* Add the given filter condition
*
* <p>Skips null arguments</p>
*
* @param o
* filter conditions to be added
* @return the current object
*/ public
Q where(Predicate o) {
return queryMixin.where(o);
} | 3.26 |
querydsl_LiteralExpression_castToNum_rdh | /**
* Create a cast expression to the given numeric type
*
* @param <A>
* numeric type
* @param type
* numeric type
* @return cast expression
*/
public <A extends Number & Comparable<? super A>> NumberExpression<A> castToNum(Class<A> type) {
return Expressions.numberOperation(type, Ops.NUMCAST, mixin, C... | 3.26 |
querydsl_JTSPolygonExpression_interiorRingN_rdh | /**
* Returns the N th interior ring for this Polygon as a LineString.
*
* @param idx
* one based index
* @return interior ring at index
*/
public JTSLineStringExpression<LineString> interiorRingN(int idx) {
return JTSGeometryExpressions.lineStringOperation(SpatialOps.INTERIOR_RINGN, mixin, ConstantImpl.cre... | 3.26 |
querydsl_JTSPolygonExpression_numInteriorRing_rdh | /**
* Returns the number of interior rings in this Polygon.
*
* @return number of interior rings
*/
public NumberExpression<Integer> numInteriorRing() {
if (numInteriorRing == null) {
numInteriorRing = Expressions.numberOperation(Integer.class, SpatialOps.NUM_INTERIOR_RING, m... | 3.26 |
querydsl_JTSLineStringExpression_pointN_rdh | /**
* Returns the specified Point N in this LineString.
*
* @param idx
* one based index
* @return point at index
*/
public JTSPointExpression<Point> pointN(int idx) {
return JTSGeometryExpressions.pointOperation(SpatialOps.POINTN, mixin, ConstantImpl.create(idx));
} | 3.26 |
querydsl_JTSLineStringExpression_numPoints_rdh | /**
* The number of Points in this LineString.
*
* @return number of points
*/public NumberExpression<Integer> numPoints() {
if (numPoints == null) {
numPoints = Expressions.numberOperation(Integer.class, SpatialOps.NUM_POINTS, mixin);
}
return numPoints;
} | 3.26 |
querydsl_MetaDataExporter_setNameSuffix_rdh | /**
* Override the name suffix for the classes (default: "")
*
* @param nameSuffix
* name suffix for querydsl-types (default: "")
*/
public void setNameSuffix(String nameSuffix) {
module.bind(CodegenModule.SUFFIX, nameSuffix);
} | 3.26 |
querydsl_MetaDataExporter_m1_rdh | /**
* Set the source encoding
*
* @param sourceEncoding
*/
public void m1(String sourceEncoding) {
this.sourceEncoding = sourceEncoding;
}
/**
* Set whether schema names should be appended to the package name.
*
* <p><b>!!! Important !!!</b><i> {@link NamingStrategy#getPackage(String, SchemaAndTable)}
* w... | 3.26 |
querydsl_MetaDataExporter_setExportViews_rdh | /**
* Set whether views should be exported
*
* @param exportViews
*/
public void setExportViews(boolean exportViews) {
this.f2 = exportViews;
} | 3.26 |
querydsl_MetaDataExporter_setPackageName_rdh | /**
* Set the package name
*
* @param packageName
* package name for sources
*/
public void setPackageName(String packageName) {
module.bind(SQLCodegenModule.PACKAGE_NAME, packageName);
} | 3.26 |
querydsl_MetaDataExporter_setBeanPackageName_rdh | /**
* Override the bean package name (default: packageName)
*
* @param beanPackageName
* package name for bean sources
*/
public void setBeanPackageName(@Nullable
String beanPackageName) {
this.beanPackageName = beanPackageName;
} | 3.26 |
querydsl_MetaDataExporter_setBeanSerializerClass_rdh | /**
* Set the Bean serializer class to create bean types as well
*
* @param beanSerializerClass
* serializer for JavaBeans (default: null)
*/
public void setBeanSerializerClass(Class<? extends Serializer> beanSerializerClass) {
module.bind(SQLCodegenModule.BEAN_SERIALIZER, beanSerializerClass);
} | 3.26 |
querydsl_MetaDataExporter_setColumnAnnotations_rdh | /**
* Set whether column annotations should be created
*
* @param columnAnnotations
*/
public void setColumnAnnotations(boolean columnAnnotations) {
this.columnAnnotations = columnAnnotations;
} | 3.26 |
querydsl_MetaDataExporter_setCreateScalaSources_rdh | /**
* Set true to create Scala sources instead of Java sources
*
* @param createScalaSources
* whether to create Scala sources (default: false)
*/
public void setCreateScalaSources(boolean createScalaSources) {
this.createScalaSources = createScalaSources;
} | 3.26 |
querydsl_MetaDataExporter_setTypeMappings_rdh | /**
* Set the type mappings to use
*
* @param typeMappings
*/
public void setTypeMappings(TypeMappings typeMappings) {
module.bind(TypeMappings.class, typeMappings);
} | 3.26 |
querydsl_MetaDataExporter_setNamingStrategy_rdh | /**
* Override the NamingStrategy (default: new DefaultNamingStrategy())
*
* @param namingStrategy
* naming strategy to override (default: new DefaultNamingStrategy())
*/ public void setNamingStrategy(NamingStrategy namingStrategy) {
module.bind(NamingStrategy.class, namingStrategy);
} | 3.26 |
querydsl_MetaDataExporter_export_rdh | /**
* Export the tables based on the given database metadata
*
* @param md
* database metadata
* @throws SQLException
*/
public void export(DatabaseMetaData md) throws SQLException {if (beanPackageName == null) {
beanPackageName = module.getPackageName();
}
if (beansTargetFolder == null) {
... | 3.26 |
querydsl_MetaDataExporter_setSchemaPattern_rdh | /**
* Set the schema pattern filter to be used
*
* @param schemaPattern
* a schema name pattern; must match the schema name
* as it is stored in the database; "" retrieves those without a schema;
* {@code null} means that the schema name should not be used to narrow
* the search (default: null)
*/
publi... | 3.26 |
querydsl_MetaDataExporter_setExportDirectForeignKeys_rdh | /**
* Set whether direct foreign keys should be exported
*
* @param exportDirectForeignKeys
*/public void setExportDirectForeignKeys(boolean exportDirectForeignKeys) {
this.exportDirectForeignKeys = exportDirectForeignKeys;
} | 3.26 |
querydsl_MetaDataExporter_setBeanSuffix_rdh | /**
* Override the bean suffix for the classes (default: "")
*
* @param beanSuffix
* bean suffix for bean-types (default: "")
*/
public void setBeanSuffix(String beanSuffix) {
module.bind(SQLCodegenModule.BEAN_SUFFIX, beanSuffix);
} | 3.26 |
querydsl_MetaDataExporter_setExportAll_rdh | /**
* Set whether all table types should be exported
*
* @param exportAll
*/
public void setExportAll(boolean exportAll) {
this.exportAll = exportAll;
} | 3.26 |
querydsl_MetaDataExporter_patternAsList_rdh | /**
* Splits the input on ',' if non-null and a ',' is present.
* Returns a singletonList of null if null
*/
private List<String> patternAsList(@Nullable
String input) {
if ((input != null) && input.contains(",")) {
return Arrays.asList(input.split(","));
} else {
return Collections.singlet... | 3.26 |
querydsl_MetaDataExporter_setNamePrefix_rdh | /**
* Override the name prefix for the classes (default: Q)
*
* @param namePrefix
* name prefix for querydsl-types (default: Q)
*/
public void setNamePrefix(String namePrefix) {
module.bind(CodegenModule.PREFIX, namePrefix);
} | 3.26 |
querydsl_MetaDataExporter_setGeneratedAnnotationClass_rdh | /**
* Set the fully qualified class name of the "generated" annotation added ot the generated sources
*
* @param generatedAnnotationClass
* the fully qualified class name of the <em>Single-Element Annotation</em> (with {@code String} element) to be used on
* the generated sources, or {@code null} (defaulting t... | 3.26 |
querydsl_MetaDataExporter_m2_rdh | /**
* Set the java imports
*
* @param imports
* java imports array
*/
public void m2(String[] imports) {
module.bind(CodegenModule.IMPORTS, new HashSet<String>(Arrays.asList(imports)));
} | 3.26 |
querydsl_MetaDataExporter_setColumnComparatorClass_rdh | /**
* Set the column comparator class
*
* @param columnComparatorClass
*/
public void setColumnComparatorClass(Class<? extends Comparator<Property>> columnComparatorClass) {
module.bind(SQLCodegenModule.COLUMN_COMPARATOR, columnComparatorClass);
} | 3.26 |
querydsl_MetaDataExporter_setBeansTargetFolder_rdh | /**
* Set the target folder for beans
*
* <p>defaults to the targetFolder value</p>
*
* @param targetFolder
* target source folder to create the bean sources into
*/
public void setBeansTargetFolder(File targetFolder) {
this.beansTargetFolder = targetFolder;
} | 3.26 |
querydsl_MetaDataExporter_setExportTables_rdh | /**
* Set whether tables should be exported
*
* @param exportTables
*/
public void setExportTables(boolean exportTables) {
this.exportTables = exportTables;
} | 3.26 |
querydsl_MetaDataExporter_setExportInverseForeignKeys_rdh | /**
* Set whether inverse foreign keys should be exported
*
* @param exportInverseForeignKeys
*/public void setExportInverseForeignKeys(boolean exportInverseForeignKeys) {
this.exportInverseForeignKeys = exportInverseForeignKeys;
} | 3.26 |
querydsl_MetaDataExporter_setTableNamePattern_rdh | /**
* Set the table name pattern filter to be used
*
* @param tableNamePattern
* a table name pattern; must match the
* table name as it is stored in the database (default: null)
*/
public void setTableNamePattern(@Nullable
String tableNamePattern) {
this.tableNamePattern = tableNamePattern;
} | 3.26 |
querydsl_MetaDataExporter_setExportForeignKeys_rdh | /**
* Set whether foreign keys should be exported
*
* @param exportForeignKeys
*/
public void setExportForeignKeys(boolean exportForeignKeys) {
this.exportForeignKeys = exportForeignKeys;} | 3.26 |
querydsl_MetaDataExporter_setConfiguration_rdh | /**
* Override the configuration
*
* @param configuration
* override configuration for custom type mappings etc
*/
public void setConfiguration(Configuration configuration) {
module.bind(Configuration.class, configuration);
} | 3.26 |
querydsl_MetaDataExporter_setBeanSerializer_rdh | /**
* Set the Bean serializer to create bean types as well
*
* @param beanSerializer
* serializer for JavaBeans (default: null)
*/
public void setBeanSerializer(@Nullable
Serializer beanSerializer) {
module.bind(SQLCodegenModule.BEAN_SERIALIZER, beanSerializer);
} | 3.26 |
querydsl_MetaDataExporter_setInnerClassesForKeys_rdh | /**
* Set whether inner classes should be created for keys
*
* @param innerClassesForKeys
*/public void setInnerClassesForKeys(boolean innerClassesForKeys) {
module.bind(SQLCodegenModule.INNER_CLASSES_FOR_KEYS, innerClassesForKeys);
} | 3.26 |
querydsl_MetaDataExporter_setBeanPrefix_rdh | /**
* Override the bean prefix for the classes (default: "")
*
* @param beanPrefix
* bean prefix for bean-types (default: "")
*/
public void setBeanPrefix(String beanPrefix) {
module.bind(SQLCodegenModule.BEAN_PREFIX, beanPrefix);
} | 3.26 |
querydsl_Fetchable_stream_rdh | /**
* Get the projection as a typed closeable Stream.
*
* @return closeable stream
*/
default Stream<T> stream() {
final CloseableIterator<T> iterator = iterate();
final Spliterator<T> spliterator =
Spliterators.spliteratorUnknownSize(iterator, Spliterator.ORDERED);
return StreamSupport.stream(split... | 3.26 |
querydsl_SerializerBase_serializeConstant_rdh | /**
* Serialize the constant as parameter to the query. The default implementation writes the
* label name for the constants. Some dialects may replace this by indexed based or
* positional parameterization.
* Dialects may also use this to prefix the parameter with for example ":" or "?".
*
* @param parameterInde... | 3.26 |
querydsl_SerializerBase_getConstantLabel_rdh | /**
* Generate a constant value under which to register a new constant in {@link #getConstantToLabel()}.
*
* @param value
* the constant value or parameter to create a constant for
* @return the generated label
*/
@NotNull
protected String getConstantLabel(Object value) {
return constantPrefix + (getConstantToL... | 3.26 |
querydsl_LuceneSerializer_m3_rdh | /**
* template method
*
* @param leftHandSide
* left hand side
* @param rightHandSide
* right hand side
* @return results
*/
protected String[] m3(Path<?> leftHandSide, Object rightHandSide) {
String str = rightHandSide.toString();
if (lowerCase) {
str = str.toLowerCase();
}if (splitTerms) {
if (str.equals... | 3.26 |
querydsl_LuceneSerializer_convert_rdh | /**
* template method
*
* @param leftHandSide
* left hand side
* @param rightHandSide
* right hand side
* @return results
*/
protected String[] convert(Path<?> leftHandSide, Expression<?> rightHandSide, QueryMetadata metadata) {
if (rightHandSide instanceof Operation) {
Operation<?> operation = ((Operation... | 3.26 |
querydsl_SQLSerializer_getIdentifierColumns_rdh | /**
* Return a list of expressions that can be used to uniquely define the query sources
*
* @param joins
* @return identifier columns
*/
@SuppressWarnings("unchecked")
protected List<Expression<?>> getIdentifierColumns(List<JoinExpression> joins, boolean alias) {
if (joins.... | 3.26 |
querydsl_CaseBuilder_then_rdh | // Time
public <T extends Comparable> Cases<T, TimeExpression<T>> then(TimeExpression<T> expr) {
return thenTime(expr);
} | 3.26 |
querydsl_Coalesce_as_rdh | /**
* Create an alias for the expression
*
* @return this as alias
*/
public DslExpression<T> as(String alias) {
return as(ExpressionUtils.path(getType(), alias));
} | 3.26 |
querydsl_AbstractJDOQuery_m1_rdh | /**
* Set the maximum fetch depth when fetching.
* A value of 0 has no meaning and will throw a {@link JDOUserException}.
* A value of -1 means that no limit is placed on fetching.
* A positive integer will result in that number of references from the
* initial object to be fetched.
*
* @param depth
* fetch d... | 3.26 |
querydsl_AbstractJDOQuery_close_rdh | /**
* Close the query and related resources
*/
@Override
public void close()
{
for (Query query : queries) {
query.closeAll();
}
} | 3.26 |
querydsl_AbstractJDOQuery_addFetchGroup_rdh | /**
* Add the fetch group to the set of active fetch groups.
*
* @param fetchGroupName
* fetch group name
* @return the current object
*/
@Override
public Q
addFetchGroup(String fetchGroupName) {
fetchGroups.add(fetchGroupName);
return queryMixin.getSelf();
} | 3.26 |
querydsl_CollQuery_clone_rdh | /**
* Clone the state of this query to a new CollQuery instance
*/
@Override
public CollQuery<T> clone() {
return new
CollQuery<T>(queryMixin.getMetadata().clone(), getQueryEngine());
} | 3.26 |
querydsl_AliasFactory_createProxy_rdh | /**
* Create a proxy instance for the given class and path
*
* @param <A>
* @param cl
* type of the proxy
* @param path
* underlying expression
* @return proxy instance
*/
@SuppressWarnings("unchecked")protected <A> A createProxy(Class<A> cl, Expression<?> path) {
Enhancer enhancer = new Enhancer();
... | 3.26 |
querydsl_AliasFactory_createAliasForExpr_rdh | /**
* Create an alias instance for the given class and Expression
*
* @param <A>
* @param cl
* type for alias
* @param expr
* underlying expression
* @return alias instance
*/
@SuppressWarnings("unchecked")
public <A> A createAliasForExpr(Class<A> cl, Expression<?
extends A> expr) {
try {
final... | 3.26 |
querydsl_AliasFactory_getCurrent_rdh | /**
* Get the current thread bound expression without resetting it
*
* @param <A>
* @return expression
*/
@SuppressWarnings("unchecked")
@Nullable
public <A extends Expression<?>> A getCurrent() {
return ((A) (current.get()));
} | 3.26 |
querydsl_AliasFactory_getCurrentAndReset_rdh | /**
* Get the current thread bound expression and reset it
*
* @param <A>
* @return expression
*/
@Nullable
public <A extends Expression<?>> A getCurrentAndReset() {
A rv = this.getCurrent();
reset();return rv;
} | 3.26 |
querydsl_AliasFactory_createAliasForProperty_rdh | /**
* Create an alias instance for the given class, parent and path
*
* @param <A>
* @param cl
* type for alias
* @param path
* underlying expression
* @return alias instance
*/
public <A> A createAliasForProperty(Class<A> cl, Expression<?> path) {
return createProxy(cl, path);
} | 3.26 |
querydsl_AliasFactory_setCurrent_rdh | /**
* Set the thread bound expression to the given value
*
* @param expr
* expression to be set to current
*/
public void setCurrent(Expression<?> expr) {
current.set(expr);
} | 3.26 |
querydsl_AliasFactory_createAliasForVariable_rdh | /**
* Create an alias instance for the given class and variable name
*
* @param <A>
* @param cl
* type for alias
* @param var
* variable name for the underlying expression
* @return alias instance
*/
public <A> A createAliasForVariable(Class<A> cl, String var) {
final Path<A> expr = pathFactory.create... | 3.26 |
querydsl_PropertyAccessInvocationHandler_intercept_rdh | // CHECKSTYLE:OFF
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
// CHECKSTYLE:ON
Object rv = null;
MethodType methodType = MethodType.get(method);if (methodType == MethodType.GETTER) {
String ptyName = pr... | 3.26 |
querydsl_BeanMap_reinitialise_rdh | // Implementation methods
// -------------------------------------------------------------------------
/**
* Reinitializes this bean. Called during {@link #setBean(Object)}.
* Does introspection to find properties.
*/
protected void reinitialise() {
readMethods.clear();
writeMethods.clear();types.clear();
... | 3.26 |
querydsl_BeanMap_get_rdh | /**
* Returns the value of the bean's property with the given name.
* <p>
* The given name must be a {@code String} and must not be
* null; otherwise, this method returns {@code null}.
* If the bean defines a property with the given name, the value of
* that property is returned. Otherwise, {@code null} is
* ret... | 3.26 |
querydsl_BeanMap_firePropertyChange_rdh | /**
* Called during a successful {@link #put(Object,Object)} operation.
* Default implementation does nothing. Override to be notified of
* property changes in the bean caused by this map.
*
* @param key
* the name of the property that changed
* @param oldValue
* the old value for that property
* @param n... | 3.26 |
querydsl_BeanMap_convertType_rdh | /**
* Converts the given value to the given type. First, reflection is
* is used to find a public constructor declared by the given class
* that takes one argument, which must be the precise type of the
* given value. If such a constructor is found, a new object is
* created by passing the given value to that co... | 3.26 |
querydsl_BeanMap_entryIterator_rdh | /**
* Convenience method for getting an iterator over the entries.
*
* @return an iterator over the entries
*/
public Iterator<Entry<String,
Object>> entryIterator() {
final Iterator<String> iter = keyIterator();
return new Iterator<Entry<String, Object>>() {
@Override
public boolean hasNex... | 3.26 |
querydsl_BeanMap_entrySet_rdh | /**
* Gets a Set of MapEntry objects that are the mappings for this BeanMap.
* <p>
* Each MapEntry can be set but not removed.
*
* @return the unmodifiable set of mappings
*/
@Overridepublic Set<Entry<String, Object>> entrySet() {
return new AbstractSet<Entry<String, Object>>() {
@Override
... | 3.26 |
querydsl_BeanMap_valueIterator_rdh | /**
* Convenience method for getting an iterator over the values.
*
* @return an iterator over the values
*/
public Iterator<Object> valueIterator() {
final Iterator<String> iter = keyIterator();
return new Iterator<Object>() {
@Override
public boolean hasNext()
{
return ... | 3.26 |
querydsl_BeanMap_clone_rdh | /**
* Clone this bean map using the following process:
* <p>
* <ul>
* <li>If there is no underlying bean, return a cloned BeanMap without a
* bean.
* <p>
* <li>Since there is an underlying bean, try to instantiate a new bean of
* the same type using Class.newInstance().
* <p>
* <li>If the instantiation fails,... | 3.26 |
querydsl_BeanMap_setValue_rdh | /**
* Sets the value.
*
* @param value
* the new value for the entry
* @return the old value for the entry
*/
@Override
public Object setValue(Object value) {
String key = getKey();
Object oldValue = owner.get(key);
owner.put(key, value);
Object newValue = owner.get(key);
this.value = newValue;
return oldValue;... | 3.26 |
querydsl_BeanMap_setBean_rdh | /**
* Sets the bean to be operated on by this map. The given value may
* be null, in which case this map will be empty.
*
* @param newBean
* the new bean to operate on
*/
public void setBean(Object newBean) {
bean = newBean;
reinitialise();
} | 3.26 |
querydsl_BeanMap_put_rdh | /**
* 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
*/
@Override
public Object put(String name, Object value) {
if (bean != null) {
... | 3.26 |
querydsl_BeanMap_getBean_rdh | // Properties
// -------------------------------------------------------------------------
/**
* Returns the bean currently being operated on. The return value may
* be null if this map is empty.
*
* @return the bean being operated on by this map
*/
public Object getBean() {
return bean;
} | 3.26 |
querydsl_BeanMap_getWriteMethod_rdh | /**
* Returns the mutator for the property with the given name.
*
* @param name
* the name of the property
* @return the mutator method for the property, or null
*/
public Method getWriteMethod(String name) {
return writeMethods.get(name);
} | 3.26 |
querydsl_BeanMap_getReadMethod_rdh | /**
* Returns the accessor for the property with the given name.
*
* @param name
* the name of the property
* @return the accessor method for the property, or null
*/
public Method getReadMethod(String name) {
return readMethods.get(name);
} | 3.26 |
querydsl_BeanMap_putAllWriteable_rdh | /**
* Puts all of the writable properties from the given BeanMap into this
* BeanMap. Read-only and Write-only properties will be ignored.
*
* @param map
* the BeanMap whose properties to put
*/
public void putAllWriteable(BeanMap
map) {
for (String key : map.readMethods.keySet()) { if (getWriteMethod(key) ... | 3.26 |
querydsl_BeanMap_toString_rdh | // Map interface
// -------------------------------------------------------------------------
@Override
public String toString() {
return ("BeanMap<" + bean) + ">";
} | 3.26 |
querydsl_MongodbExpressions_geoIntersects_rdh | /**
* Finds documents whose geospatial data intersects
*
* @param expr
* location
* @param latVal
* latitude
* @param longVal
* longitude
* @return predicate
*/
public static BooleanExpression geoIntersects(Expression<Double[]> expr, double latVal, double longVal) { return Expressions.booleanOperation(M... | 3.26 |
querydsl_MongodbExpressions_near_rdh | /**
* 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
*/
public static BooleanExpression near(Expression<Double[]> expr, double latVal, double l... | 3.26 |
querydsl_MongodbExpressions_nearSphere_rdh | /**
* 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
*/
public static BooleanExpression nearSphere(Expression<Double[]> expr, doub... | 3.26 |
querydsl_MongodbExpressions_withinBox_rdh | /**
* Finds points within bounds of the rectangle
*
* @param blLatVal
* bottom left latitude
* @param blLongVal
* bottom left longitude
* @param urLatVal
* upper right latitude
* @param urLongVal
* upper right longitude
* @return predicate
*/
public static BooleanExpression withinBox(Expression<Doub... | 3.26 |
querydsl_AbstractJPAQuery_m0_rdh | /**
* Transforms results using FactoryExpression if ResultTransformer can't be used
*
* @param query
* query
* @return single result
*/
@Nullable
private Object m0(Query query) {
if (projection != null) {
Object result = query.getSingleResult();
if (result != null) {if (!result.getClass().isArray()) {... | 3.26 |
querydsl_AbstractJPAQuery_getResultList_rdh | /**
* Transforms results using FactoryExpression if ResultTransformer can't be used
*
* @param query
* query
* @return results
*/
private List<?> getResultList(Query
query) {
// TODO : use lazy fetch here?
if (projection != null) {List<?> results = query.getRe... | 3.26 |
querydsl_QueryResults_getTotal_rdh | /**
* Get the total number of results
*
* @return total rows
*/
public long getTotal() {
return total;} | 3.26 |
querydsl_QueryResults_isEmpty_rdh | /**
* Return whether there are results in the current query window
*
* @return true, if no results where found
*/
public boolean isEmpty() {
return f1.isEmpty();} | 3.26 |
querydsl_QueryResults_getOffset_rdh | /**
* Get the offset value used for the query
*
* @return applied offset
*/public long getOffset() {
return offset;
} | 3.26 |
querydsl_QueryResults_getResults_rdh | /**
* Get the results in List form
*
* An empty list is returned for no results.
*
* @return results
*/
public List<T> getResults() {
return f1;
} | 3.26 |
querydsl_MapExpressionBase_isEmpty_rdh | /**
* Create a {@code this.isEmpty()} expression
*
* @return this.isEmpty()
*/ public final BooleanExpression isEmpty() {
if
(empty == null) {
empty = Expressions.booleanOperation(Ops.MAP_IS_EMPTY, mixin);
}
return empty;
} | 3.26 |
querydsl_MapExpressionBase_containsKey_rdh | /**
* Create a {@code key in keys(this)} expression
*
* @param key
* key
* @return expression
*/
public final BooleanExpression containsKey(K key) {
return Expressions.booleanOperation(Ops.CONTAINS_KEY, mixin, ConstantImpl.create(key));
} | 3.26 |
querydsl_MapExpressionBase_contains_rdh | /**
* Create a {@code (key, value) in this} expression
*
* @param key
* key of entry
* @param value
* value of entry
* @return expression
*/
@SuppressWarnings("unchecked")
public final BooleanExpression contains(Expression<K> key, Expression<V>
value) {
return
get(key).eq(((Expression) (value)));
} | 3.26 |
querydsl_MapExpressionBase_containsValue_rdh | /**
* Create a {@code value in values(this)} expression
*
* @param value
* value
* @return expression
*/
public final BooleanExpression containsValue(V value) {
return Expressions.booleanOperation(Ops.CONTAINS_VALUE, mixin, ConstantImpl.create(value));
} | 3.26 |
querydsl_MapExpressionBase_isNotEmpty_rdh | /**
* Create a {@code !this,isEmpty()} expression
*
* @return !this.isEmpty()
*/
public final BooleanExpression isNotEmpty() {
return isEmpty().not();
}
/**
* Create a {@code this.size()} | 3.26 |
querydsl_AbstractSQLServerQuery_tableHints_rdh | /**
* Set the table hints
*
* @param tableHints
* table hints
* @return the current object
*/
public C tableHints(SQLServerTableHints... tableHints) {
if (tableHints.length > 0) {
String hints = SQLServerGrammar.tableHints(tableHints);
addJoinFlag(hints, Position.BEFORE_CONDITION);
}
... | 3.26 |
querydsl_AbstractGroupExpression_as_rdh | /**
* Create an alias for the expression
*
* @return alias expression
*/
public DslExpression<R> as(Path<R> alias)
{
return Expressions.dslOperation(getType(), Ops.ALIAS, this, alias);
} | 3.26 |
querydsl_CollectionExpressionBase_contains_rdh | /**
* Create a {@code this.contains(child)} expression
*
* <p>Evaluates to true, if child is contained in this</p>
*
* @param child
* element to check
* @return this.contains(child)
*/
public final BooleanExpression contains(Expression<E> child) {
return Expressions.booleanOperation(Ops.IN, child, mixin);... | 3.26 |
querydsl_CollectionExpressionBase_isEmpty_rdh | /**
* Create a {@code this.isEmpty()} expression
*
* <p>Evaluates to true, if this has no elements.</p>
*
* @return this.isEmpty()
*/
public final BooleanExpression isEmpty() {
if (empty == null)
{
empty = Expressions.bool... | 3.26 |
querydsl_CollectionExpressionBase_size_rdh | /**
* Create a {@code this.size()} expression
*
* <p>Gets the number of elements in this collection</p>
*
* @return this.size()
*/
public final NumberExpression<Integer> size() {
if (size == null) {
size = Expressions.numberOperation(Integer.class, Ops.COL_SIZE, mixin);
}
return size;
} | 3.26 |
querydsl_SurfaceExpression_centroid_rdh | /**
* The mathematical centroid for this Surface as a Point. The result is not guaranteed to
* be on this Surface.
*
* @return centroid
*/
public PointExpression<Point> centroid() {
if (centroid == null) {
centroid = GeometryExpressions.pointOperation(SpatialOps.CENTROID, mixin);
}
... | 3.26 |
querydsl_SurfaceExpression_pointOnSurface_rdh | /**
* A Point guaranteed to be on this Surface.
*
* @return point on surface
*/
public PointExpression<Point> pointOnSurface() {
if (pointOnSurface == null) {
pointOnSurface = GeometryExpressions.pointOperation(SpatialOps.POINT_ON_SURFACE, mixin);
}return pointOnSurface;
} | 3.26 |
querydsl_WindowRows_unboundedPreceding_rdh | /**
* Intermediate step
*/public class Between {
public BetweenAnd unboundedPreceding() {
str.append(UNBOUNDED);
str.append(PRECEDING);
return new BetweenAnd();
} | 3.26 |
querydsl_AbstractDomainExporter_execute_rdh | /**
* Export the contents
*
* @throws IOException
*/
public void execute() throws IOException {
// collect types
try {
collectTypes();
} catch (Exception e) {
throw new QueryException(e);
}
// go through supertypes
Set<Supertype> ... | 3.26 |
querydsl_AbstractCollQuery_from_rdh | /**
* Add a query source
*
* @param <A>
* type of expression
* @param entity
* Path for the source
* @param col
* content of the source
* @return current object
*/
public <A> Q from(Path<A> entity, Iterable<? extends A> col) {
iterables.put(entity, col);
m1().addJoin(JoinType.DEFAULT, entity);
... | 3.26 |
querydsl_AbstractCollQuery_m2_rdh | /**
* Define a left join from the Collection typed path to the alias
*
* @param <P>
* type of expression
* @param target
* target of the join
* @param alias
* alias for the join target
* @return current object
*/
public <P> Q m2(Path<? extends Collection<P>> target, Path<P> alias) {
m1().addJoin(Joi... | 3.26 |
querydsl_AbstractCollQuery_innerJoin_rdh | /**
* Define an inner join from the Map typed path to the alias
*
* @param <P>
* type of expression
* @param target
* target of the join
* @param alias
* alias for the join target
* @return current object
*/
public <P> Q innerJoin(MapExpression<?, P> target, Path<P> alias) {
m1().addJoin(JoinType.IN... | 3.26 |
querydsl_AbstractCollQuery_bind_rdh | /**
* 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
*/
public <A> Q bind(Path<A> entity, Iterable<? extends A> col) {iterables.put(entity, col);
ret... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.