public FilterDef(FullTextFilterDef def) { this.name = def.name(); this.impl = def.impl(); this.cacheMode = def.cache(); }
public FilterDef(FullTextFilterDef def) { this.name = def.name(); this.impl = def.impl(); this.cacheMode = def.cache(); }
private void initProgrammaticallyDefinedFilterDef(ConfigContext context, ReflectionManager reflectionManager) { Map<?, ?> defaults = reflectionManager.getDefaults(); FullTextFilterDef[] filterDefs = (FullTextFilterDef[]) defaults.get( FullTextFilterDefs.class ); if ( filterDefs != null && filterDefs.length != 0 ) { MappingDefinitionRegistry<FullTextFilterDef, ?> registry = context.getFullTextFilterDefinitionRegistry(); final Map<String, FilterDef> filterDefinitions = factoryState.getFilterDefinitions(); for ( FullTextFilterDef defAnn : filterDefs ) { String name = defAnn.name(); if ( filterDefinitions.containsKey( name ) ) { throw new SearchException( "Multiple definition of @FullTextFilterDef.name=" + defAnn.name() ); } registry.registerGlobal( name, defAnn ); } } }
private void initProgrammaticallyDefinedFilterDef(ConfigContext context, ReflectionManager reflectionManager) { Map<?, ?> defaults = reflectionManager.getDefaults(); FullTextFilterDef[] filterDefs = (FullTextFilterDef[]) defaults.get( FullTextFilterDefs.class ); if ( filterDefs != null && filterDefs.length != 0 ) { MappingDefinitionRegistry<FullTextFilterDef, ?> registry = context.getFullTextFilterDefinitionRegistry(); final Map<String, FilterDef> filterDefinitions = factoryState.getFilterDefinitions(); for ( FullTextFilterDef defAnn : filterDefs ) { String name = defAnn.name(); if ( filterDefinitions.containsKey( name ) ) { throw new SearchException( "Multiple definition of @FullTextFilterDef.name=" + defAnn.name() ); } registry.registerGlobal( name, defAnn ); } } }
private void checkForFullTextFilterDefs(XAnnotatedElement annotatedElement, ConfigContext context) { MappingDefinitionRegistry<FullTextFilterDef, ?> registry = context.getFullTextFilterDefinitionRegistry(); FullTextFilterDefs defs = annotatedElement.getAnnotation( FullTextFilterDefs.class ); if ( defs != null ) { for ( FullTextFilterDef def : defs.value() ) { registry.registerFromAnnotation( def.name(), def, annotatedElement ); } } FullTextFilterDef def = annotatedElement.getAnnotation( FullTextFilterDef.class ); if ( def != null ) { registry.registerFromAnnotation( def.name(), def, annotatedElement ); } }
private void checkForFullTextFilterDefs(XAnnotatedElement annotatedElement, ConfigContext context) { MappingDefinitionRegistry<FullTextFilterDef, ?> registry = context.getFullTextFilterDefinitionRegistry(); FullTextFilterDefs defs = annotatedElement.getAnnotation( FullTextFilterDefs.class ); if ( defs != null ) { for ( FullTextFilterDef def : defs.value() ) { registry.registerFromAnnotation( def.name(), def, annotatedElement ); } } FullTextFilterDef def = annotatedElement.getAnnotation( FullTextFilterDef.class ); if ( def != null ) { registry.registerFromAnnotation( def.name(), def, annotatedElement ); } }
if ( filterDef.getFactoryMethod() != null ) { throw new SearchException( "Multiple @Factory methods found" + defAnn.name() + ": " + filterDef.getImpl().getName() + "." + method.getName() ); if ( filterDef.getKeyMethod() != null ) { throw new SearchException( "Multiple @Key methods found" + defAnn.name() + ": " + filterDef.getImpl().getName() + "." + method.getName() );
if ( filterDef.getFactoryMethod() != null ) { throw new SearchException( "Multiple @Factory methods found" + defAnn.name() + ": " + filterDef.getImpl().getName() + "." + method.getName() ); if ( filterDef.getKeyMethod() != null ) { throw new SearchException( "Multiple @Key methods found" + defAnn.name() + ": " + filterDef.getImpl().getName() + "." + method.getName() );