de.topicmapslab.majortom.database.jdbc.index.paged
Class JdbcPagedConstructIndex

java.lang.Object
  extended by de.topicmapslab.majortom.index.IndexImpl<T>
      extended by de.topicmapslab.majortom.index.core.BaseCachedIndexImpl<T>
          extended by de.topicmapslab.majortom.index.paged.PagedConstructIndexImpl<JdbcTopicMapStore>
              extended by de.topicmapslab.majortom.database.jdbc.index.paged.JdbcPagedConstructIndex
All Implemented Interfaces:
de.topicmapslab.majortom.model.event.ITopicMapListener, de.topicmapslab.majortom.model.index.IIndex, de.topicmapslab.majortom.model.index.paging.IPagedConstructIndex, org.tmapi.index.Index

public class JdbcPagedConstructIndex
extends PagedConstructIndexImpl<JdbcTopicMapStore>

Author:
Sven Krosse

Constructor Summary
JdbcPagedConstructIndex(JdbcTopicMapStore store)
           
 
Method Summary
protected  java.util.List<org.tmapi.core.Association> doGetAssociations(int offset, int limit)
          Returns all associations of the topic map as a list within the given range.
protected  java.util.List<org.tmapi.core.Association> doGetAssociations(int offset, int limit, java.util.Comparator<org.tmapi.core.Association> comparator)
          Returns all associations of the topic map as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Association> doGetAssociationsPlayed(org.tmapi.core.Topic topic, int offset, int limit)
          Returns all associations played by given topic as a list within the given range.
protected  java.util.List<org.tmapi.core.Association> doGetAssociationsPlayed(org.tmapi.core.Topic topic, int offset, int limit, java.util.Comparator<org.tmapi.core.Association> comparator)
          Returns all associations played by given topic as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Name> doGetNames(org.tmapi.core.Topic topic, int offset, int limit)
          Returns all names of the given topic as a list within the given range.
protected  java.util.List<org.tmapi.core.Name> doGetNames(org.tmapi.core.Topic topic, int offset, int limit, java.util.Comparator<org.tmapi.core.Name> comparator)
          Returns all names of the given topic as a sorted list within the given range.
protected  long doGetNumberOfAssociations()
          Return the number of associations of the topic map
protected  long doGetNumberOfAssociationsPlayed(org.tmapi.core.Topic topic)
          Return the number of played associations of the topic
protected  long doGetNumberOfNames(org.tmapi.core.Topic topic)
          Return the number of names of the topic
protected  long doGetNumberOfOccurrences(org.tmapi.core.Topic topic)
          Return the number of occurrences of the topic
protected  long doGetNumberOfRoles(org.tmapi.core.Association association)
          Return the number of roles of the association
protected  long doGetNumberOfRolesPlayed(org.tmapi.core.Topic topic)
          Return the number of played roles of the topic
protected  long doGetNumberOfSupertypes(org.tmapi.core.Topic topic)
          Return the number of supetypes of the topic
protected  long doGetNumberOfTopics()
          Return the number of topics
protected  long doGetNumberOfTypes(org.tmapi.core.Topic topic)
          Return the number of types of the topic
protected  long doGetNumberOfVariants(org.tmapi.core.Name name)
          Return the number of variants of the name
protected  java.util.List<org.tmapi.core.Occurrence> doGetOccurrences(org.tmapi.core.Topic topic, int offset, int limit)
          Returns all occurrences of the given topic as a list within the given range.
protected  java.util.List<org.tmapi.core.Occurrence> doGetOccurrences(org.tmapi.core.Topic topic, int offset, int limit, java.util.Comparator<org.tmapi.core.Occurrence> comparator)
          Returns all occurrences of the given topic as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Role> doGetRoles(org.tmapi.core.Association association, int offset, int limit)
          Returns all roles of the given association as a list within the given range.
protected  java.util.List<org.tmapi.core.Role> doGetRoles(org.tmapi.core.Association association, int offset, int limit, java.util.Comparator<org.tmapi.core.Role> comparator)
          Returns all roles of the given association as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Role> doGetRolesPlayed(org.tmapi.core.Topic topic, int offset, int limit)
          Returns all roles played by given topic as a list within the given range.
protected  java.util.List<org.tmapi.core.Role> doGetRolesPlayed(org.tmapi.core.Topic topic, int offset, int limit, java.util.Comparator<org.tmapi.core.Role> comparator)
          Returns all roles played by given topic as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic topic, int offset, int limit)
          Returns all supetypes of the given topic as a list within the given range.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic topic, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all supetypes of the given topic as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Topic> doGetTopics(int offset, int limit)
          Returns all topics of the topic map as a list within the given range.
protected  java.util.List<org.tmapi.core.Topic> doGetTopics(int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topics of the topic map within the given range.
protected  java.util.List<org.tmapi.core.Topic> doGetTypes(org.tmapi.core.Topic topic, int offset, int limit)
          Returns all types of the given topic as a list within the given range.
protected  java.util.List<org.tmapi.core.Topic> doGetTypes(org.tmapi.core.Topic topic, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all types of the given topic as a sorted list within the given range.
protected  java.util.List<org.tmapi.core.Variant> doGetVariants(org.tmapi.core.Name name, int offset, int limit)
          Returns all variants of the given name as a list within the given range.
protected  java.util.List<org.tmapi.core.Variant> doGetVariants(org.tmapi.core.Name name, int offset, int limit, java.util.Comparator<org.tmapi.core.Variant> comparator)
          Returns all variants of the given name as a sorted list within the given range.
 
Methods inherited from class de.topicmapslab.majortom.index.paged.PagedConstructIndexImpl
cacheConstructs, cacheConstructs, cacheNumberOfConstructs, clear, clearCache, close, getAssociations, getAssociations, getAssociationsPlayed, getAssociationsPlayed, getNames, getNames, getNumberOfAssociations, getNumberOfAssociationsPlayed, getNumberOfNames, getNumberOfOccurrences, getNumberOfRoles, getNumberOfRolesPlayed, getNumberOfSupertypes, getNumberOfTopics, getNumberOfTypes, getNumberOfVariants, getOccurrences, getOccurrences, getRoles, getRoles, getRolesPlayed, getRolesPlayed, getSupertypes, getSupertypes, getTopics, getTopics, getTypes, getTypes, getVariants, getVariants, open, readConstructs, readConstructs, readNumberOfConstructs, topicMapChanged
 
Methods inherited from class de.topicmapslab.majortom.index.core.BaseCachedIndexImpl
isCachingEnabled, isOnTransactionContext, isOnTransactionContext, isOnTransactionContext, isOnTransactionContext, isOnTransactionContext
 
Methods inherited from class de.topicmapslab.majortom.index.IndexImpl
getTopicMapStore, isAutoUpdated, isOpen, reindex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tmapi.index.Index
isAutoUpdated, isOpen, reindex
 

Constructor Detail

JdbcPagedConstructIndex

public JdbcPagedConstructIndex(JdbcTopicMapStore store)
Parameters:
store -
Method Detail

doGetAssociations

protected java.util.List<org.tmapi.core.Association> doGetAssociations(int offset,
                                                                       int limit)
Returns all associations of the topic map as a list within the given range.

Overrides:
doGetAssociations in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the offset
limit - the limit
Returns:
all associations as a list within the given range.

doGetAssociations

protected java.util.List<org.tmapi.core.Association> doGetAssociations(int offset,
                                                                       int limit,
                                                                       java.util.Comparator<org.tmapi.core.Association> comparator)
Returns all associations of the topic map as a sorted list within the given range.

Overrides:
doGetAssociations in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all associations as a sorted list within the given range.

doGetNumberOfAssociations

protected long doGetNumberOfAssociations()
Return the number of associations of the topic map

Overrides:
doGetNumberOfAssociations in class PagedConstructIndexImpl<JdbcTopicMapStore>
Returns:
the number of associations

doGetAssociationsPlayed

protected java.util.List<org.tmapi.core.Association> doGetAssociationsPlayed(org.tmapi.core.Topic topic,
                                                                             int offset,
                                                                             int limit,
                                                                             java.util.Comparator<org.tmapi.core.Association> comparator)
Returns all associations played by given topic as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetAssociationsPlayed in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose played associations should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all associations played by given topic as a sorted list within the given range.

doGetAssociationsPlayed

protected java.util.List<org.tmapi.core.Association> doGetAssociationsPlayed(org.tmapi.core.Topic topic,
                                                                             int offset,
                                                                             int limit)
Returns all associations played by given topic as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetAssociationsPlayed in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose played associations should be returned
offset - the offset
limit - the limit
Returns:
all associations played by given topic as a list within the given range.

doGetNames

protected java.util.List<org.tmapi.core.Name> doGetNames(org.tmapi.core.Topic topic,
                                                         int offset,
                                                         int limit,
                                                         java.util.Comparator<org.tmapi.core.Name> comparator)
Returns all names of the given topic as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNames in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose names should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all names of the given topic as a sorted list within the given range.

doGetNames

protected java.util.List<org.tmapi.core.Name> doGetNames(org.tmapi.core.Topic topic,
                                                         int offset,
                                                         int limit)
Returns all names of the given topic as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNames in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose names should be returned
offset - the offset
limit - the limit
Returns:
all names of the given topic as a list within the given range.

doGetNumberOfAssociationsPlayed

protected long doGetNumberOfAssociationsPlayed(org.tmapi.core.Topic topic)
Return the number of played associations of the topic

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfAssociationsPlayed in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose number of played associations should be returned
Returns:
the number of played associations

doGetNumberOfNames

protected long doGetNumberOfNames(org.tmapi.core.Topic topic)
Return the number of names of the topic

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfNames in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose number of names should be returned
Returns:
the number of names

doGetNumberOfOccurrences

protected long doGetNumberOfOccurrences(org.tmapi.core.Topic topic)
Return the number of occurrences of the topic

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfOccurrences in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose number of occurrences should be returned
Returns:
the number of occurrences

doGetNumberOfRoles

protected long doGetNumberOfRoles(org.tmapi.core.Association association)
Return the number of roles of the association

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfRoles in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
association - the association whose number of roles should be returned
Returns:
the number of roles

doGetNumberOfRolesPlayed

protected long doGetNumberOfRolesPlayed(org.tmapi.core.Topic topic)
Return the number of played roles of the topic

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfRolesPlayed in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose number of played roles should be returned
Returns:
the number of played roles

doGetNumberOfSupertypes

protected long doGetNumberOfSupertypes(org.tmapi.core.Topic topic)
Return the number of supetypes of the topic

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfSupertypes in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose number of supertypes should be returned
Returns:
the number of supertypes

doGetNumberOfTypes

protected long doGetNumberOfTypes(org.tmapi.core.Topic topic)
Return the number of types of the topic

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfTypes in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose number of types should be returned
Returns:
the number of types

doGetNumberOfVariants

protected long doGetNumberOfVariants(org.tmapi.core.Name name)
Return the number of variants of the name

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetNumberOfVariants in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
name - the name whose number of variants should be returned
Returns:
the number of variants

doGetOccurrences

protected java.util.List<org.tmapi.core.Occurrence> doGetOccurrences(org.tmapi.core.Topic topic,
                                                                     int offset,
                                                                     int limit,
                                                                     java.util.Comparator<org.tmapi.core.Occurrence> comparator)
Returns all occurrences of the given topic as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetOccurrences in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose occurrences should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all occurrences of the given topic as a sorted list within the given range.

doGetOccurrences

protected java.util.List<org.tmapi.core.Occurrence> doGetOccurrences(org.tmapi.core.Topic topic,
                                                                     int offset,
                                                                     int limit)
Returns all occurrences of the given topic as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetOccurrences in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose occurrences should be returned
offset - the offset
limit - the limit
Returns:
all occurrences of the given topic as a list within the given range.

doGetRoles

protected java.util.List<org.tmapi.core.Role> doGetRoles(org.tmapi.core.Association association,
                                                         int offset,
                                                         int limit,
                                                         java.util.Comparator<org.tmapi.core.Role> comparator)
Returns all roles of the given association as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetRoles in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
association - the association whose roles should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all roles of the given association as a sorted list within the given range.

doGetRoles

protected java.util.List<org.tmapi.core.Role> doGetRoles(org.tmapi.core.Association association,
                                                         int offset,
                                                         int limit)
Returns all roles of the given association as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetRoles in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
association - the association whose roles should be returned
offset - the offset
limit - the limit
Returns:
all roles of the given association as a list within the given range.

doGetRolesPlayed

protected java.util.List<org.tmapi.core.Role> doGetRolesPlayed(org.tmapi.core.Topic topic,
                                                               int offset,
                                                               int limit,
                                                               java.util.Comparator<org.tmapi.core.Role> comparator)
Returns all roles played by given topic as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetRolesPlayed in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose played roles should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all roles played by given topic as a sorted list within the given range.

doGetRolesPlayed

protected java.util.List<org.tmapi.core.Role> doGetRolesPlayed(org.tmapi.core.Topic topic,
                                                               int offset,
                                                               int limit)
Returns all roles played by given topic as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetRolesPlayed in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose played roles should be returned
offset - the offset
limit - the limit
Returns:
all roles played by given topic as a list within the given range.

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic topic,
                                                               int offset,
                                                               int limit,
                                                               java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all supetypes of the given topic as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetSupertypes in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose supetypes should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all supetypes of the given topic as a sorted list within the given range.

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic topic,
                                                               int offset,
                                                               int limit)
Returns all supetypes of the given topic as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetSupertypes in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose supetypes should be returned
offset - the offset
limit - the limit
Returns:
all supetypes of the given topic as a list within the given range.

doGetTopics

protected java.util.List<org.tmapi.core.Topic> doGetTopics(int offset,
                                                           int limit)
Returns all topics of the topic map as a list within the given range.

Overrides:
doGetTopics in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the offset
limit - the limit
Returns:
all topic as a list within the given range.

doGetTopics

protected java.util.List<org.tmapi.core.Topic> doGetTopics(int offset,
                                                           int limit,
                                                           java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topics of the topic map within the given range.

Overrides:
doGetTopics in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all topic as a sorted list within the given range.

doGetNumberOfTopics

protected long doGetNumberOfTopics()
Return the number of topics

Overrides:
doGetNumberOfTopics in class PagedConstructIndexImpl<JdbcTopicMapStore>
Returns:
the number of topics

doGetTypes

protected java.util.List<org.tmapi.core.Topic> doGetTypes(org.tmapi.core.Topic topic,
                                                          int offset,
                                                          int limit,
                                                          java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all types of the given topic as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetTypes in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose types should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all types of the given topic as a sorted list within the given range.

doGetTypes

protected java.util.List<org.tmapi.core.Topic> doGetTypes(org.tmapi.core.Topic topic,
                                                          int offset,
                                                          int limit)
Returns all types of the given topic as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetTypes in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
topic - the topic whose types should be returned
offset - the offset
limit - the limit
Returns:
all types of the given topic as a list within the given range.

doGetVariants

protected java.util.List<org.tmapi.core.Variant> doGetVariants(org.tmapi.core.Name name,
                                                               int offset,
                                                               int limit,
                                                               java.util.Comparator<org.tmapi.core.Variant> comparator)
Returns all variants of the given name as a sorted list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetVariants in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
name - the name whose variants should be returned
offset - the offset
limit - the limit
comparator - the comparator
Returns:
all variants of the given name as a sorted list within the given range.

doGetVariants

protected java.util.List<org.tmapi.core.Variant> doGetVariants(org.tmapi.core.Name name,
                                                               int offset,
                                                               int limit)
Returns all variants of the given name as a list within the given range.

Hint: Method extracts all items from database to enable the usage of comparators. The operation can be very slowly.

Overrides:
doGetVariants in class PagedConstructIndexImpl<JdbcTopicMapStore>
Parameters:
name - the name whose variants should be returned
offset - the offset
limit - the limit
Returns:
all variants of the given name as a list within the given range.