当前位置: 首页>>代码示例>>Java>>正文


Java JPAQuery.fetchOne方法代码示例

本文整理汇总了Java中com.querydsl.jpa.impl.JPAQuery.fetchOne方法的典型用法代码示例。如果您正苦于以下问题:Java JPAQuery.fetchOne方法的具体用法?Java JPAQuery.fetchOne怎么用?Java JPAQuery.fetchOne使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.querydsl.jpa.impl.JPAQuery的用法示例。


在下文中一共展示了JPAQuery.fetchOne方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getByProjectAndVersion

import com.querydsl.jpa.impl.JPAQuery; //导入方法依赖的package包/类
@Override
public ProjectVersion getByProjectAndVersion(Project project, String version) {
	JPAQuery<ProjectVersion> query = new JPAQuery<>(getEntityManager());
	
	query
		.select(qProjectVersion)
		.from(qProjectVersion)
		.where(qProjectVersion.project.eq(project))
		.where(qProjectVersion.version.eq(version));
	
	return query.fetchOne();
}
 
开发者ID:openwide-java,项目名称:artifact-listener,代码行数:13,代码来源:ProjectVersionDaoImpl.java

示例2: getOldGoogleOpenIdProfile

import com.querydsl.jpa.impl.JPAQuery; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public User getOldGoogleOpenIdProfile(String email) {
	JPAQuery<User> query = new JPAQuery<>(getEntityManager());
	QUser qUser = QUser.user;
	
	query.select(qUser).from(qUser).where(qUser.userName.eq(email + "__" + AuthenticationType.OPENID_GOOGLE))
			.where(qUser.authenticationType.eq(AuthenticationType.OPENID_GOOGLE));
	
	return query.fetchOne();
}
 
开发者ID:openwide-java,项目名称:artifact-listener,代码行数:12,代码来源:UserDaoImpl.java

示例3: getByGroupIdArtifactId

import com.querydsl.jpa.impl.JPAQuery; //导入方法依赖的package包/类
@Override
public Artifact getByGroupIdArtifactId(String groupId, String artifactId) {
	JPAQuery<Artifact> query = new JPAQuery<>(getEntityManager());
	
	query
		.select(qArtifact)
		.from(qArtifact)
		.where(qArtifact.group.groupId.eq(groupId))
		.where(qArtifact.artifactId.eq(artifactId));
	
	return query.fetchOne();
}
 
开发者ID:openwide-java,项目名称:artifact-listener,代码行数:13,代码来源:ArtifactDaoImpl.java

示例4: getByFollowedArtifactAndRegex

import com.querydsl.jpa.impl.JPAQuery; //导入方法依赖的package包/类
@Override
public ArtifactNotificationRule getByFollowedArtifactAndRegex(FollowedArtifact followedArtifact, String regex) {
	JPAQuery<ArtifactNotificationRule> query = new JPAQuery<>(getEntityManager());
	
	query
		.select(qArtifactNotificationRule)
		.from(qArtifactNotificationRule)
		.where(qArtifactNotificationRule.followedArtifact.eq(followedArtifact))
		.where(qArtifactNotificationRule.regex.eq(regex));
	
	return query.fetchOne();
}
 
开发者ID:openwide-java,项目名称:artifact-listener,代码行数:13,代码来源:ArtifactNotificationRuleDaoImpl.java

示例5: getByArtifactAndVersion

import com.querydsl.jpa.impl.JPAQuery; //导入方法依赖的package包/类
@Override
public ArtifactVersion getByArtifactAndVersion(Artifact artifact, String version) {
	JPAQuery<ArtifactVersion> query = new JPAQuery<>(getEntityManager());
	
	query.select(qArtifactVersion)
		.from(qArtifactVersion)
		.where(qArtifactVersion.artifact.eq(artifact),
				qArtifactVersion.version.eq(version));
	
	return query.fetchOne();
}
 
开发者ID:openwide-java,项目名称:artifact-listener,代码行数:12,代码来源:ArtifactVersionDaoImpl.java


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