org.compass.gps.device.hibernate.entities
Class EntityInformation

java.lang.Object
  extended by org.compass.gps.device.hibernate.entities.EntityInformation
All Implemented Interfaces:
IndexEntity

public class EntityInformation
extends Object
implements IndexEntity

A general Entity information to be used by the HibernateGpsDevice during the indexing process.

Author:
kimchy

Constructor Summary
EntityInformation(Class clazz, String name, HibernateQueryProvider queryProvider, String[] subIndexes)
           
EntityInformation(Class clazz, String name, String[] subIndexes)
           
EntityInformation(Class clazz, String name, String selectQuery, String[] subIndexes)
           
 
Method Summary
 Class getEntityClass()
          Returns the entity class associated with the entity
 String getName()
          Returns the entity name
 HibernateQueryProvider getQueryProvider()
          Gets a query provider.
 String[] getSubIndexes()
          Returns a list of the sub indexes this indexable content the index entity represents is going to be indexed into.
 void setQueryProvider(HibernateQueryProvider queryProvider)
          Sets a query provider.
 void setSelectQuery(String selectQuery)
          Sets a string based select query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityInformation

public EntityInformation(Class clazz,
                         String name,
                         String[] subIndexes)

EntityInformation

public EntityInformation(Class clazz,
                         String name,
                         String selectQuery,
                         String[] subIndexes)

EntityInformation

public EntityInformation(Class clazz,
                         String name,
                         HibernateQueryProvider queryProvider,
                         String[] subIndexes)
Method Detail

getEntityClass

public Class getEntityClass()
Returns the entity class associated with the entity


getName

public String getName()
Returns the entity name

Specified by:
getName in interface IndexEntity

setSelectQuery

public void setSelectQuery(String selectQuery)
Sets a string based select query. Uses DefaultHibernateQueryProvider based on the string query.


setQueryProvider

public void setQueryProvider(HibernateQueryProvider queryProvider)
Sets a query provider. Responsible during indexing time to create a query for the given entity that will be used to query the database for indexing.


getQueryProvider

public HibernateQueryProvider getQueryProvider()
Gets a query provider. Responsible during indexing time to create a query for the given entity that will be used to query the database for indexing.


getSubIndexes

public String[] getSubIndexes()
Returns a list of the sub indexes this indexable content the index entity represents is going to be indexed into. Used for parallel indexing.

Specified by:
getSubIndexes in interface IndexEntity


Copyright (c) 2004-2009 The Compass Project.