Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.query.remote.search;
 
 import  org.apache.lucene.document.Document;
 import  org.hibernate.search.bridge.builtin.FloatNumericFieldBridge;

Author(s):
anistor@redhat.com
Since:
6.0
 
public class NullEncodingFloatNumericFieldBridge extends FloatNumericFieldBridge {
   private final String nullMarker;
   public NullEncodingFloatNumericFieldBridge(String nullMarker) {
      this. = nullMarker;
   }
   @Override
   public Object get(String name, Document document) {
      Object val = super.get(namedocument);
      if (.equals(val)) {
         val = null;
      }
      return val;
   }
   @Override
   public String objectToString(Object object) {
      if (object == null) {
         return ;
      } else {
         return super.objectToString(object);
      }
   }
New to GrepCode? Check out our FAQ X