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

Java Query类代码示例

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

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



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

示例1: initRequiresTransaction

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
private void initRequiresTransaction(RepositoryMethodMetadata repositoryMethodMetadata)
{
    boolean requiresTransaction = false;
    
    if (ClassUtils.containsMethod(EntityRepositoryHandler.class, repositoryMethodMetadata.getMethod()))
    {
        Method originalMethod = ClassUtils.extractMethod(EntityRepositoryHandler.class,
                repositoryMethodMetadata.getMethod());
        if (originalMethod.isAnnotationPresent(RequiresTransaction.class))
        {
            requiresTransaction = true;
        }
    }

    Query query = repositoryMethodMetadata.getQuery();
    Modifying modifying = repositoryMethodMetadata.getModifying();
    
    if ((query != null && !query.lock().equals(LockModeType.NONE)) || modifying != null)
    {
        requiresTransaction = true;
    }
    
    repositoryMethodMetadata.setRequiresTransaction(requiresTransaction);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:25,代码来源:RepositoryMethodMetadataInitializer.java


示例2: SUM

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("SELECT SUM(c.price) FROM Car c WHERE upper(c.model) like :model")
Double getTotalPriceByModel(@QueryParam("model") String model);
 
开发者ID:adminfaces,项目名称:admin-persistence,代码行数:3,代码来源:CarRepository.java


示例3: findAllOrdered

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("SELECT m FROM Message m ORDER BY m.timestamp DESC")
List<Message> findAllOrdered();
 
开发者ID:redhat-developer-demos,项目名称:kubernetes-lab,代码行数:3,代码来源:MessageRepository.java


示例4: findByName

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("SELECT d FROM Depositor d WHERE d.name=:name")
List<Depositor> findByName(@QueryParam("name") String name);
 
开发者ID:dadrus,项目名称:jpa-unit,代码行数:3,代码来源:DepositorRepository.java


示例5: IN

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select BPM from BpMain BPM where BPM.id IN (select BPM.id from BPM.bpRoleses bpr where bpr.roleCode.id= ?1)")
List<BpMain> findAllCustomer(int role);
 
开发者ID:Contourdynamics,项目名称:smartcommunication,代码行数:3,代码来源:BpMainRepos.java


示例6: deleteAll

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(named = "delete.all")
@Modifying
void deleteAll();
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:4,代码来源:Java8Repository.java


示例7: loadAll

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select e from MyEntity e")
List<MyEntity> loadAll();
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:Java8Repository.java


示例8: findByCourse

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(value = "select e from MyEntity e where e.courseName = ?1", singleResult = OPTIONAL)
MyEntity findByCourse(@NotNull String courseName);
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:Java8Repository.java


示例9: find

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(value = "select e from AnotherEntity e where e.courseName = ?1", singleResult = OPTIONAL)
AnotherEntity find(@NotNull String courseName);
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:Java8Repository.java


示例10: findOptional

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select e from AnotherEntity e where e.courseName = ?1")
AnotherEntity findOptional(@NotNull String courseName);
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:Java8Repository.java


示例11: deleteAll

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(named = "delete.all")
@Modifying
abstract void deleteAll();
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:4,代码来源:MyRepository.java


示例12: loadAll

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select e from MyEntity e")
abstract List<MyEntity> loadAll();
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:MyRepository.java


示例13: findByCourse

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(value = "select e from MyEntity e where e.courseName = ?1", singleResult = OPTIONAL)
abstract MyEntity findByCourse(@NotNull String courseName);
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:MyRepository.java


示例14: find

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(value = "select e from AnotherEntity e where e.courseName = ?1", singleResult = OPTIONAL)
abstract AnotherEntity find(@NotNull String courseName);
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:MyRepository.java


示例15: findOptional

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select e from AnotherEntity e where e.courseName = ?1")
abstract AnotherEntity findOptional(@NotNull String courseName);
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:3,代码来源:MyRepository.java


示例16: findCourse

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query(value = "select c from Course c left outer join fetch c.enrollmentList where c.courseId = :courseId",
        singleResult = SingleResultType.OPTIONAL)
public Course findCourse(@QueryParam("courseId") int courseId);
 
开发者ID:johnament,项目名称:restful-and-beyond-tut2184,代码行数:4,代码来源:CourseRepository.java


示例17: listAllCourses

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select c from Course c left outer join fetch c.enrollmentList order by c.courseId desc")
public List<Course> listAllCourses();
 
开发者ID:johnament,项目名称:restful-and-beyond-tut2184,代码行数:3,代码来源:CourseRepository.java


示例18: findByCourse

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select e from Enrollment e where e.course = :course")
public List<Enrollment> findByCourse(Course course);
 
开发者ID:johnament,项目名称:restful-and-beyond-tut2184,代码行数:3,代码来源:EnrollmentRepository.java


示例19: findByname

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("select e from Employees e where lastName like :name")
public List<Employees> findByname(@QueryParam("name") String name);
 
开发者ID:johnament,项目名称:restful-and-beyond-tut2184,代码行数:3,代码来源:EmployeeRepository.java


示例20: findAllByAge

import org.apache.deltaspike.data.api.Query; //导入依赖的package包/类
@Query("SELECT p FROM Person p where age = ?1")
List<Person> findAllByAge(Integer age);
 
开发者ID:gabfssilva,项目名称:deltaspike-jpa-jsf,代码行数:3,代码来源:PersonRepository.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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