Package org.hibernate.search.metadata

Examples of org.hibernate.search.metadata.IndexedTypeDescriptor


    assertTrue( typeDescriptor.getDynamicBoost() instanceof DefaultBoostStrategy );
  }

  @Test
  public void testExplicitDynamicBoost() {
    IndexedTypeDescriptor typeDescriptor = DescriptorTestHelper.getTypeDescriptor( metadataProvider, Fubar.class );
    assertTrue( typeDescriptor.getDynamicBoost() instanceof Fubar.DoublingBoost );
  }
View Full Code Here


    assertTrue( typeDescriptor.getDynamicBoost() instanceof Fubar.DoublingBoost );
  }

  @Test
  public void testFieldAnnotationOnFieldAndGetterCreatesTwoFieldDescriptors() {
    IndexedTypeDescriptor typeDescriptor = DescriptorTestHelper.getTypeDescriptor( metadataProvider, Susfu.class );
    Set<FieldDescriptor> fieldDescriptors = typeDescriptor.getFieldsForProperty( "susfu" );
    assertEquals( "There should be two field descriptors", 2, fieldDescriptors.size() );
  }
View Full Code Here

    assertEquals( "There should be two field descriptors", 2, fieldDescriptors.size() );
  }

  @Test
  public void testRetrievingPropertyDescriptors() {
    IndexedTypeDescriptor typeDescriptor = DescriptorTestHelper.getTypeDescriptor( metadataProvider, Snafu.class );

    Set<PropertyDescriptor> propertyDescriptors = typeDescriptor.getIndexedProperties();
    assertEquals( "There should be 5 properties defined in Snafu", 5, propertyDescriptors.size() );
    Set<String> expectedPropertyNames = new HashSet<String>();
    expectedPropertyNames.add( "id" );
    expectedPropertyNames.add( "snafu" );
    expectedPropertyNames.add( "numericField" );
View Full Code Here

    return indexReaderAccessor;
  }

  @Override
  public IndexedTypeDescriptor getIndexedTypeDescriptor(Class<?> entityType) {
    IndexedTypeDescriptor typeDescriptor;
    if ( indexedTypeDescriptors.containsKey( entityType ) ) {
      typeDescriptor = indexedTypeDescriptors.get( entityType );
    }
    else {
      EntityIndexBinding indexBinder = indexBindingForEntities.get( entityType );
      IndexedTypeDescriptor indexedTypeDescriptor;
      if ( indexBinder == null ) {
        indexedTypeDescriptor = new IndexedTypeDescriptorForUnindexedType(entityType);
      }
      else {
        indexedTypeDescriptor = new IndexedTypeDescriptorImpl(
View Full Code Here

    return indexReaderAccessor;
  }

  @Override
  public IndexedTypeDescriptor getIndexedTypeDescriptor(Class<?> entityType) {
    IndexedTypeDescriptor typeDescriptor;
    if ( indexedTypeDescriptors.containsKey( entityType ) ) {
      typeDescriptor = indexedTypeDescriptors.get( entityType );
    }
    else {
      EntityIndexBinding indexBinder = indexBindingForEntities.get( entityType );
      IndexedTypeDescriptor indexedTypeDescriptor;
      if ( indexBinder == null ) {
        indexedTypeDescriptor = new IndexedTypeDescriptorForUnindexedType(entityType);
      }
      else {
        indexedTypeDescriptor = new IndexedTypeDescriptorImpl(
View Full Code Here

    return indexReaderAccessor;
  }

  @Override
  public IndexedTypeDescriptor getIndexedTypeDescriptor(Class<?> entityType) {
    IndexedTypeDescriptor typeDescriptor;
    if ( indexedTypeDescriptors.containsKey( entityType ) ) {
      typeDescriptor = indexedTypeDescriptors.get( entityType );
    }
    else {
      EntityIndexBinding indexBinder = indexBindingForEntities.get( entityType );
      IndexedTypeDescriptor indexedTypeDescriptor;
      if ( indexBinder == null ) {
        indexedTypeDescriptor = new IndexedTypeDescriptorForUnindexedType( entityType );
      }
      else {
        indexedTypeDescriptor = new IndexedTypeDescriptorImpl(
View Full Code Here

TOP

Related Classes of org.hibernate.search.metadata.IndexedTypeDescriptor

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.