com.querydsl.core.types.dsl.SimpleExpression Java Examples

The following examples show how to use com.querydsl.core.types.dsl.SimpleExpression. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConnectionRepository.java    From flair-engine with Apache License 2.0 5 votes vote down vote up
/**
 * Customize the {@link QuerydslBindings} for the given root.
 *
 * @param bindings the {@link QuerydslBindings} to customize, will never be {@literal null}.
 * @param root     the entity root, will never be {@literal null}.
 */
@Override
default void customize(QuerydslBindings bindings, QConnection root) {
    bindings.bind(root.connectionType.id).first(SimpleExpression::eq);
    bindings.bind(root.name).first(SimpleExpression::eq);
    bindings.bind(root.linkId).first(SimpleExpression::eq);
}
 
Example #2
Source File: ConnectionParameterRepository.java    From flair-engine with Apache License 2.0 5 votes vote down vote up
/**
 * Customize the {@link QuerydslBindings} for the given root.
 *
 * @param bindings the {@link QuerydslBindings} to customize, will never be {@literal null}.
 * @param root     the entity root, will never be {@literal null}.
 */
@Override
default void customize(QuerydslBindings bindings, QConnectionParameter root) {
    bindings.bind(root.value).first(SimpleExpression::eq);
    bindings.bind(root.name).first(SimpleExpression::eq);
    bindings.bind(root.linkId).first(SimpleExpression::eq);
}
 
Example #3
Source File: CatalogItemFinder.java    From jeeshop with Apache License 2.0 5 votes vote down vote up
public <T extends CatalogItem, P extends CatalogItem> List<P> findForeignHolder(EntityPath<P> hp,
                                                                                ListPath<T, ? extends SimpleExpression<T>> h, T c) {

    return new JPAQueryFactory(entityManager)
            .selectFrom(hp)
            .where(h.contains(c))
            .fetch();
}
 
Example #4
Source File: QuerydslQueryBackend.java    From crnk-framework with Apache License 2.0 4 votes vote down vote up
@Override
public void addParentPredicate(MetaAttribute primaryKeyAttr) {
	List<?> parentIds = queryImpl.getParentIds();
	SimpleExpression<?> parentIdPath = (SimpleExpression<?>) QuerydslUtils.get(parentFrom, primaryKeyAttr.getName());
	addPredicate(parentIdPath.in((List) parentIds));
}
 
Example #5
Source File: QuerydslQueryBackend.java    From katharsis-framework with Apache License 2.0 4 votes vote down vote up
@Override
public void addParentPredicate(MetaAttribute primaryKeyAttr) {
	List<?> parentIds = queryImpl.getParentIds();
	SimpleExpression<?> parentIdPath = (SimpleExpression<?>) QuerydslUtils.get(parentFrom, primaryKeyAttr.getName());
	addPredicate(parentIdPath.in((List) parentIds));
}