* @see org.hibernate.search.bridge.FieldBridge#set(java.lang.String, java.lang.Object, org.apache.lucene.document.Document,
* org.hibernate.search.bridge.LuceneOptions)
*/
public void set(final String name, final Object value, final Document document, final LuceneOptions luceneOptions)
{
final LicenseDO license = (LicenseDO)value;
if (StringUtils.isBlank(license.getOwnerIds()) == true) {
return;
}
final UsersProvider usersProvider = new UsersProvider();
final Collection<PFUserDO> users = usersProvider.getSortedUsers(license.getOwnerIds());
final StringBuffer buf = new StringBuffer();
boolean first = true;
for (final PFUserDO user : users) {
first = StringHelper.append(buf, first, user.getFullname(), " ");
buf.append(" ").append(user.getUsername());