Package org.springframework.data.solr.core.mapping

Examples of org.springframework.data.solr.core.mapping.SimpleSolrPersistentProperty


  }

  @Test
  public void testIdType() throws NoSuchFieldException, SecurityException {
    Mockito.when(persistentEntity.getTypeInformation()).thenReturn(ClassTypeInformation.from(ProductBean.class));
    SimpleSolrPersistentProperty property = new SimpleSolrPersistentProperty(ProductBean.class.getDeclaredField("id"),
        null, persistentEntity, new SimpleTypeHolder());
    Mockito.when(persistentEntity.getIdProperty()).thenReturn(property);

    SolrEntityInformation<ProductBean, String> entityInformation = new MappingSolrEntityInformation<ProductBean, String>(
        persistentEntity);
View Full Code Here


  @Test
  public void testIdTypeWithLongIdFieldType() throws NoSuchFieldException, SecurityException {
    Mockito.when(persistentEntityWithLongIdFieldType.getTypeInformation()).thenReturn(
        ClassTypeInformation.from(ProductBeanWithLongIdFieldType.class));

    SimpleSolrPersistentProperty property = new SimpleSolrPersistentProperty(
        ProductBeanWithLongIdFieldType.class.getDeclaredField("id"), null, persistentEntityWithLongIdFieldType,
        new SimpleTypeHolder());
    Mockito.when(persistentEntityWithLongIdFieldType.getIdProperty()).thenReturn(property);

    SolrEntityInformation<ProductBeanWithLongIdFieldType, Long> entityInformation = new MappingSolrEntityInformation<ProductBeanWithLongIdFieldType, Long>(
View Full Code Here

  }

  @Test
  public void testGetIdAttribute() throws NoSuchFieldException, SecurityException {
    Mockito.when(persistentEntity.getTypeInformation()).thenReturn(ClassTypeInformation.from(ProductBean.class));
    SimpleSolrPersistentProperty property = new SimpleSolrPersistentProperty(ProductBean.class.getDeclaredField("id"),
        null, persistentEntity, new SimpleTypeHolder());
    Mockito.when(persistentEntity.getIdProperty()).thenReturn(property);

    SolrEntityInformation<ProductBean, String> entityInformation = new MappingSolrEntityInformation<ProductBean, String>(
        persistentEntity);
View Full Code Here

  @Test
  public void testGetIdAttributeForAlternateFieldName() throws NoSuchFieldException, SecurityException {
    Mockito.when(persistentEntityWithAlternateFieldNameForId.getTypeInformation()).thenReturn(
        ClassTypeInformation.from(ProductBeanWithAlternateFieldNameForId.class));

    SimpleSolrPersistentProperty property = new SimpleSolrPersistentProperty(
        ProductBeanWithAlternateFieldNameForId.class.getDeclaredField("productId"), null,
        persistentEntityWithAlternateFieldNameForId, new SimpleTypeHolder());
    Mockito.when(persistentEntityWithAlternateFieldNameForId.getIdProperty()).thenReturn(property);

    SolrEntityInformation<ProductBeanWithAlternateFieldNameForId, String> entityInformation = new MappingSolrEntityInformation<ProductBeanWithAlternateFieldNameForId, String>(
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.mapping.SimpleSolrPersistentProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.