コード例 #1
0
 private static AnalyzerReference luceneAnalyzerReferenceFromDefinition(
     org.hibernate.search.annotations.Analyzer analyzerAnn, ConfigContext configContext) {
   String definition = analyzerAnn == null ? "" : analyzerAnn.definition();
   if (StringHelper.isEmpty(definition)) {
     return null;
   }
   return configContext.buildLazyLuceneAnalyzerReference(definition);
 }
コード例 #2
0
 public static AnalyzerReference getAnalyzerReference(
     org.hibernate.search.annotations.Analyzer analyzerAnn,
     ConfigContext configContext,
     boolean isRemote) {
   Class<?> analyzerClass = analyzerAnn == null ? void.class : analyzerAnn.impl();
   if (isRemote) {
     return remoteAnalyzerReferenceFromDefinition(analyzerAnn, configContext);
   } else {
     if (analyzerClass == void.class) {
       return luceneAnalyzerReferenceFromDefinition(analyzerAnn, configContext);
     } else {
       return luceneAnalyzerReferenceFromClass(configContext, analyzerClass);
     }
   }
 }