Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-4562 Upgrade to Hibernate Search 5.0.0.Alpha5 #2749

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/pom.xml
Expand Up @@ -60,7 +60,7 @@
<version.antlr>3.4</version.antlr>
<version.commons.pool>1.6</version.commons.pool>
<version.gnu.getopt>1.0.13</version.gnu.getopt>
<version.hibernate.search>5.0.0.Alpha4</version.hibernate.search>
<version.hibernate.search>5.0.0.Alpha5</version.hibernate.search>
<version.jboss.marshalling>1.4.4.Final</version.jboss.marshalling>
<version.jboss.logging>3.1.2.GA</version.jboss.logging>
<version.jgroups>3.5.0.Beta9</version.jgroups>
Expand Down
Expand Up @@ -222,13 +222,13 @@ protected void updateIndexes(final boolean usingSkipIndexCleanupFlag, final Obje

private void performSearchWork(Object value, Serializable id, WorkType workType, TransactionContext transactionContext) {
if (value == null) throw new NullPointerException("Cannot handle a null value!");
Collection<Work<Object>> works = searchWorkCreator.createPerEntityWorks(value, id, workType);
Collection<Work> works = searchWorkCreator.createPerEntityWorks(value, id, workType);
performSearchWorks(works, transactionContext);
}

private <T> void performSearchWorks(Collection<Work<T>> works, TransactionContext transactionContext) {
private void performSearchWorks(Collection<Work> works, TransactionContext transactionContext) {
Worker worker = searchFactory.getWorker();
for (Work<T> work : works) {
for (Work work : works) {
worker.performWork(work, transactionContext);
}
}
Expand Down
Expand Up @@ -20,7 +20,7 @@ public interface SearchWorkCreator<T> {
* @param workType the type of work to be done
* @return collection of Work instances
*/
Collection<Work<T>> createPerEntityTypeWorks(Class<T> entityType, WorkType workType);
Collection<Work> createPerEntityTypeWorks(Class<T> entityType, WorkType workType);

/**
* Creates a collection of Work instances that Hibernate-Search should perform for the given entity
Expand All @@ -29,5 +29,5 @@ public interface SearchWorkCreator<T> {
* @param workType the type of work to be done
* @return collection of Work instances
*/
Collection<Work<T>> createPerEntityWorks(T entity, Serializable id, WorkType workType);
Collection<Work> createPerEntityWorks(T entity, Serializable id, WorkType workType);
}
Expand Up @@ -14,14 +14,14 @@
public class DefaultSearchWorkCreator<T> implements SearchWorkCreator<T> {

@Override
public Collection<Work<T>> createPerEntityTypeWorks(Class<T> entityType, WorkType workType) {
Work<T> work = new Work<T>(entityType, null, workType);
public Collection<Work> createPerEntityTypeWorks(Class<T> entityType, WorkType workType) {
Work work = new Work(entityType, null, workType);
return Collections.singleton(work);
}

@Override
public Collection<Work<T>> createPerEntityWorks(T entity, Serializable id, WorkType workType) {
Work<T> work = new Work<T>(entity, id, workType);
public Collection<Work> createPerEntityWorks(T entity, Serializable id, WorkType workType) {
Work work = new Work(entity, id, workType);
return Collections.singleton(work);
}
}