SMILA 1.0 API documentation

org.eclipse.smila.connectivity.deltaindexing.jpa.impl
Class DeltaIndexingDao

java.lang.Object
  extended by org.eclipse.smila.connectivity.deltaindexing.jpa.impl.DeltaIndexingDao
All Implemented Interfaces:
java.io.Serializable

public class DeltaIndexingDao
extends java.lang.Object
implements java.io.Serializable

A JPA Entity to store DataSource locked state.

See Also:
Serialized Form

Field Summary
static java.lang.String NAMED_QUERY_COUNT_ENTRIES
          Constant for the named query DeltaIndexingDao.countEntries.
static java.lang.String NAMED_QUERY_COUNT_ENTRIES_BY_SOURCE
          Constant for the named query DeltaIndexingDao.countEntriesBySource.
static java.lang.String NAMED_QUERY_DELETE_ALL
          Constant for the named query DeltaIndexingDao.deleteAll.
static java.lang.String NAMED_QUERY_DELETE_BY_SOURCE
          Constant for the named query DeltaIndexingDao.deleteBySource.
static java.lang.String NAMED_QUERY_FIND_OBSOLETE_IDS_BY_SOURCE
          Constant for the named query DeltaIndexingDao.findObsoleteIdsBySource.
static java.lang.String NAMED_QUERY_FIND_SUB_COMPOUNDS
          Constant for the named query DeltaIndexingDao.findSubCompounds.
static java.lang.String NAMED_QUERY_PARAM_PARENT_ID_HASH
          Constant for the entity attribute _parentIdHash.
static java.lang.String NAMED_QUERY_PARAM_SOURCE
          Constant for the entity attribute _source.
static java.lang.String NAMED_QUERY_RESET_FLAGS
          Constant for the named query DeltaIndexingDao.resetFlags.
 
Constructor Summary
protected DeltaIndexingDao()
          Default Constructor, used by JPA.
  DeltaIndexingDao(ConnectivityId id, java.lang.String hash, boolean isCompound, boolean visited)
          Conversion Constructor.
 
Method Summary
 java.lang.String getDataSourceId()
          Returns the data source id.
 java.lang.String getHash()
          Returns the delta indexing hash.
 java.lang.String getIdHash()
          Returns the id hash value.
 java.lang.String getParentIdHash()
          Returns the parent id hash value.
 boolean isCompound()
          Returns if this delta indexing entry is a compound or not.
 boolean isModified()
          Returns if this delta indexing entry was modified or not.
 boolean isVisited()
          Returns if this delta indexing entry was visited or not.
 void modifyAndVisit(java.lang.String hash)
          Sets both the modified and visited flag.
 ConnectivityId toId()
          Converts this DeltaIndexingDao into a Id object.
 void visit()
          Sets the visited flag to true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMED_QUERY_FIND_OBSOLETE_IDS_BY_SOURCE

public static final java.lang.String NAMED_QUERY_FIND_OBSOLETE_IDS_BY_SOURCE
Constant for the named query DeltaIndexingDao.findObsoleteIdsBySource. This query returns all ids of the data source that were not visited (visited=false) and that either don't have a parentId (parentId == null) or have a parent and that parent was not visited or was modified (visited == false || modified == true)

See Also:
Constant Field Values

NAMED_QUERY_FIND_SUB_COMPOUNDS

public static final java.lang.String NAMED_QUERY_FIND_SUB_COMPOUNDS
Constant for the named query DeltaIndexingDao.findSubCompounds. It returns all elements of a compound that are compounds themselves.

See Also:
Constant Field Values

NAMED_QUERY_DELETE_BY_SOURCE

public static final java.lang.String NAMED_QUERY_DELETE_BY_SOURCE
Constant for the named query DeltaIndexingDao.deleteBySource.

See Also:
Constant Field Values

NAMED_QUERY_DELETE_ALL

public static final java.lang.String NAMED_QUERY_DELETE_ALL
Constant for the named query DeltaIndexingDao.deleteAll.

See Also:
Constant Field Values

NAMED_QUERY_RESET_FLAGS

public static final java.lang.String NAMED_QUERY_RESET_FLAGS
Constant for the named query DeltaIndexingDao.resetFlags.

See Also:
Constant Field Values

NAMED_QUERY_COUNT_ENTRIES

public static final java.lang.String NAMED_QUERY_COUNT_ENTRIES
Constant for the named query DeltaIndexingDao.countEntries.

See Also:
Constant Field Values

NAMED_QUERY_COUNT_ENTRIES_BY_SOURCE

public static final java.lang.String NAMED_QUERY_COUNT_ENTRIES_BY_SOURCE
Constant for the named query DeltaIndexingDao.countEntriesBySource.

See Also:
Constant Field Values

NAMED_QUERY_PARAM_SOURCE

public static final java.lang.String NAMED_QUERY_PARAM_SOURCE
Constant for the entity attribute _source.

See Also:
Constant Field Values

NAMED_QUERY_PARAM_PARENT_ID_HASH

public static final java.lang.String NAMED_QUERY_PARAM_PARENT_ID_HASH
Constant for the entity attribute _parentIdHash.

See Also:
Constant Field Values
Constructor Detail

DeltaIndexingDao

protected DeltaIndexingDao()
Default Constructor, used by JPA.


DeltaIndexingDao

public DeltaIndexingDao(ConnectivityId id,
                        java.lang.String hash,
                        boolean isCompound,
                        boolean visited)
                 throws java.io.IOException
Conversion Constructor. Converts a id, hash and visited flag into a DeltaIndexingDao.

Parameters:
id - the record id
hash - the delta indexing hash
isCompound - boolean flag if the record is a compound or not
visited - a boolean flag whether this id was already visited or not
Throws:
java.io.IOException - if any error occurs
Method Detail

toId

public ConnectivityId toId()
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException
Converts this DeltaIndexingDao into a Id object.

Returns:
a Id object.
Throws:
java.io.IOException - if any exception occurs
java.lang.ClassNotFoundException - if any exception occurs

getIdHash

public java.lang.String getIdHash()
Returns the id hash value.

Returns:
the id hash value

getHash

public java.lang.String getHash()
Returns the delta indexing hash.

Returns:
the delta indexing hash

getDataSourceId

public java.lang.String getDataSourceId()
Returns the data source id.

Returns:
the data source id

isCompound

public boolean isCompound()
Returns if this delta indexing entry is a compound or not.

Returns:
true if the this delta indexing is a compound, false otherwise

getParentIdHash

public java.lang.String getParentIdHash()
Returns the parent id hash value.

Returns:
the parent id hash value

isVisited

public boolean isVisited()
Returns if this delta indexing entry was visited or not.

Returns:
true if this delta indexing entry was visited, false otherwise

isModified

public boolean isModified()
Returns if this delta indexing entry was modified or not.

Returns:
true if this delta indexing entry was modified, false otherwise

visit

public void visit()
Sets the visited flag to true.


modifyAndVisit

public void modifyAndVisit(java.lang.String hash)
Sets both the modified and visited flag.


SMILA 1.0 API documentation