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

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


      if (sortCriteria != null && !sortCriteria.isEmpty()) {
         SortField[] sortField = new SortField[sortCriteria.size()];
         int i = 0;
         for (SortCriteria sc : sortCriteria) {
            //TODO [anistor] sort type is not entirely correct
            PropertyMetadata propMetadata = getPropertyMetadata(parsingResult.getTargetEntity(), sc.getAttributePath());
            DocumentFieldMetadata fm = propMetadata.getFieldMetadata().iterator().next();
            int sortType = fm.isNumeric() ? SortField.INT : SortField.STRING;
            sortField[i++] = new SortField(sc.getAttributePath(), sortType, sc.getSortOrder() == SortOrder.DESC);
         }
         sort = new Sort(sortField);
      }
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

    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 ( 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

      if (sortCriteria != null && !sortCriteria.isEmpty()) {
         SortField[] sortField = new SortField[sortCriteria.size()];
         int i = 0;
         for (SortCriteria sc : sortCriteria) {
            //TODO [anistor] sort type is not entirely correct
            PropertyMetadata propMetadata = getPropertyMetadata(parsingResult.getTargetEntity(), sc.getAttributePath());
            DocumentFieldMetadata fm = propMetadata.getFieldMetadata().iterator().next();
            int sortType = fm.isNumeric() ? SortField.INT : SortField.STRING;
            sortField[i++] = new SortField(sc.getAttributePath(), sortType, sc.getSortOrder() == SortOrder.DESC);
         }
         sort = new Sort(sortField);
      }
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 ( !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 (sortCriteria != null && !sortCriteria.isEmpty()) {
         SortField[] sortField = new SortField[sortCriteria.size()];
         int i = 0;
         for (SortCriteria sc : sortCriteria) {
            //TODO [anistor] sort type is not entirely correct
            PropertyMetadata propMetadata = getPropertyMetadata(parsingResult.getTargetEntity(), sc.getAttributePath());
            DocumentFieldMetadata fm = propMetadata.getFieldMetadata().iterator().next();
            int sortType = fm.isNumeric() ? SortField.INT : SortField.STRING;
            sortField[i++] = new SortField(sc.getAttributePath(), sortType, sc.getSortOrder() == SortOrder.DESC);
         }
         sort = new Sort(sortField);
      }
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

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.