com.jamasoftware.contour.dao
Interface IndexDao


public interface IndexDao


Method Summary
 void blockIndexQueue()
          Blocks the asynchronous index queue so no index queries are added the to queue.
 void clearIndexQueue()
           
 void createAllIndexes()
           
 void createDocumentIndex()
           
 void createProjectIndexes(java.lang.Integer projectId)
           
 long getAllIndexesCount()
           
 long getCountForProjectIndex(java.lang.Integer projectId)
           
 long getDocumentCount()
           
 org.hibernate.Session getMySession()
           
 void index(java.lang.Object obj)
           
 int index(java.lang.String query, java.lang.String paramName, java.lang.String paramNameAsString, java.lang.Object paramValue)
           
 int indexContourItems(java.util.List<java.lang.Integer> idList, boolean queue)
           
 boolean isObjectChangedForIndex(DomainObject object)
           
 void queueForIndex(java.lang.String query, java.lang.String paramName, java.lang.String paramNameAsString, java.lang.Object paramValue)
          Queues the index query for asynchronous indexing.
 void unblockIndexQueue()
          Un-blocks the the asynchronous index queue.
 void updateIndexForObjectChange(DomainObject object)
          Updates the required objects indexes for the given object.
 void updateIndexForObjectChange(DomainObject object, boolean asynchronous)
          Updates the required objects indexes for the given object.
 

Method Detail

createDocumentIndex

void createDocumentIndex()

getCountForProjectIndex

long getCountForProjectIndex(java.lang.Integer projectId)

createProjectIndexes

void createProjectIndexes(java.lang.Integer projectId)

createAllIndexes

void createAllIndexes()

getDocumentCount

long getDocumentCount()

getAllIndexesCount

long getAllIndexesCount()

updateIndexForObjectChange

void updateIndexForObjectChange(DomainObject object)
Updates the required objects indexes for the given object. By default, this method schedules the job for a later time. To perform synchronously, use updateIndexForObjectChange(DomainObject, boolean) with a false value for the second argument.

Parameters:
object - The object to update other objects' indexes for

updateIndexForObjectChange

void updateIndexForObjectChange(DomainObject object,
                                boolean asynchronous)
Updates the required objects indexes for the given object. If asynchronous = true, this job is scheduled and done later (this method will return immediately).

Parameters:
object - The object to update other objects' indexes for
asynchronous - true to schedule the task, false to do it now

isObjectChangedForIndex

boolean isObjectChangedForIndex(DomainObject object)

index

int index(java.lang.String query,
          java.lang.String paramName,
          java.lang.String paramNameAsString,
          java.lang.Object paramValue)

index

void index(java.lang.Object obj)

indexContourItems

int indexContourItems(java.util.List<java.lang.Integer> idList,
                      boolean queue)

getMySession

org.hibernate.Session getMySession()

clearIndexQueue

void clearIndexQueue()

queueForIndex

void queueForIndex(java.lang.String query,
                   java.lang.String paramName,
                   java.lang.String paramNameAsString,
                   java.lang.Object paramValue)
Queues the index query for asynchronous indexing.

Parameters:
query - the query to retrieve the object
paramName - parameter name
paramNameAsString - parameter when the value is string.
paramValue - the value of the parameter

blockIndexQueue

void blockIndexQueue()
Blocks the asynchronous index queue so no index queries are added the to queue.


unblockIndexQueue

void unblockIndexQueue()
Un-blocks the the asynchronous index queue.



Copyright (c) 2010 Jama Software, Inc. All Rights Reserved.