Package org.hibernate.search.engine.metadata.impl

Examples of org.hibernate.search.engine.metadata.impl.PropertyMetadata


    if ( isIdentifierProperty( entityIndexBinding, propertyPathAsArray ) ) {
      return entityIndexBinding.getDocumentBuilder().getIdBridge();
    }

    PropertyMetadata metadata = getLeafTypeMetadata( type, propertyPathAsArray ).getPropertyMetadataForProperty( propertyPathAsArray[propertyPathAsArray.length - 1] );

    // TODO Consider properties with several fields
    return metadata.getFieldMetadata().iterator().next().getFieldBridge();
  }
View Full Code Here


    assertTrue(
        "There should be only one embedded metadata instance",
        typeMetadata.getEmbeddedTypeMetadata().size() == 1
    );
    EmbeddedTypeMetadata embeddedTypeMetadata = typeMetadata.getEmbeddedTypeMetadata().get( 0 );
    PropertyMetadata propertyMetadata = embeddedTypeMetadata.getPropertyMetadataForProperty( "id" );
    assertNotNull( "The id property should have been included", propertyMetadata );
  }
View Full Code Here

    assertTrue(
        "There should be only one embedded metadata instance",
        typeMetadata.getEmbeddedTypeMetadata().size() == 1
    );
    EmbeddedTypeMetadata embeddedTypeMetadata = typeMetadata.getEmbeddedTypeMetadata().get( 0 );
    PropertyMetadata propertyMetadata = embeddedTypeMetadata.getPropertyMetadataForProperty( "id" );
    assertNull( "The id property should not have been included", propertyMetadata );
  }
View Full Code Here

    this.entityState = EntityState.INDEXED;
    this.identifierName = idProvided ? null : idPropertyMetadata.getPropertyAccessor().getName();
  }

  private PropertyMetadata providedIdMetadata(XClass clazz, ConfigContext context, ReflectionManager reflectionManager) {
    PropertyMetadata propertyMetadata = null;

    FieldBridge providedIdFieldBridge = null;
    String providedIdFieldName = null;
    ProvidedId provided = findProvidedId( clazz, reflectionManager );
    if ( provided != null ) {
View Full Code Here

    if ( !stateInspectionOptimizationsEnabled() ) {
      return true;
    }

    for ( String dirtyPropertyName : dirtyPropertyNames ) {
      PropertyMetadata propertyMetadata = typeMetadata.getPropertyMetadataForProperty( dirtyPropertyName );
      if ( propertyMetadata != null ) {
        // if there is a property metadata it means that there is at least one @Field.
        // Fields are either indexed or stored, so we need to re-index
        return true;
      }
View Full Code Here

    if ( isIdentifierProperty( entityIndexBinding, propertyPath ) ) {
      return entityIndexBinding.getDocumentBuilder().getIdBridge();
    }

    PropertyMetadata metadata = getLeafTypeMetadata( type, propertyPath ).getPropertyMetadataForProperty( propertyPath[propertyPath.length - 1] );

    // TODO Consider properties with several fields
    return metadata.getFieldMetadata().iterator().next().getFieldBridge();
  }
View Full Code Here

    String nullToken;
    if ( propertyHelper.isEmbedded( entityType, propertyPath ) ) {
      nullToken = ( (EmbeddedTypeMetadata) typeMetadata ).getEmbeddedNullToken();
    }
    else {
      PropertyMetadata propertyMetadata = typeMetadata.getPropertyMetadataForProperty( propertyPath.get( propertyPath.size() - 1 ) );
      nullToken = propertyMetadata.getFieldMetadata().iterator().next().indexNullAs();
    }

    return new LuceneIsNullPredicate( queryBuilder, Strings.join( propertyPath, "." ), nullToken );
  }
View Full Code Here

    this.entityState = EntityState.INDEXED;
    this.identifierName = idProvided ? null : idPropertyMetadata.getPropertyAccessor().getName();
  }

  private PropertyMetadata providedIdMetadata(XClass clazz, ConfigContext context, ReflectionManager reflectionManager) {
    PropertyMetadata propertyMetadata = null;

    FieldBridge providedIdFieldBridge = null;
    String providedIdFieldName = null;
    ProvidedId provided = findProvidedId( clazz, reflectionManager );
    if ( provided != null ) {
View Full Code Here

    if ( !stateInspectionOptimizationsEnabled() ) {
      return true;
    }

    for ( String dirtyPropertyName : dirtyPropertyNames ) {
      PropertyMetadata propertyMetadata = typeMetadata.getPropertyMetadataForProperty( dirtyPropertyName );
      if ( propertyMetadata != null ) {
        // if there is a property metadata it means that there is at least one @Field.
        // Fields are either indexed or stored, so we need to re-index
        return true;
      }
View Full Code Here

    if ( isIdentifierProperty( entityIndexBinding, propertyPathAsArray ) ) {
      return entityIndexBinding.getDocumentBuilder().getIdBridge();
    }

    PropertyMetadata metadata = getLeafTypeMetadata( type, propertyPathAsArray ).getPropertyMetadataForProperty( propertyPathAsArray[propertyPathAsArray.length - 1] );

    // TODO Consider properties with several fields
    return metadata.getFieldMetadata().iterator().next().getFieldBridge();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.metadata.impl.PropertyMetadata

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.