本文整理了Java中org.hibernate.search.annotations.Field.<init>()
方法的一些代码示例,展示了Field.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.<init>()
方法的具体详情如下:
包路径:org.hibernate.search.annotations.Field
类名称:Field
方法名:<init>
暂无
代码示例来源:origin: netgloo/spring-boot-samples
@Entity
@Indexed
@Table(name = "users")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Field(store = Store.NO)
@NotNull
private String email;
@Field
@NotNull
private String name;
@Field
@NotNull
private String city;
代码示例来源:origin: jamesagnew/hapi-fhir
@Entity
@Table(name = "HFJ_RES_LINK", indexes = {
@Index(name = "IDX_RL_TPATHRES", columnList = "SRC_PATH,TARGET_RESOURCE_ID"),
@Field()
private String mySourceResourceType;
@Field()
private Long myTargetResourcePid;
@Field()
private String myTargetResourceType;
@Field()
private String myTargetResourceUrl;
@Field()
@Column(name = "SP_UPDATED", nullable = true) // TODO: make this false after HAPI 2.3
@Temporal(TemporalType.TIMESTAMP)
代码示例来源:origin: openmrs/openmrs-core
@DocumentId
private Integer conceptReferenceTermId;
@Field(analyze = Analyze.NO)
private String code;
代码示例来源:origin: hibernate/hibernate-search
@MappedSuperclass
public class MappedSuperclassWithCollectionField {
@Id
@GeneratedValue
private Long id;
@ElementCollection
@Field(bridge = @FieldBridge(impl = CollectionOfStringsFieldBridge.class), analyze = Analyze.NO)
private Collection<String> collection = new ArrayList<String>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Collection<String> getCollection() {
return collection;
}
}
代码示例来源:origin: sanluan/PublicCMS
@GeneratorColumn(title = "站点", condition = true)
@FieldBridge(impl = ShortBridge.class)
@Field(analyze = Analyze.NO)
@JsonIgnore
private short siteId;
@GeneratorColumn(title = "标题", condition = true, like = true, or = true)
@Field(store = Store.COMPRESS)
private String title;
@GeneratorColumn(title = "发布用户", condition = true)
private Long checkUserId;
@GeneratorColumn(title = "分类", condition = true)
@Field(analyze = Analyze.NO, store = Store.YES)
@Facet(encoding = FacetEncodingType.STRING)
@FieldBridge(impl = IntegerBridge.class)
private int categoryId;
@GeneratorColumn(title = "模型", condition = true)
@Field(analyze = Analyze.NO, store = Store.YES)
@Facet(encoding = FacetEncodingType.STRING)
private String modelId;
@GeneratorColumn(title = "父内容", condition = true)
@Field(analyze = Analyze.NO, store = Store.YES)
private Long parentId;
@GeneratorColumn(title = "是否转载")
private boolean copied;
@GeneratorColumn(title = "作者")
@Field(analyze = Analyze.NO, store = Store.YES)
private String author;
@GeneratorColumn(title = "编辑")
代码示例来源:origin: hibernate/hibernate-search
@MappedSuperclass
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BaseEntity")
public abstract static class BaseEntity {
@Id
@DocumentId
@Field(name = "idSort")
@SortableField(forField = "idSort")
Integer id;
@Field
String name;
public String getName() {
return name;
}
}
代码示例来源:origin: openmrs/openmrs-core
@Indexed
@AnalyzerDef(name = "ConceptNameAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = {
@TokenFilterDef(factory = StandardFilterFactory.class), @TokenFilterDef(factory = LowerCaseFilterFactory.class) })
@DocumentId
private Integer conceptNameId;
private Concept concept;
@Field
private String name;
@Field(analyze = Analyze.NO)
@FieldBridge(impl = LocaleFieldBridge.class)
@Field
private Boolean voided = false;
@Field
private ConceptNameType conceptNameType;
@Field
private Boolean localePreferred = false;
代码示例来源:origin: hibernate/hibernate-search
@Indexed
@Entity
public static class SimpleLenientEntity {
@DocumentId
@Id
Long id;
@Field(index = Index.NO, store = Store.NO)
Long myField;
@Field(norms = Norms.NO)
String myTextField;
}
代码示例来源:origin: jamesagnew/hapi-fhir
@Embeddable
@Entity
@Table(name = "HFJ_SPIDX_COORDS", indexes = {
@Index(name = "IDX_SP_COORDS_HASH", columnList = "HASH_IDENTITY,SP_LATITUDE,SP_LONGITUDE"),
@Field
public double myLatitude;
@Column(name = "SP_LONGITUDE")
@Field
public double myLongitude;
@Id
代码示例来源:origin: sanluan/PublicCMS
@GeneratorColumn(title = "站点", condition = true)
@FieldBridge(impl = ShortBridge.class)
@Field(analyze = Analyze.NO)
@JsonIgnore
private short siteId;
@GeneratorColumn(title = "标题", condition = true, like = true, or = true)
@Field(store = Store.COMPRESS)
private String title;
@GeneratorColumn(title = "发布用户", condition = true)
private Long checkUserId;
@GeneratorColumn(title = "分类", condition = true)
@Field(analyze = Analyze.NO, store = Store.YES)
@Facet(encoding = FacetEncodingType.STRING)
@FieldBridge(impl = IntegerBridge.class)
private int categoryId;
@GeneratorColumn(title = "模型", condition = true)
@Field(analyze = Analyze.NO, store = Store.YES)
@Facet(encoding = FacetEncodingType.STRING)
private String modelId;
@GeneratorColumn(title = "父内容", condition = true)
@Field(analyze = Analyze.NO, store = Store.YES)
private Long parentId;
@GeneratorColumn(title = "是否转载")
private boolean copied;
@GeneratorColumn(title = "作者")
@Field(analyze = Analyze.NO, store = Store.YES)
private String author;
@GeneratorColumn(title = "编辑")
代码示例来源:origin: hibernate/hibernate-search
@Id
@DocumentId
@Field(
name = "id_forIntegerSort",
store = Store.NO,
index = Index.NO
)
@NumericField
@SortableFields({
@SortableField(forField = "id"),
@SortableField(forField = "id_forIntegerSort")
})
public Integer getId() {
return id;
}
代码示例来源:origin: openmrs/openmrs-core
@Indexed
public class PatientIdentifier extends BaseChangeableOpenmrsData implements java.io.Serializable, Cloneable, Comparable<PatientIdentifier> {
@DocumentId
private Integer patientIdentifierId;
@Field(name = "identifierPhrase", analyzer = @Analyzer(definition = LuceneAnalyzers.PHRASE_ANALYZER), boost = @Boost(8f)),
@Field(name = "identifierExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
@Field(name = "identifierStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
@Field(name = "identifierAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER))
})
private String identifier;
@Field
private Boolean preferred = false;
代码示例来源:origin: openmrs/openmrs-core
@DocumentId
private Integer patientIdentifierTypeId;
@Field
private Boolean required = Boolean.FALSE;
代码示例来源:origin: hibernate/hibernate-search
@Indexed
@Entity
public static class DoubleFailureTestEntity {
@DocumentId
@Id
Long id;
@Field(indexNullAs = "foo")
Double myField;
}
代码示例来源:origin: jamesagnew/hapi-fhir
@Embeddable
@Entity
@Table(name = "HFJ_SPIDX_DATE", indexes = {
@Column(name = "SP_VALUE_HIGH", nullable = true)
@Temporal(TemporalType.TIMESTAMP)
@Field
public Date myValueHigh;
@Column(name = "SP_VALUE_LOW", nullable = true)
@Temporal(TemporalType.TIMESTAMP)
@Field
public Date myValueLow;
@Transient
代码示例来源:origin: openmrs/openmrs-core
@Indexed
public class PersonAttribute extends BaseChangeableOpenmrsData implements java.io.Serializable, Comparable<PersonAttribute> {
@DocumentId
private Integer personAttributeId;
@Field(name = "valuePhrase", analyzer = @Analyzer(definition = LuceneAnalyzers.PHRASE_ANALYZER), boost = @Boost(8f)),
@Field(name = "valueExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
@Field(name = "valueStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
@Field(name = "valueAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER))
})
private String value;
代码示例来源:origin: openmrs/openmrs-core
@DocumentId
protected Integer personId;
private Set<PersonAttribute> attributes = null;
@Field
private String gender;
@Field
private Boolean dead = false;
@Field
private boolean isPatient;
代码示例来源:origin: hibernate/hibernate-search
@Indexed
@Entity
public static class DurationFailureTestEntity {
@DocumentId
@Id
Long id;
@Field(indexNullAs = "PT13M") // Expected format is a number of nanoseconds
Duration myField;
}
代码示例来源:origin: jamesagnew/hapi-fhir
@Embeddable
@Entity
@Table(name = "HFJ_SPIDX_TOKEN", indexes = {
@Field()
@Column(name = "SP_SYSTEM", nullable = true, length = MAX_LENGTH)
public String mySystem;
@Field()
@Column(name = "SP_VALUE", nullable = true, length = MAX_LENGTH)
private String myValue;
代码示例来源:origin: openmrs/openmrs-core
@Indexed
public class PersonName extends BaseChangeableOpenmrsData implements java.io.Serializable, Cloneable, Comparable<PersonName> {
@Field(name = "givenNameExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(8f)),
@Field(name = "givenNameStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(4f)),
@Field(name = "givenNameAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER), boost = @Boost(2f))
})
private String givenName;
@Field(name = "middleNameExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
@Field(name = "middleNameStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
@Field(name = "middleNameAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER))
})
private String middleName;
@Field(name = "familyNameExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(8f)),
@Field(name = "familyNameStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(4f)),
@Field(name = "familyNameAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER), boost = @Boost(2f)),
})
private String familyName;
@Field(name = "familyName2Exact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
@Field(name = "familyName2Start", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
@Field(name = "familyName2Anywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER)),
})
private String familyName2;
内容来源于网络,如有侵权,请联系作者删除!