Java 类org.hibernate.search.annotations.SortableField 实例源码

项目:owsi-core-parent    文件:User.java   
@Field(analyzer = @Analyzer(definition = HibernateSearchAnalyzer.TEXT_SORT))
@SortableField
public String getSortName() {
    StringBuilder builder = new StringBuilder();
    if(getLastName() != null) {
        builder.append(getLastName());
        builder.append(" ");
    }
    if(getFirstName() != null) {
        builder.append(getFirstName());
    }
    return builder.toString().trim();
}
项目:owsi-core-parent    文件:GenericListItem.java   
@Override
@Fields({
    @Field(name = CODE_FIELD_NAME, analyzer = @Analyzer(definition = HibernateSearchAnalyzer.KEYWORD)),
    @Field(name = CODE_SORT_FIELD_NAME, analyzer = @Analyzer(definition = HibernateSearchAnalyzer.TEXT_SORT))
})
@SortableField(forField = CODE_SORT_FIELD_NAME)
public String getCode() {
    return null;
}
项目:sdcct    文件:SdcctResourceImpl.java   
@Column(name = DbColumnNames.ENTITY_ID)
@DocumentId(name = DbFieldNames.ENTITY_ID)
@GeneratedValue(generator = DbSequenceNames.RESOURCE_ENTITY_ID, strategy = GenerationType.SEQUENCE)
@Id
@Nonnegative
@Nullable
@Override
@SequenceGenerator(allocationSize = 1, name = DbSequenceNames.RESOURCE_ENTITY_ID, sequenceName = DbSequenceNames.RESOURCE_ENTITY_ID)
@SortableField(forField = DbColumnNames.ENTITY_ID)
public Long getEntityId() {
    return super.getEntityId();
}
项目:owsi-core-parent    文件:GenericEntity.java   
/**
 * Retourne la valeur de l'identifiant unique.
 * 
 * @return id
 */
@Override
@QueryType(PropertyType.COMPARABLE)
@Field(name = ID_SORT, analyze = Analyze.NO)
@SortableField(forField = ID_SORT)
public abstract K getId();