else if ( operation instanceof PurgeAll ) {
PurgeAll safeOperation = ( PurgeAll ) operation;
hydrator.addPurgeAllLuceneWork( safeOperation.getClass().getName() );
}
else if ( operation instanceof Delete ) {
Delete safeOperation = ( Delete ) operation;
hydrator.addDeleteLuceneWork(
safeOperation.getEntityClassName(),
safeOperation.getId()
);
}
else if ( operation instanceof Add ) {
Add safeOperation = ( Add ) operation;
buildLuceneDocument( safeOperation.getDocument(), hydrator );
hydrator.addAddLuceneWork(
safeOperation.getEntityClassName(),
safeOperation.getId(),
safeOperation.getFieldToAnalyzerMap()
);
}
else if ( operation instanceof Update ) {
Update safeOperation = ( Update ) operation;
buildLuceneDocument( safeOperation.getDocument(), hydrator );
hydrator.addUpdateLuceneWork(
safeOperation.getEntityClassName(),
safeOperation.getId(),
safeOperation.getFieldToAnalyzerMap()
);
}
}
}