Package org.hibernate.search.engine

Examples of org.hibernate.search.engine.EntityInfo


  // moves back and forth over entityInfos as directed loading
  // values as necessary.
  private EntityInfo loadCache(int windowStart) {
    int windowStop;

    EntityInfo info = entityInfos[windowStart - first];
    if ( info != null ) {
      //data has already been loaded
      return info;
    }
View Full Code Here


     * or reload them and update the cache entry.
     * @param x absolute position in fulltext result.
     * @return the managed objects
     */
    private Object[] getManagedResult(int x) {
      EntityInfo entityInfo = getEntityInfo( x );
      Object[] objects = entity==null ? null : entity.get();
      if ( objects!=null && areAllEntitiesManaged( objects, entityInfo ) ) {
        return objects;
      }
      else {
View Full Code Here

     * Extract an entityInfo, either from cache or from the index.
     * @param x the position in the index.
     * @return
     */
    private EntityInfo getEntityInfo(int x) {
      EntityInfo entityInfo = einfo==null ? null : einfo.get();
      if ( entityInfo==null ) {
        try {
          entityInfo = documentExtractor.extract( x );
        }
        catch (IOException e) {
View Full Code Here

  // moves back and forth over entityInfos as directed loading
  // values as necessary.
  private EntityInfo loadCache(int windowStart) {
    int windowStop;

    EntityInfo info = entityInfos[windowStart - first];
    if ( info != null ) {
      //data has already been loaded
      return info;
    }
View Full Code Here

    this.searchFactoryImplementor = searchFactoryImplementor;
    this.projection = projection;
  }

  private EntityInfo extract(Document document) {
    EntityInfo entityInfo = new EntityInfo();
    entityInfo.clazz = DocumentBuilder.getDocumentClass( document );
    entityInfo.id = DocumentBuilder.getDocumentId( searchFactoryImplementor, entityInfo.clazz, document );
    if ( projection != null && projection.length > 0 ) {
      entityInfo.projection = DocumentBuilder.getDocumentFields( searchFactoryImplementor, entityInfo.clazz, document, projection );
    }
View Full Code Here

  }

  public EntityInfo extract(Hits hits, int index) throws IOException {
    Document doc = hits.doc( index );
    //TODO if we are lonly looking for score (unlikely), avoid accessing doc (lazy load)
    EntityInfo entityInfo = extract( doc );
    Object[] eip = entityInfo.projection;

    if ( eip != null && eip.length > 0 ) {
      for (int x = 0; x < projection.length; x++) {
        if ( ProjectionConstants.SCORE.equals( projection[x] ) ) {
View Full Code Here

  // moves back and forth over entityInfos as directed loading
  // values as necessary.
  private EntityInfo loadCache(int windowStart) {
    int windowStop;

    EntityInfo info = entityInfos[windowStart - first];
    if ( info != null ) {
      //data has already been loaded
      return info;
    }
View Full Code Here

     * or reload them and update the cache entry.
     * @param x absolute position in fulltext result.
     * @return the managed objects
     */
    private Object[] getManagedResult(int x) {
      EntityInfo entityInfo = getEntityInfo( x );
      Object[] objects = entity==null ? null : entity.get();
      if ( objects!=null && areAllEntitiesManaged( objects, entityInfo ) ) {
        return objects;
      }
      else {
View Full Code Here

     * Extract an entityInfo, either from cache or from the index.
     * @param x the position in the index.
     * @return
     */
    private EntityInfo getEntityInfo(int x) {
      EntityInfo entityInfo = einfo==null ? null : einfo.get();
      if ( entityInfo==null ) {
        try {
          entityInfo = documentExtractor.extract( x );
        }
        catch (IOException e) {
View Full Code Here

     * or reload them and update the cache entry.
     * @param x absolute position in fulltext result.
     * @return the managed objects
     */
    private Object[] getManagedResult(int x) {
      EntityInfo entityInfo = getEntityInfo( x );
      Object[] objects = entity==null ? null : entity.get();
      if ( objects!=null && areAllEntitiesManaged( objects, entityInfo ) ) {
        return objects;
      }
      else {
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.EntityInfo

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.