public FacetMapping(String fieldName, PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { this.fieldName = fieldName; this.property = property; this.entity = entity; this.mapping = mapping; facet.put( "forField", fieldName ); property.addFacet( facet ); }
public FieldMapping(PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { this.mapping = mapping; this.entity = entity; this.property = property; this.field = new HashMap<String, Object>(); property.addField( field ); }
/** * @deprecated Do not use constructors, use {@code numericField} methods in other classes from the same package. */ @Deprecated public NumericFieldMapping(String fieldName, PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { super( fieldName, property, entity, mapping ); numericField.put( "forField", fieldName ); property.addNumericField( numericField ); }
private void createAnalyzerDiscriminator(PropertyDescriptor property) { Map<String, Object> analyzerDiscriminator = property.getAnalyzerDiscriminator(); if ( analyzerDiscriminator != null ) { AnnotationDescriptor analyzerDiscriminatorAnn = new AnnotationDescriptor( AnalyzerDiscriminator.class ); for ( Map.Entry<String, Object> entry : analyzerDiscriminator.entrySet() ) { analyzerDiscriminatorAnn.setValue( entry.getKey(), entry.getValue() ); } annotations.put( AnalyzerDiscriminator.class, createAnnotation( analyzerDiscriminatorAnn ) ); } }
private void createCalendarBridge(PropertyDescriptor property) { Map<String, Object> map = property.getCalendarBridge(); for ( Map.Entry<String, Object> entry : map.entrySet() ) { AnnotationDescriptor calendarBrigeAnnotation = new AnnotationDescriptor( CalendarBridge.class ); calendarBrigeAnnotation.setValue( entry.getKey(), entry.getValue() ); annotations.put( CalendarBridge.class, createAnnotation( calendarBrigeAnnotation ) ); } }
public SortableFieldMapping(String fieldName, PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { this.fieldName = fieldName; this.property = property; this.entity = entity; this.mapping = mapping; Map<String, Object> sortableField = Collections.<String, Object>singletonMap( "forField", fieldName ); property.addSortableField( sortableField ); }
private void createDocumentId(PropertyDescriptor property) { Map<String, Object> documentId = property.getDocumentId(); if ( documentId != null ) { AnnotationDescriptor documentIdAnnotation = new AnnotationDescriptor( DocumentId.class ); for ( Map.Entry<String, Object> entry : documentId.entrySet() ) { documentIdAnnotation.setValue( entry.getKey(), entry.getValue() ); } annotations.put( DocumentId.class, createAnnotation( documentIdAnnotation ) ); } }
private void createContainedIn(PropertyDescriptor property) { if ( property.getContainedIn() != null ) { Map<String, Object> containedIn = property.getContainedIn(); AnnotationDescriptor containedInAnn = new AnnotationDescriptor( ContainedIn.class ); Set<Entry<String, Object>> entrySet = containedIn.entrySet(); for ( Entry<String, Object> entry : entrySet ) { containedInAnn.setValue( entry.getKey(), entry.getValue() ); } annotations.put( ContainedIn.class, createAnnotation( containedInAnn ) ); } }
PropertyDescriptor getProperty(String name, ElementType type) { PropertyKey propertyKey = new PropertyKey( name, type ); PropertyDescriptor descriptor = properties.get( propertyKey ); if ( descriptor == null ) { descriptor = new PropertyDescriptor( name, type ); properties.put( propertyKey, descriptor ); } return descriptor; }
private void createDateBridge(PropertyDescriptor property) { Map<String, Object> map = property.getDateBridge(); for ( Map.Entry<String, Object> entry : map.entrySet() ) { AnnotationDescriptor dateBridgeAnnotation = new AnnotationDescriptor( DateBridge.class ); dateBridgeAnnotation.setValue( entry.getKey(), entry.getValue() ); annotations.put( DateBridge.class, createAnnotation( dateBridgeAnnotation ) ); } }
private void createAnalyzerDiscriminator(PropertyDescriptor property) { Map<String, Object> analyzerDiscriminator = property.getAnalyzerDiscriminator(); if ( analyzerDiscriminator != null ) { AnnotationDescriptor analyzerDiscriminatorAnn = new AnnotationDescriptor( AnalyzerDiscriminator.class ); for ( Map.Entry<String, Object> entry : analyzerDiscriminator.entrySet() ) { analyzerDiscriminatorAnn.setValue( entry.getKey(), entry.getValue() ); } annotations.put( AnalyzerDiscriminator.class, createAnnotation( analyzerDiscriminatorAnn ) ); } }
private void createCalendarBridge(PropertyDescriptor property) { Map<String, Object> map = property.getCalendarBridge(); for ( Map.Entry<String, Object> entry : map.entrySet() ) { AnnotationDescriptor calendarBrigeAnnotation = new AnnotationDescriptor( CalendarBridge.class ); calendarBrigeAnnotation.setValue( entry.getKey(), entry.getValue() ); annotations.put( CalendarBridge.class, createAnnotation( calendarBrigeAnnotation ) ); } }
public SortableFieldMapping(String fieldName, PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { this.fieldName = fieldName; this.property = property; this.entity = entity; this.mapping = mapping; Map<String, Object> sortableField = Collections.<String, Object>singletonMap( "forField", fieldName ); property.addSortableField( sortableField ); }
private void createDocumentId(PropertyDescriptor property) { Map<String, Object> documentId = property.getDocumentId(); if ( documentId != null ) { AnnotationDescriptor documentIdAnnotation = new AnnotationDescriptor( DocumentId.class ); for ( Map.Entry<String, Object> entry : documentId.entrySet() ) { documentIdAnnotation.setValue( entry.getKey(), entry.getValue() ); } annotations.put( DocumentId.class, createAnnotation( documentIdAnnotation ) ); } }
private void createContainedIn(PropertyDescriptor property) { if ( property.getContainedIn() != null ) { Map<String, Object> containedIn = property.getContainedIn(); AnnotationDescriptor containedInAnn = new AnnotationDescriptor( ContainedIn.class ); Set<Entry<String, Object>> entrySet = containedIn.entrySet(); for ( Entry<String, Object> entry : entrySet ) { containedInAnn.setValue( entry.getKey(), entry.getValue() ); } annotations.put( ContainedIn.class, createAnnotation( containedInAnn ) ); } }
PropertyDescriptor getProperty(String name, ElementType type) { PropertyKey propertyKey = new PropertyKey( name, type ); PropertyDescriptor descriptor = properties.get( propertyKey ); if ( descriptor == null ) { descriptor = new PropertyDescriptor( name, type ); properties.put( propertyKey, descriptor ); } return descriptor; }
private void createDateBridge(PropertyDescriptor property) { Map<String, Object> map = property.getDateBridge(); for ( Map.Entry<String, Object> entry : map.entrySet() ) { AnnotationDescriptor dateBridgeAnnotation = new AnnotationDescriptor( DateBridge.class ); dateBridgeAnnotation.setValue( entry.getKey(), entry.getValue() ); annotations.put( DateBridge.class, createAnnotation( dateBridgeAnnotation ) ); } }
public FieldMapping(PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { this.mapping = mapping; this.entity = entity; this.property = property; this.field = new HashMap<String, Object>(); property.addField( field ); }
public FacetMapping(String fieldName, PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { this.fieldName = fieldName; this.property = property; this.entity = entity; this.mapping = mapping; facet.put( "forField", fieldName ); property.addFacet( facet ); }
/** * @deprecated Do not use constructors, use {@code numericField} methods in other classes from the same package. */ @Deprecated public NumericFieldMapping(String fieldName, PropertyDescriptor property, EntityDescriptor entity, SearchMapping mapping) { super( fieldName, property, entity, mapping ); numericField.put( "forField", fieldName ); property.addNumericField( numericField ); }