* @param object to examine, expected a JPABase object
* @return the corresponding Lucene document
* @throws Exception
*/
public static Document toDocument(Object object) throws Exception {
Indexed indexed = object.getClass().getAnnotation(Indexed.class);
if (indexed == null)
return null;
if (!(object instanceof JPABase))
return null;
JPABase jpaBase = (JPABase) object;