@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(); }
@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; }
@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(); }
/** * 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();