• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Expressions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.mysema.query.support.Expressions的典型用法代码示例。如果您正苦于以下问题:Java Expressions类的具体用法?Java Expressions怎么用?Java Expressions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Expressions类属于com.mysema.query.support包,在下文中一共展示了Expressions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildOrderPropertyPathFrom

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private Expression<?> buildOrderPropertyPathFrom(JoinerQuery<?, ?> joinerQuery, Sort.Order order) {
    PathBuilder<?> builder = new PathBuilder<Object>(joinerQuery.getFrom().getType(), joinerQuery.getFrom().toString());

    PropertyPath path = PropertyPath.from(order.getProperty(), builder.getType());
    Expression<?> sortPropertyExpression = builder;

    while (path != null) {

        if (!path.hasNext() && order.isIgnoreCase()) {
            // if order is ignore-case we have to treat the last path segment as a String.
            sortPropertyExpression = Expressions.stringPath((Path<?>) sortPropertyExpression, path.getSegment()).lower();
        } else {
            sortPropertyExpression = Expressions.path(path.getType(), (Path<?>) sortPropertyExpression, path.getSegment());
        }

        path = path.next();
    }

    return sortPropertyExpression;
}
 
开发者ID:encircled,项目名称:Joiner,代码行数:21,代码来源:PageableFeature.java


示例2: getOmCounts

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@Override
@Transactional(readOnly = true)
public OptionalHashMap<String, Long> getOmCounts(MinSupportCountSettings minSupportCountSettings) {

    Expression<String> caseBuilder = new CaseBuilder()
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_WAITING).then(new ConstantImpl<>(Show.waiting.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_RUNNING(minSupportCountSettings)).then(new ConstantImpl<>(Show.running.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_PREPARATION).then(new ConstantImpl<>(Show.preparation.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_REVIEW).then(new ConstantImpl<>(Show.review.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_OM_CANCELED).then(new ConstantImpl<>(Show.canceled.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_SENT_TO_PARLIAMENT).then(new ConstantImpl<>(Show.sentToParliament.name()))
            .otherwise(Show.ended.name());
    SimpleExpression<String> simpleExpression = Expressions.as(caseBuilder, "showCategory");
    Map<String, Long> map = queryFactory
            .from(qInitiative)
            .groupBy(simpleExpression)
            .map(simpleExpression, qInitiative.count());

    return new OptionalHashMap<>(map);

}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:22,代码来源:InitiativeDaoImpl.java


示例3: getPublicCounts

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@Override
@Transactional(readOnly = true)
public OptionalHashMap<String, Long> getPublicCounts(MinSupportCountSettings minSupportCountSettings) {

    Expression<String> caseBuilder = new CaseBuilder()
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_WAITING).then(new ConstantImpl<>(Show.waiting.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_RUNNING(minSupportCountSettings)).then(new ConstantImpl<>(Show.running.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_CANCELED).then(new ConstantImpl<>(Show.canceled.name()))
            .when(InitiativeDaoSearchExpressions.INITIATIVE_IS_SENT_TO_PARLIAMENT).then(new ConstantImpl<>(Show.sentToParliament.name()))
            .otherwise(Show.ended.name());
    SimpleExpression<String> simpleExpression = Expressions.as(caseBuilder, "showCategory");
    Map<String, Long> map = queryFactory
            .from(qInitiative)
            .where(InitiativeDaoSearchExpressions.INITIATIVE_PUBLIC_ALL())
            .groupBy(simpleExpression)
            .map(simpleExpression, qInitiative.count());

    return new OptionalHashMap<>(map);

}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:21,代码来源:InitiativeDaoImpl.java


示例4: QAuthor

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@Test
public void sec020201_定数値をカラムとして照会する() {

	Expression<Integer> const1 = Expressions.constant(1);
	Expression<String> const2 = Expressions.constant("string");

	QAuthor a = new QAuthor("a");
	SQLQuery query = queryDslJdbcOperations.newSqlQuery();
	query.from(a);
	List<Tuple> list = queryDslJdbcOperations.query(query, new QTuple(a.id,
			const1, const2));

	for (Tuple tuple : list) {
		Long valId = tuple.get(a.id);
		Integer valConst1 = tuple.get(const1);
		String valConst2 = tuple.get(const2);
		out.println(format("{0}: const1={1}, const2={2}", valId, valConst1,
				valConst2));
	}
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:21,代码来源:SelectClauseTest.java


示例5: handleListStylesWithQuery

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private CompletableFuture<Page<Style>> handleListStylesWithQuery (final ListStyles listStyles) {
	final BooleanExpression styleInUse = new SQLSubQuery ()
		.from (layerStyle)
		.where (layerStyle.styleId.eq (style.id))
		.exists ();
	
	final AsyncSQLQuery baseQuery = db
		.query()
		.from(style)
		.orderBy (style.name.asc ());

	if (listStyles.getQuery () != null) {
		baseQuery.where (style.name.containsIgnoreCase (listStyles.getQuery ()));
	}
	
	if (listStyles.getStyleType() != null) {
		baseQuery.where (style.styleType.eq(listStyles.getStyleType()));
	}
	
	final AsyncSQLQuery listQuery = baseQuery.clone ();
	
	singlePage (listQuery, listStyles.getPage ());
	
	return baseQuery
		.count ()
		.thenCompose ((count) -> {
			final Page.Builder<Style> builder = new Page.Builder<> ();
			
			addPageInfo (builder, listStyles.getPage (), count);
			
			return listQuery
				.list (new QStyle (style.identification, style.name, style.styleSchemeType, Expressions.constant(""), style.styleType, styleInUse))
				.thenApply ((styles) -> {
					builder.addAll (styles.list ());
					return builder.build ();
				});
		});
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:39,代码来源:StyleAdmin.java


示例6: visitGenericQueryDslMethod

import com.mysema.query.support.Expressions; //导入依赖的package包/类
protected void visitGenericQueryDslMethod(Node node, String queryDslMethod) {
    final Node leftNode = node.getLeft();
    final boolean leftNodeIsLiteral = leftNode instanceof LiteralNode;
    if (leftNodeIsLiteral) {
        // Must transform this left node literal to an expression in order to use QueryDSL expression syntax for operation and right node
        queryDslCode.append(useClass(Expressions.class)).append(".");
        if (leftNode instanceof TemporalLiteralNode) {
            queryDslCode.append("comparableTemplate(").append(useClass(Date.class)).append(".class, \"{0}\", ");
        } else if (leftNode instanceof StringLiteralNode) {
            queryDslCode.append("stringTemplate(\"{0}\", ");
        } else if (leftNode instanceof FloatLiteralNode) {
            queryDslCode.append("numberTemplate(").append(useClass(Float.class)).append(".class, \"{0}\", ");
        } else if (leftNode instanceof LongLiteralNode) {
            queryDslCode.append("numberTemplate(").append(useClass(Long.class)).append(".class, \"{0}\", ");
        } else if (leftNode instanceof DoubleLiteralNode) {
            queryDslCode.append("numberTemplate(").append(useClass(Double.class)).append(".class, \"{0}\", ");
        } else if (leftNode instanceof IntegerLiteralNode) {
            queryDslCode.append("numberTemplate(").append(useClass(Integer.class)).append(".class, \"{0}\", ");
        } else if (leftNode instanceof BooleanLiteralNode) {
            queryDslCode.append("booleanTemplate(\"{0}\", ");
        }
    }
    visitInspectInstance(leftNode);
    if (leftNodeIsLiteral) {
        queryDslCode.append(")");
    }
    queryDslCode.append("." + queryDslMethod + "(");
    visitInspectInstance(node.getRight());
    queryDslCode.append(")");
}
 
开发者ID:iorga-group,项目名称:ivif,代码行数:31,代码来源:QueryParser.java


示例7: QTodo

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@Test
public void sec020502_CASE式を指定する_検索CASE式() {

	/* 抽出条件を組み立てる。 */
	QTodo a = new QTodo("a");
	SQLQuery query = queryDslJdbcOperations.newSqlQuery();
	query.from(a);

	/* CASE式を組立てる。 */
	Expression<String> doneDesc = Expressions.cases().when(a.doneFlg.eq(1))
			.then("実施済").when(a.dueDt.lt(new LocalDate(2015, 2, 1)))
			.then("未実施(期限内)").otherwise("未実施(期限切)");

	/* 取出すカラムとデータの取出し方を指定してクエリを発行する。 */
	List<Tuple> list = queryDslJdbcOperations.query(query, new QTuple(a.id,
			a.dueDt, a.doneFlg, doneDesc));

	/* クエリの結果を表示する。 */
	for (Tuple tuple : list) {
		Long valId = tuple.get(a.id);
		LocalDate valDueDt = tuple.get(a.dueDt);
		Integer valDoneFlg = tuple.get(a.doneFlg);
		String valDoneDesc = tuple.get(doneDesc);
		out.println(format(
				"{0}: dueDt={1}, doneFlg={2}, doneDesc(CASE)={3}", valId,
				valDueDt, valDoneFlg, valDoneDesc));
	}
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:29,代码来源:SelectClauseTest.java


示例8: executeGetDatasetStatus

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private Object executeGetDatasetStatus(GetDatasetStatus query) {		
	SQLQuery baseQuery = query().from(datasetStatus)
		.join(dataset).on(dataset.id.eq(datasetStatus.id));
	
	Expression<DatasetStatusInfo> expression = 
			new QDatasetStatusInfo(					
					dataset.identification, 
					datasetStatus.columnsChanged, 
					datasetStatus.filterConditionChanged, 
					datasetStatus.sourceDatasetChanged, 
					datasetStatus.imported, 
					Expressions.constant(false), 
					datasetStatus.sourceDatasetColumnsChanged, 
					datasetStatus.sourceDatasetRevisionChanged);
	
	String datasourceId = query.getDatasetId();
	if(datasourceId == null) {		
		return new TypedList<>(
			DatasetStatusInfo.class,
			
			baseQuery.list(expression));
	} else {
		return
			baseQuery.where(dataset.identification.eq(datasourceId))
			.singleResult(expression);
	}
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:28,代码来源:PublisherTransaction.java


示例9: constExpression

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private <T> Expression<T> constExpression(T value) {
	if(value instanceof Serializable) {
		return Expressions.constant(value);
	} else {
		throw new IllegalArgumentException("value is not serializable");
	}
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:8,代码来源:AsyncSQLInsertClause.java


示例10: asExpressions

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private Expression<?>[] asExpressions(Object... args) {
	Expression<?>[] exprArgs = new Expression<?>[args.length];
	
	int i = 0;
	for(Object arg : args) {
		if(arg instanceof Expression) {
			exprArgs[i++] = (Expression<?>)arg;
		} else {
			exprArgs[i++] = Expressions.constant(arg);
		}
	}
	return exprArgs;
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:14,代码来源:AsyncSQLQuery.java


示例11: isConfidential

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private BooleanExpression isConfidential () {
	final QLeafLayer leafLayer = new QLeafLayer ("leaf_layer2");
	
	return new SQLSubQuery ()
		.from (groupStructure)
		.join (leafLayer).on (groupStructure.childLayerId.eq (leafLayer.genericLayerId))
		.join (dataset).on (leafLayer.datasetId.eq (dataset.id))
		.join (sourceDataset).on (dataset.sourceDatasetId.eq (sourceDataset.id))
		.where (groupStructure.groupLayerIdentification.eq (genericLayer.identification))
		.where (Expressions.booleanOperation (Ops.EQ, Expressions.constant (true), new SQLSubQuery ().from (sourceDatasetVersion).where (sourceDatasetVersion.sourceDatasetId.eq (sourceDataset.id)).orderBy (sourceDatasetVersion.createTime.desc ()).limit (1).list (sourceDatasetVersion.confidential)))
		.exists ();
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:13,代码来源:LayerGroupAdmin.java


示例12: isWmsOnly

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private BooleanExpression isWmsOnly () {
	final QLeafLayer leafLayer = new QLeafLayer ("leaf_layer2");
	
	return new SQLSubQuery ()
		.from (groupStructure)
		.join (leafLayer).on (groupStructure.childLayerId.eq (leafLayer.genericLayerId))
		.join (dataset).on (leafLayer.datasetId.eq (dataset.id))
		.join (sourceDataset).on (dataset.sourceDatasetId.eq (sourceDataset.id))
		.where (groupStructure.groupLayerIdentification.eq (genericLayer.identification))
		.where (Expressions.booleanOperation (Ops.EQ, Expressions.constant (true), new SQLSubQuery ().from (sourceDatasetVersion).where (sourceDatasetVersion.sourceDatasetId.eq (sourceDataset.id)).orderBy (sourceDatasetVersion.createTime.desc ()).limit (1).list (sourceDatasetVersion.wmsOnly)))
		.exists ();
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:13,代码来源:LayerGroupAdmin.java


示例13: isConfidential

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private BooleanExpression isConfidential () {
	return new SQLSubQuery ()
		.from (serviceStructure)
		.join (leafLayer).on (serviceStructure.childLayerId.eq (leafLayer.genericLayerId))
		.join (dataset).on (leafLayer.datasetId.eq (dataset.id))
		.join (sourceDataset).on (dataset.sourceDatasetId.eq (sourceDataset.id))
		.where (serviceStructure.serviceIdentification.eq (genericLayer.identification))
		.where (Expressions.booleanOperation (Ops.EQ, Expressions.constant (true), new SQLSubQuery ().from (sourceDatasetVersion).where (sourceDatasetVersion.sourceDatasetId.eq (sourceDataset.id)).orderBy (sourceDatasetVersion.createTime.desc ()).limit (1).list (sourceDatasetVersion.confidential)))
		.exists ();
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:11,代码来源:ServiceAdmin.java


示例14: isWmsOnly

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private BooleanExpression isWmsOnly () {
	return new SQLSubQuery ()
		.from (serviceStructure)
		.join (leafLayer).on (serviceStructure.childLayerId.eq (leafLayer.genericLayerId))
		.join (dataset).on (leafLayer.datasetId.eq (dataset.id))
		.join (sourceDataset).on (dataset.sourceDatasetId.eq (sourceDataset.id))
		.where (serviceStructure.serviceIdentification.eq (genericLayer.identification))
		.where (Expressions.booleanOperation (Ops.EQ, Expressions.constant (true), new SQLSubQuery ().from (sourceDatasetVersion).where (sourceDatasetVersion.sourceDatasetId.eq (sourceDataset.id)).orderBy (sourceDatasetVersion.createTime.desc ()).limit (1).list (sourceDatasetVersion.wmsOnly)))
		.exists ();
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:11,代码来源:ServiceAdmin.java


示例15: with

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@Override
public WithBuilder<Q> with(Path<?> alias, Path<?>... columns) {
    Expression<?> columnsCombined = ExpressionUtils.list(Object.class, columns);
    Expression<?> aliasCombined = Expressions.operation(alias.getType(), SQLOps.WITH_COLUMNS, alias, columnsCombined);
    return new WithBuilder<Q>(queryMixin, aliasCombined);
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:7,代码来源:AbstractAsyncSQLQuery.java


示例16: executeGetDatasetInfo

import com.mysema.query.support.Expressions; //导入依赖的package包/类
private Object executeGetDatasetInfo(GetDatasetInfo gds) {
	String datasetIdent = gds.getId();
	log.debug("get dataset " + datasetIdent);

	final SQLQuery query = query().from(dataset)
		.join (sourceDataset).on(dataset.sourceDatasetId.eq(sourceDataset.id))
		.join(sourceDatasetVersion).on(
			sourceDatasetVersion.sourceDatasetId.eq(dataset.sourceDatasetId)
			.and(new SQLSubQuery().from(sourceDatasetVersionSub)
					.where(sourceDatasetVersionSub.sourceDatasetId.eq(sourceDatasetVersion.sourceDatasetId)
						.and(sourceDatasetVersionSub.id.gt(sourceDatasetVersion.id)))
					.notExists()))
		.leftJoin (category).on(sourceDatasetVersion.categoryId.eq(category.id))
		.leftJoin (datasetStatus).on (datasetStatus.id.eq (dataset.id))
		.leftJoin (lastImportJob).on (lastImportJob.datasetId.eq (dataset.id))			
		.leftJoin (datasetActiveNotification).on (datasetActiveNotification.datasetId.eq (dataset.id))
		.where(dataset.identification.eq( datasetIdent ))
		.orderBy (datasetActiveNotification.jobCreateTime.desc ());
	
	final List<StoredNotification> notifications = new ArrayList<> ();
	Tuple lastTuple = null;
	
	for (final Tuple t: query.list (
			dataset.identification, 
			dataset.name, 
			sourceDataset.identification, 
			sourceDatasetVersion.name,
			category.identification,
			category.name, 
			dataset.filterConditions,
			datasetStatus.imported,
			Expressions.constant(false),
			datasetStatus.sourceDatasetColumnsChanged,
			lastImportJob.finishTime,
			lastImportJob.finishState,				
			datasetActiveNotification.notificationId,
			datasetActiveNotification.notificationType,
			datasetActiveNotification.notificationResult,
			datasetActiveNotification.jobId,
			datasetActiveNotification.jobType,
			new SQLSubQuery ().from (leafLayer).where (leafLayer.datasetId.eq (dataset.id)).count ().as (layerCountPath),
			sourceDatasetVersion.confidential,
			sourceDatasetVersion.wmsOnly,
			dataset.metadataFileIdentification
		)) {
		
		if (t.get (datasetActiveNotification.notificationId) != null) {
			notifications.add (createStoredNotification (t));
		}
		
		lastTuple = t;
	}
	
	if (lastTuple == null) {
		return null;
	} else {		
		return createDatasetInfo (lastTuple, notifications);
	}
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:60,代码来源:PublisherTransaction.java


示例17: withServiceStructure

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static <U extends SQLCommonQuery<U>> U withServiceStructure (final U query, final QGenericLayer parent, final QGenericLayer child) {
	final SimpleExpression<String> pathElement = Expressions.template(
			String.class, 
			"'(' || {0} || ',' || {1} || ')'", 
			child.id, 
			parent.id);
	
	return query.withRecursive(serviceStructure,
			serviceStructure.serviceIdentification,
			serviceStructure.childLayerId, 
			serviceStructure.childLayerIdentification,
			serviceStructure.parentLayerId,
			serviceStructure.parentLayerIdentification,
			serviceStructure.layerOrder,
			serviceStructure.styleIdentification,
			serviceStructure.styleName,
			serviceStructure.path,
			serviceStructure.cycle,
			serviceStructure.leafLayerId,
			serviceStructure.datasetId,
			serviceStructure.layerName).as(
			new SQLSubQuery().unionAll(
				new SQLSubQuery().from(layerStructure)
					.join(child).on(child.id.eq(layerStructure.childLayerId))
					.join(parent).on(parent.id.eq(layerStructure.parentLayerId))
					.join(service).on(service.genericLayerId.eq(layerStructure.parentLayerId))
					.join(genericLayer).on(service.genericLayerId.eq(genericLayer.id))
					.leftJoin(leafLayer).on(leafLayer.genericLayerId.eq(child.id))
					.leftJoin(style).on(style.id.eq(layerStructure.styleId))
					.list(
						genericLayer.identification, 
						child.id,
						child.identification,
						parent.id,
						parent.identification,
						layerStructure.layerOrder,
						style.identification,
						style.name,
						pathElement,
						Expressions.template(Boolean.class, "false"),
						leafLayer.id,
						leafLayer.datasetId,
						child.name),
				new SQLSubQuery().from(layerStructure)
					.join(child).on(child.id.eq(layerStructure.childLayerId))
					.join(parent).on(parent.id.eq(layerStructure.parentLayerId))
					.join(serviceStructure).on(
						serviceStructure.childLayerId.eq(layerStructure.parentLayerId)
						.and(serviceStructure.cycle.not()))
					.leftJoin(leafLayer).on(leafLayer.genericLayerId.eq(child.id))
					.leftJoin(style).on(style.id.eq(layerStructure.styleId))
					.list(
						serviceStructure.serviceIdentification, 
						child.id,
						child.identification,
						parent.id,
						parent.identification,
						layerStructure.layerOrder,
						style.identification,
						style.name,
						serviceStructure.path
							.concat(pathElement),
						Expressions.template(
							Boolean.class, 
							"{0} like '%(' || {1} || ',' || {2} || ')%'", 
							serviceStructure.path, 
							child.id, 
							parent.id),
						leafLayer.id,
						leafLayer.datasetId,
						child.name)));
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:74,代码来源:QServiceStructure.java


示例18: withGroupStructure

import com.mysema.query.support.Expressions; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static <U extends SQLCommonQuery<U>> U withGroupStructure (final U query, final QGenericLayer parent, final QGenericLayer child) {
	final SimpleExpression<String> pathElement = Expressions.template(
			String.class, 
			"'(' || {0} || ',' || {1} || ')'", 
			child.id, 
			parent.id);
		
	return query.withRecursive(groupStructure, 
		groupStructure.groupLayerIdentification,
		groupStructure.childLayerId, 
		groupStructure.childLayerIdentification,
		groupStructure.parentLayerId,
		groupStructure.parentLayerIdentification,
		groupStructure.layerOrder,
		groupStructure.styleIdentification,
		groupStructure.styleName,
		groupStructure.path,
		groupStructure.cycle).as(
		new SQLSubQuery().unionAll( 
			new SQLSubQuery().from(layerStructure)
				.join(child).on(child.id.eq(layerStructure.childLayerId))
				.join(parent).on(parent.id.eq(layerStructure.parentLayerId))
				.join(genericLayer).on(genericLayer.id.eq(layerStructure.parentLayerId))
				.leftJoin(style).on(style.id.eq(layerStructure.styleId))
				.list(
					genericLayer.identification, 
					child.id,
					child.identification,
					parent.id,
					parent.identification,
					layerStructure.layerOrder,
					style.identification,
					style.name,
					pathElement,
					Expressions.template(Boolean.class, "false")),
			new SQLSubQuery().from(layerStructure)
				.join(child).on(child.id.eq(layerStructure.childLayerId))
				.join(parent).on(parent.id.eq(layerStructure.parentLayerId))
				.join(groupStructure).on(groupStructure.childLayerId.eq(layerStructure.parentLayerId)
					.and(groupStructure.cycle.not()))
				.leftJoin(style).on(style.id.eq(layerStructure.styleId))
				.list(
					groupStructure.groupLayerIdentification, 
					child.id,
					child.identification,
					parent.id,
					parent.identification,
					layerStructure.layerOrder,
					style.identification,
					style.name,
					groupStructure.path
						.concat(pathElement),
					Expressions.template(
						Boolean.class, 
						"{0} like '%(' || {1} || ',' || {2} || ')%'", 
						groupStructure.path, 
						child.id, 
						parent.id))));
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:61,代码来源:QGroupStructure.java


示例19: simplePath

import com.mysema.query.support.Expressions; //导入依赖的package包/类
/**
 * テーブルに相当するパスを取得する。
 * 
 * @param variable テーブル別名。
 * @return テーブルのパス。
 */
public static SimplePath<Tuple> simplePath(String variable) {
	return Expressions.path(Tuple.class, variable);
}
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:10,代码来源:PathExpressions.java


示例20: booleanPath

import com.mysema.query.support.Expressions; //导入依赖的package包/类
/**
 * 真偽値カラムに相当するパスを取得する。
 * 
 * @param parent テーブルのパス。
 * @param property カラム別名。
 * @return カラムのパス。
 */
public static BooleanPath booleanPath(Path<?> parent, String property) {
	return Expressions.booleanPath(parent, property);
}
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:11,代码来源:PathExpressions.java



注:本文中的com.mysema.query.support.Expressions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SSE类代码示例发布时间:2022-05-22
下一篇:
Java MastershipService类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap