org.apache.deltaspike.data.api.Query.value()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中org.apache.deltaspike.data.api.Query.value方法的一些代码示例,展示了Query.value的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.value方法的具体详情如下:
包路径:org.apache.deltaspike.data.api.Query
类名称:Query
方法名:value

Query.value介绍

暂无

代码示例

代码示例来源:origin: com.blazebit/blaze-persistence-integration-deltaspike-data-impl-1.7

  1. private boolean isValid(Query query) {
  2. return isNotEmpty(query.value()) || isNotEmpty(query.named());
  3. }

代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-data-module-impl

  1. private boolean isValid(Query query)
  2. {
  3. return isNotEmpty(query.value()) || isNotEmpty(query.named());
  4. }

代码示例来源:origin: com.blazebit/blaze-persistence-integration-deltaspike-data-impl-1.8

  1. private boolean isValid(Query query) {
  2. return isNotEmpty(query.value()) || isNotEmpty(query.named());
  3. }

代码示例来源:origin: Blazebit/blaze-persistence

  1. private boolean isValid(Query query) {
  2. return isNotEmpty(query.value()) || isNotEmpty(query.named());
  3. }

代码示例来源:origin: Blazebit/blaze-persistence

  1. private boolean isValid(Query query) {
  2. return isNotEmpty(query.value()) || isNotEmpty(query.named());
  3. }

代码示例来源:origin: com.blazebit/blaze-persistence-integration-deltaspike-data-impl-1.8

  1. private javax.persistence.Query createJpaQuery(Query query, CdiQueryInvocationContext context) {
  2. EntityManager entityManager = context.getEntityManager();
  3. Parameters params = context.getParams();
  4. javax.persistence.Query result = null;
  5. if (isNotEmpty(query.named())) {
  6. if (context.hasQueryStringPostProcessors()) {
  7. javax.persistence.Query namedQuery = entityManager.createNamedQuery(query.named());
  8. String named = factory.extract(namedQuery);
  9. String jpqlQuery = context.applyQueryStringPostProcessors(named);
  10. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  11. } else {
  12. result = params.applyTo(entityManager.createNamedQuery(query.named()));
  13. }
  14. } else if (query.isNative()) {
  15. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  16. Class<?> resultType = getQueryResultType(context.getMethod());
  17. if (isEntityType(resultType)) {
  18. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, resultType));
  19. } else {
  20. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery));
  21. }
  22. } else {
  23. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  24. context.setQueryString(jpqlQuery);
  25. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  26. }
  27. return context.applyRestrictions(result);
  28. }

代码示例来源:origin: Blazebit/blaze-persistence

  1. private javax.persistence.Query createJpaQuery(Query query, CdiQueryInvocationContext context) {
  2. EntityManager entityManager = context.getEntityManager();
  3. Parameters params = context.getParams();
  4. javax.persistence.Query result = null;
  5. if (isNotEmpty(query.named())) {
  6. if (context.hasQueryStringPostProcessors()) {
  7. javax.persistence.Query namedQuery = entityManager.createNamedQuery(query.named());
  8. String named = factory.extract(namedQuery);
  9. String jpqlQuery = context.applyQueryStringPostProcessors(named);
  10. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  11. } else {
  12. result = params.applyTo(entityManager.createNamedQuery(query.named()));
  13. }
  14. } else if (query.isNative()) {
  15. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  16. Class<?> resultType = getQueryResultType(context.getMethod());
  17. if (isEntityType(resultType)) {
  18. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, resultType));
  19. } else {
  20. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery));
  21. }
  22. } else {
  23. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  24. context.setQueryString(jpqlQuery);
  25. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  26. }
  27. return context.applyRestrictions(result);
  28. }

代码示例来源:origin: com.blazebit/blaze-persistence-integration-deltaspike-data-impl-1.7

  1. private javax.persistence.Query createJpaQuery(Query query, EntityViewCdiQueryInvocationContext context) {
  2. EntityManager entityManager = context.getEntityManager();
  3. ExtendedParameters params = context.getParams();
  4. javax.persistence.Query result = null;
  5. if (isNotEmpty(query.named())) {
  6. if (context.hasQueryStringPostProcessors()) {
  7. javax.persistence.Query namedQuery = entityManager.createNamedQuery(query.named());
  8. String named = factory.extract(namedQuery);
  9. String jpqlQuery = context.applyQueryStringPostProcessors(named);
  10. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  11. } else {
  12. result = params.applyTo(entityManager.createNamedQuery(query.named()));
  13. }
  14. } else if (query.isNative()) {
  15. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  16. Class<?> resultType = getQueryResultType(context.getMethod());
  17. if (isEntityType(resultType)) {
  18. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, resultType));
  19. } else {
  20. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery));
  21. }
  22. } else {
  23. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  24. context.setQueryString(jpqlQuery);
  25. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  26. }
  27. return context.applyRestrictions(result);
  28. }

代码示例来源:origin: Blazebit/blaze-persistence

  1. private javax.persistence.Query createJpaQuery(Query query, EntityViewCdiQueryInvocationContext context) {
  2. EntityManager entityManager = context.getEntityManager();
  3. ExtendedParameters params = context.getParams();
  4. javax.persistence.Query result = null;
  5. if (isNotEmpty(query.named())) {
  6. if (context.hasQueryStringPostProcessors()) {
  7. javax.persistence.Query namedQuery = entityManager.createNamedQuery(query.named());
  8. String named = factory.extract(namedQuery);
  9. String jpqlQuery = context.applyQueryStringPostProcessors(named);
  10. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  11. } else {
  12. result = params.applyTo(entityManager.createNamedQuery(query.named()));
  13. }
  14. } else if (query.isNative()) {
  15. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  16. Class<?> resultType = getQueryResultType(context.getMethod());
  17. if (isEntityType(resultType)) {
  18. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, resultType));
  19. } else {
  20. result = params.applyTo(entityManager.createNativeQuery(jpqlQuery));
  21. }
  22. } else {
  23. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  24. context.setQueryString(jpqlQuery);
  25. result = params.applyTo(entityManager.createQuery(jpqlQuery));
  26. }
  27. return context.applyRestrictions(result);
  28. }

代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-data-module-impl

  1. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  2. Class<?> resultType = getQueryResultType(context.getMethod());
  3. if (isEntityType(resultType))
  4. String jpqlQuery = context.applyQueryStringPostProcessors(query.value());
  5. context.setQueryString(jpqlQuery);
  6. result = params.applyTo(entityManager.createQuery(jpqlQuery));

相关文章