org.springframework.data.jpa.repository.support.Querydsl.<init>()方法的使用及代码示例

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

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

Querydsl.<init>介绍

[英]Creates a new Querydsl for the given EntityManager and PathBuilder.
[中]

代码示例

代码示例来源:origin: spring-projects/spring-data-jpa

/**
 * Setter to inject {@link EntityManager}.
 *
 * @param entityManager must not be {@literal null}.
 */
@Autowired
public void setEntityManager(EntityManager entityManager) {
  Assert.notNull(entityManager, "EntityManager must not be null!");
  this.querydsl = new Querydsl(entityManager, builder);
  this.entityManager = entityManager;
}

代码示例来源:origin: spring-projects/spring-data-jpa

/**
 * Creates a new {@link QuerydslJpaPredicateExecutor} from the given domain class and {@link EntityManager} and uses
 * the given {@link EntityPathResolver} to translate the domain class into an {@link EntityPath}.
 * 
 * @param entityInformation must not be {@literal null}.
 * @param entityManager must not be {@literal null}.
 * @param resolver must not be {@literal null}.
 * @param metadata maybe {@literal null}.
 */
public QuerydslJpaPredicateExecutor(JpaEntityInformation<T, ?> entityInformation, EntityManager entityManager,
    EntityPathResolver resolver, @Nullable CrudMethodMetadata metadata) {
  this.entityInformation = entityInformation;
  this.metadata = metadata;
  this.path = resolver.createPath(entityInformation.getJavaType());
  this.querydsl = new Querydsl(entityManager, new PathBuilder<T>(path.getType(), path.getMetadata()));
  this.entityManager = entityManager;
}

代码示例来源:origin: spring-projects/spring-data-jpa

/**
 * Creates a new {@link QuerydslJpaRepository} from the given domain class and {@link EntityManager} and uses the
 * given {@link EntityPathResolver} to translate the domain class into an {@link EntityPath}.
 *
 * @param entityInformation must not be {@literal null}.
 * @param entityManager must not be {@literal null}.
 * @param resolver must not be {@literal null}.
 */
public QuerydslJpaRepository(JpaEntityInformation<T, ID> entityInformation, EntityManager entityManager,
    EntityPathResolver resolver) {
  super(entityInformation, entityManager);
  this.path = resolver.createPath(entityInformation.getJavaType());
  this.builder = new PathBuilder<T>(path.getType(), path.getMetadata());
  this.querydsl = new Querydsl(entityManager, builder);
  this.entityManager = entityManager;
}

代码示例来源:origin: org.springframework.data/spring-data-jpa

/**
 * Setter to inject {@link EntityManager}.
 *
 * @param entityManager must not be {@literal null}.
 */
@Autowired
public void setEntityManager(EntityManager entityManager) {
  Assert.notNull(entityManager, "EntityManager must not be null!");
  this.querydsl = new Querydsl(entityManager, builder);
  this.entityManager = entityManager;
}

代码示例来源:origin: com.blossom-project/blossom-core-common

@PersistenceContext
public void setEntityManager(EntityManager entityManager) {
 Preconditions.checkArgument(entityManager != null);
 this.entityManager = entityManager;
 PathBuilder<?> builder = new PathBuilderFactory().create(type.getRawType());
 this.querydsl = new Querydsl(entityManager, builder);
}

代码示例来源:origin: com.airlenet/play-repo-jpa

public EntityRepositoryImpl(JpaEntityInformation<T, I> entityInformation, EntityManager entityManager, EntityPathResolver resolver) {
  super(entityInformation, entityManager, resolver);
  this.entityInformation = entityInformation;
  this.entityManager = entityManager;
  this.path = resolver.createPath(entityInformation.getJavaType());
  this.builder = new PathBuilder<T>(path.getType(), path.getMetadata());
  this.querydsl = new Querydsl(entityManager, builder);
}

代码示例来源:origin: org.springframework.data/spring-data-jpa

/**
 * Creates a new {@link QuerydslJpaPredicateExecutor} from the given domain class and {@link EntityManager} and uses
 * the given {@link EntityPathResolver} to translate the domain class into an {@link EntityPath}.
 * 
 * @param entityInformation must not be {@literal null}.
 * @param entityManager must not be {@literal null}.
 * @param resolver must not be {@literal null}.
 * @param metadata maybe {@literal null}.
 */
public QuerydslJpaPredicateExecutor(JpaEntityInformation<T, ?> entityInformation, EntityManager entityManager,
    EntityPathResolver resolver, @Nullable CrudMethodMetadata metadata) {
  this.entityInformation = entityInformation;
  this.metadata = metadata;
  this.path = resolver.createPath(entityInformation.getJavaType());
  this.querydsl = new Querydsl(entityManager, new PathBuilder<T>(path.getType(), path.getMetadata()));
  this.entityManager = entityManager;
}

代码示例来源:origin: org.springframework.data/spring-data-jpa

/**
 * Creates a new {@link QuerydslJpaRepository} from the given domain class and {@link EntityManager} and uses the
 * given {@link EntityPathResolver} to translate the domain class into an {@link EntityPath}.
 *
 * @param entityInformation must not be {@literal null}.
 * @param entityManager must not be {@literal null}.
 * @param resolver must not be {@literal null}.
 */
public QuerydslJpaRepository(JpaEntityInformation<T, ID> entityInformation, EntityManager entityManager,
    EntityPathResolver resolver) {
  super(entityInformation, entityManager);
  this.path = resolver.createPath(entityInformation.getJavaType());
  this.builder = new PathBuilder<T>(path.getType(), path.getMetadata());
  this.querydsl = new Querydsl(entityManager, builder);
  this.entityManager = entityManager;
}

相关文章