Examples of Indexed


Examples of org.hibernate.search.annotations.Indexed

      for ( IndexManager manager : providers ) {
        setSimilarity( similarityInstance, manager );
      }
    }

    Indexed indexedAnnotation = entity.getAnnotation( Indexed.class );
    EntityIndexingInterceptor<?> interceptor = null;
    if (indexedAnnotation != null) {
      Class<? extends EntityIndexingInterceptor> interceptorClass = getInterceptorClassFromHierarchy(
          entity,
          indexedAnnotation
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

      superEntity = superEntity.getSuperclass();
      //Object.class
      if (superEntity == null) {
        return result;
      }
      Indexed indexAnnForSuperclass = superEntity.getAnnotation( Indexed.class );
      result = indexAnnForSuperclass != null ?
          indexAnnForSuperclass.interceptor() :
          result;
    }
    return result;
  }
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
        else {
          rootIndex = currentClazz;
        }
      }
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

      superEntity = superEntity.getSuperclass();
      //Object.class
      if ( superEntity == null ) {
        return result;
      }
      Indexed indexAnnForSuperclass = superEntity.getAnnotation( Indexed.class );
      result = indexAnnForSuperclass != null ?
          indexAnnForSuperclass.interceptor() :
          result;
    }
    return result;
  }
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
        else {
          rootIndex = currentClazz;
        }
      }
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

    return shardIdentifierProvider;
  }

  private EntityIndexingInterceptor<?> createEntityIndexingInterceptor(XClass entity) {
    Indexed indexedAnnotation = entity.getAnnotation( Indexed.class );
    EntityIndexingInterceptor<?> interceptor = null;
    if ( indexedAnnotation != null ) {
      Class<? extends EntityIndexingInterceptor> interceptorClass = getInterceptorClassFromHierarchy(
          entity,
          indexedAnnotation
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

    //FIXME I'm inclined to get rid of the default value
    Class aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
        else {
          rootIndex = currentClazz;
        }
      }
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed

    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
        else {
          rootIndex = currentClazz;
        }
      }
View Full Code Here

Examples of org.mongodb.morphia.annotations.Indexed

     */
    private void processEmbeddedAnnotations(final DBCollection dbColl, final MappedClass mc, final boolean background,
                                            final List<MappedClass> parentMCs, final List<MappedField> parentMFs) {
        for (final MappedField mf : mc.getPersistenceFields()) {
            if (mf.hasAnnotation(Indexed.class)) {
                final Indexed index = mf.getAnnotation(Indexed.class);
                final StringBuilder field = new StringBuilder();
                if (!parentMCs.isEmpty()) {
                    for (final MappedField pmf : parentMFs) {
                        field.append(pmf.getNameToStore()).append(".");
                    }
                }

                field.append(mf.getNameToStore());

                ensureIndex(dbColl,
                            index.name(),
                            new BasicDBObject(field.toString(), index.value().toIndexValue()),
                            index.unique(),
                            index.dropDups(),
                            index.background() ? index.background() : background,
                            index.sparse(),
                            index.expireAfterSeconds());
            }

            if (!mf.isTypeMongoCompatible() && !mf.hasAnnotation(Reference.class) && !mf.hasAnnotation(Serialized.class)
                && !mf.hasAnnotation(NotSaved.class) && !mf.hasAnnotation(Transient.class)) {
                final List<MappedClass> newParentClasses = new ArrayList<MappedClass>(parentMCs);
View Full Code Here

Examples of org.monjo.core.annotations.Indexed

        field = clasz.getField(fieldName);
      } catch (Exception e1) {
        throw new RuntimeException(e1);
      }
      if (field.isAnnotationPresent(Indexed.class)) {
        Indexed indexed = field.getAnnotation(Indexed.class);
        BasicDBObject obj = new BasicDBObject();
        obj.put(fieldName, indexed.value().toInt());
        collection.ensureIndex(obj);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.