| java.lang.Object org.compass.gps.device.jpa.entities.DefaultJpaEntitiesLocator
DefaultJpaEntitiesLocator | public class DefaultJpaEntitiesLocator implements JpaEntitiesLocator(Code) | | The default
JpaEntitiesLocator implementations. Should work with all different
JPA implementations, with the only caveat that it is based on Annotations only. So, any
applications that uses a combination of both annotations and xml definitions (or any other
type), will probably loose some information during the index process (providing that the
xml definitions are ones that collide with Compass definitions). Please check if a
JPA actual implementation is provided with compass in such cases, and if not, writing
one should be simple (and should probably use the actual JPA implementation APIs).
author: kimchy |
Field Summary | |
protected Log | log |
createEntityInformation | protected EntityInformation createEntityInformation(Class> clazz, ResourceMapping resourceMapping) throws JpaGpsDeviceException(Code) | | Creates the
EntityInformation for a given class. If return null
the class will be filtered out.
Implementation filters out classes that do not have the
Entity annotation (i.e.
return null for such a case).
Parameters: clazz - The class to create the EntityInformation for Parameters: resourceMapping - The Compass resource mapping (used for sub indexes extraction) The entity information, or null to filter it out throws: JpaGpsDeviceException - |
shouldFilter | protected boolean shouldFilter(EntityInformation entityInformation, JpaGpsDevice device)(Code) | | Return true if the entity should be filtered out from the index operation.
Implementation filters out classes that one of the super classes has the
Inheritance annotation and the super class has compass mappings.
Parameters: entityInformation - The entity information to check if it should be filtered Parameters: device - The Jpa gps device true if the entity should be filtered from the index process |
|
|