本文整理汇总了Java中org.hibernate.search.annotations.Index类的典型用法代码示例。如果您正苦于以下问题:Java Index类的具体用法?Java Index怎么用?Java Index使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Index类属于org.hibernate.search.annotations包,在下文中一共展示了Index类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContent
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取内容
*
* @return 内容
*/
@Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class))
@Lob
public String getContent() {
if (pageNumber != null) {
String[] pageContents = getPageContents();
if (pageNumber < 1) {
pageNumber = 1;
}
if (pageNumber > pageContents.length) {
pageNumber = pageContents.length;
}
return pageContents[pageNumber - 1];
} else {
return content;
}
}
示例2: getCreateDate
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取创建日期
*
* @return 创建日期
*/
@JsonProperty
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@DateBridge(resolution = Resolution.SECOND)
@Column(nullable = false, updatable = false)
public Date getCreateDate() {
return createDate;
}
示例3: getModifyDate
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取修改日期
*
* @return 修改日期
*/
@JsonProperty
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@DateBridge(resolution = Resolution.SECOND)
@Column(nullable = false)
public Date getModifyDate() {
return modifyDate;
}
示例4: getTitle
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取标题
*
* @return 标题
*/
@Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class))
@NotEmpty
@Length(max = 200)
@Column(nullable = false)
public String getTitle() {
return title;
}
示例5: getIsPublication
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取是否发布
*
* @return 是否发布
*/
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@NotNull
@Column(nullable = false)
public Boolean getIsPublication() {
return isPublication;
}
示例6: getIsTop
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取是否置顶
*
* @return 是否置顶
*/
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@NotNull
@Column(nullable = false)
public Boolean getIsTop() {
return isTop;
}
示例7: getOrder
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取排序
*
* @return 排序
*/
@JsonProperty
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@Min(0)
@Column(name = "orders")
public Integer getOrder() {
return order;
}
示例8: getSn
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取编号
*
* @return 编号
*/
@JsonProperty
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@Pattern(regexp = "[\\s\\S]*")
@Length(max = 100)
@Column(nullable = false, unique = true, length = 100)
public String getSn() {
return sn;
}
示例9: getName
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取名称
*
* @return 名称
*/
@JsonProperty
@Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class))
@NotEmpty
@Length(max = 200)
@Column(nullable = false)
public String getName() {
return name;
}
示例10: getFullName
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取全称
*
* @return 全称
*/
@JsonProperty
@Field(store = Store.YES, index = Index.NO)
@Column(nullable = false)
public String getFullName() {
return fullName;
}
示例11: getPrice
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取销售价
*
* @return 销售价
*/
@JsonProperty
@Field(store = Store.YES, index = Index.UN_TOKENIZED)
@NumericField
@FieldBridge(impl = BigDecimalNumericFieldBridge.class)
@NotNull
@Min(0)
@Digits(integer = 12, fraction = 3)
@Column(nullable = false, precision = 21, scale = 6)
public BigDecimal getPrice() {
return price;
}
示例12: getMarketPrice
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取市场价
*
* @return 市场价
*/
@Field(store = Store.YES, index = Index.NO)
@Min(0)
@Digits(integer = 12, fraction = 3)
@Column(nullable = false, precision = 21, scale = 6)
public BigDecimal getMarketPrice() {
return marketPrice;
}
示例13: getImage
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取展示图片
*
* @return 展示图片
*/
@JsonProperty
@Field(store = Store.YES, index = Index.NO)
@Length(max = 200)
public String getImage() {
return image;
}
示例14: getUnit
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取单位
*
* @return 单位
*/
@JsonProperty
@Field(store = Store.YES, index = Index.NO)
@Length(max = 200)
public String getUnit() {
return unit;
}
示例15: getPoint
import org.hibernate.search.annotations.Index; //导入依赖的package包/类
/**
* 获取赠送积分
*
* @return 赠送积分
*/
@Field(store = Store.YES, index = Index.NO)
@Min(0)
@Column(nullable = false)
public Long getPoint() {
return point;
}