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


Java ReflectionEntityInformation类代码示例

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


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

示例1: createEntityInformation

import org.springframework.data.repository.core.support.ReflectionEntityInformation; //导入依赖的package包/类
@SuppressWarnings({"rawtypes", "unchecked"})
protected static EntityInformation createEntityInformation(Class<?> entityType) {

    if (Persistable.class.isAssignableFrom(entityType)) {
        return new PersistableEntityInformation(entityType);
    }
    return new ReflectionEntityInformation(entityType);
}
 
开发者ID:rubasace,项目名称:spring-data-jdbc,代码行数:9,代码来源:BaseJdbcRepository.java

示例2: saveNewWithNumericId

import org.springframework.data.repository.core.support.ReflectionEntityInformation; //导入依赖的package包/类
@Test // DATACMNS-525
public void saveNewWithNumericId() {

	ReflectionEntityInformation<WithNumericId, Integer> ei = new ReflectionEntityInformation<>(WithNumericId.class);
	SimpleKeyValueRepository<WithNumericId, Integer> temp = new SimpleKeyValueRepository<>(ei, opsMock);

	WithNumericId withNumericId = new WithNumericId();
	temp.save(withNumericId);

	verify(opsMock, times(1)).insert(eq(withNumericId));
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:12,代码来源:SimpleKeyValueRepositoryUnitTests.java

示例3: getEntityInformation

import org.springframework.data.repository.core.support.ReflectionEntityInformation; //导入依赖的package包/类
@Override
public <T, ID extends Serializable> EntityInformation<T, ID> getEntityInformation(Class<T> domainClass) {
    return new ReflectionEntityInformation<>(domainClass, Id.class);
}
 
开发者ID:cybozu,项目名称:spring-data-jdbc-template,代码行数:5,代码来源:JdbcTemplateRepositoryFactoryBean.java

示例4: createEntityInformation

import org.springframework.data.repository.core.support.ReflectionEntityInformation; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private EntityInformation<T, ID> createEntityInformation() {
  Class<T> clazz = (Class<T>) GenericTypeResolver.resolveTypeArguments(getClass(), JdbcRepository.class)[0];

  return new ReflectionEntityInformation(clazz);
}
 
开发者ID:nickevin,项目名称:Qihua,代码行数:7,代码来源:JdbcRepository.java

示例5: setUp_After_Super_SetUp

import org.springframework.data.repository.core.support.ReflectionEntityInformation; //导入依赖的package包/类
@Before
public void setUp_After_Super_SetUp() throws Exception {
	ReflectionEntityInformation<Makeup, String> entityInformation = new ReflectionEntityInformation<>(Makeup.class);

	this.theRepository = new SimpleHazelcastRepository<>(entityInformation, keyValueOperations);
}
 
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:7,代码来源:SimpleHazelcastRepositoryIT.java

示例6: setUp

import org.springframework.data.repository.core.support.ReflectionEntityInformation; //导入依赖的package包/类
@Before
public void setUp() {

	ReflectionEntityInformation<Foo, String> ei = new ReflectionEntityInformation<>(Foo.class);
	repo = new SimpleKeyValueRepository<>(ei, opsMock);
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:7,代码来源:SimpleKeyValueRepositoryUnitTests.java


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