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

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.core.BaseCachedSupertypeSubtypeIndexImpl<T>
              extended by de.topicmapslab.majortom.index.paged.PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
                  extended by de.topicmapslab.majortom.database.jdbc.index.paged.JdbcPagedSupertypeSubtypeIndex
All Implemented Interfaces:
de.topicmapslab.majortom.model.event.ITopicMapListener, de.topicmapslab.majortom.model.index.IIndex, de.topicmapslab.majortom.model.index.paging.IPagedSupertypeSubtypeIndex, org.tmapi.index.Index

public class JdbcPagedSupertypeSubtypeIndex
extends PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>

Author:
Sven Krosse

Nested Class Summary
 
Nested classes/interfaces inherited from class de.topicmapslab.majortom.index.core.BaseCachedSupertypeSubtypeIndexImpl
BaseCachedSupertypeSubtypeIndexImpl.Type
 
Constructor Summary
JdbcPagedSupertypeSubtypeIndex(JdbcTopicMapStore store, de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex parentIndex)
          constructor
 
Method Summary
protected  java.util.List<org.tmapi.core.Topic> doGetDirectSubtypes(org.tmapi.core.Topic type, int offset, int limit)
          Returns all topic types being a direct subtype of the given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetDirectSubtypes(org.tmapi.core.Topic type, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a direct subtype of the given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetDirectSupertypes(org.tmapi.core.Topic type, int offset, int limit)
          Returns all topic types being a direct supertype of the given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetDirectSupertypes(org.tmapi.core.Topic type, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a direct supertype of the given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all, int offset, int limit)
          Returns all topic types being a subtype of at least one given type or of every given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a subtype of at least one given type or of every given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetSubtypes(int offset, int limit)
          Returns all topic types being a subtype of a topic type contained by the topic map.
protected  java.util.List<org.tmapi.core.Topic> doGetSubtypes(int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a subtype of a topic type contained by the topic map.
protected  java.util.List<org.tmapi.core.Topic> doGetSubtypes(org.tmapi.core.Topic type, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a subtype of the given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all, int offset, int limit)
          Returns all topic types being a supertype of at least one given type or of every given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a supertype of at least one given type or of every given topic type.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(int offset, int limit)
          Returns all topic types being a supertype of a topic type contained by the topic map.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a supertype of a topic type contained by the topic map.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic type, int offset, int limit)
          Returns all topic types being a supertype of the given topic type.If the type is null the method returns all topics which have no super-types.
protected  java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic type, int offset, int limit, java.util.Comparator<org.tmapi.core.Topic> comparator)
          Returns all topic types being a supertype of the given topic type.If the type is null the method returns all topics which have no super-types.
 
Methods inherited from class de.topicmapslab.majortom.index.paged.PagedSupertypeSubtypeIndexImpl
doGetNumberOfDirectSubtypes, doGetNumberOfDirectSupertypes, doGetNumberOfSubtypes, doGetNumberOfSubtypes, doGetNumberOfSubtypes, doGetNumberOfSupertypes, doGetNumberOfSupertypes, doGetNumberOfSupertypes, doGetSubtypes, getDirectSubtypes, getDirectSubtypes, getDirectSupertypes, getDirectSupertypes, getNumberOfDirectSubtypes, getNumberOfDirectSupertypes, getNumberOfSubtypes, getNumberOfSubtypes, getNumberOfSubtypes, getNumberOfSubtypes, getNumberOfSupertypes, getNumberOfSupertypes, getNumberOfSupertypes, getNumberOfSupertypes, getParentIndex, getSubtypes, getSubtypes, getSubtypes, getSubtypes, getSubtypes, getSubtypes, getSubtypes, getSubtypes, getSupertypes, getSupertypes, getSupertypes, getSupertypes, getSupertypes, getSupertypes, getSupertypes, getSupertypes, open
 
Methods inherited from class de.topicmapslab.majortom.index.core.BaseCachedSupertypeSubtypeIndexImpl
cache, cache, cacheNumberOfConstructs, clear, clearCache, close, read, read, 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 de.topicmapslab.majortom.model.index.IIndex
clear
 
Methods inherited from interface org.tmapi.index.Index
close, isAutoUpdated, isOpen, reindex
 

Constructor Detail

JdbcPagedSupertypeSubtypeIndex

public JdbcPagedSupertypeSubtypeIndex(JdbcTopicMapStore store,
                                      de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex parentIndex)
constructor

Parameters:
store - the store
parentIndex - the parent index
Method Detail

doGetDirectSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetDirectSubtypes(org.tmapi.core.Topic type,
                                                                   int offset,
                                                                   int limit,
                                                                   java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a direct subtype of the given topic type. If the type is null the method returns all topics which has no sub-types.

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

Overrides:
doGetDirectSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a list of all subtypes of the given type within the given range

doGetDirectSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetDirectSubtypes(org.tmapi.core.Topic type,
                                                                   int offset,
                                                                   int limit)
Returns all topic types being a direct subtype of the given topic type. If the type is null the method returns all topics which has no sub-types.

Overrides:
doGetDirectSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all subtypes of the given type within the given range

doGetDirectSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetDirectSupertypes(org.tmapi.core.Topic type,
                                                                     int offset,
                                                                     int limit,
                                                                     java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a direct supertype of the given topic type. If the type is null the method returns all topics which have no super-types.

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

Overrides:
doGetDirectSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a list of all supertypes of the given type within the given range

doGetDirectSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetDirectSupertypes(org.tmapi.core.Topic type,
                                                                     int offset,
                                                                     int limit)
Returns all topic types being a direct supertype of the given topic type. If the type is null the method returns all topics which have no super-types.

Overrides:
doGetDirectSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all supertypes of the given type within the given range

doGetSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                             boolean all,
                                                             int offset,
                                                             int limit,
                                                             java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a subtype of at least one given type or of every given topic type.

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

Overrides:
doGetSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
all - flag indicates if the found topic types should be an subtype of every given type
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a collection of all subtypes of at least one of the given type

doGetSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                             boolean all,
                                                             int offset,
                                                             int limit)
Returns all topic types being a subtype of at least one given type or of every given topic type.

Overrides:
doGetSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
all - flag indicates if the found topic types should be an subtype of every given type
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all subtypes of at least one of the given type within the given range

doGetSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetSubtypes(int offset,
                                                             int limit,
                                                             java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a subtype of a topic type contained by the topic map.

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

Overrides:
doGetSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a list of all subtypes within the given range

doGetSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetSubtypes(int offset,
                                                             int limit)
Returns all topic types being a subtype of a topic type contained by the topic map.

Overrides:
doGetSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all subtypes within the given range

doGetSubtypes

protected java.util.List<org.tmapi.core.Topic> doGetSubtypes(org.tmapi.core.Topic type,
                                                             int offset,
                                                             int limit,
                                                             java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a subtype of the given topic type. If the type is null the method returns all topics which has no sub-types.

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

Overrides:
doGetSubtypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
Returns:
a list of all subtypes of the given type within the given range

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                               boolean all,
                                                               int offset,
                                                               int limit,
                                                               java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a supertype of at least one given type or of every given topic type.

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

Overrides:
doGetSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
all - flag indicates if the found topic types should be an supertype of every given type
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a list of all supertypes of at least one of the given type within the given range

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                               boolean all,
                                                               int offset,
                                                               int limit)
Returns all topic types being a supertype of at least one given type or of every given topic type.

Overrides:
doGetSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
all - flag indicates if the found topic types should be an supertype of every given type
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all supertypes of at least one of the given type within the given range

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(int offset,
                                                               int limit,
                                                               java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a supertype of a topic type contained by the topic map.

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

Overrides:
doGetSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a list of all supertypes within the given range

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(int offset,
                                                               int limit)
Returns all topic types being a supertype of a topic type contained by the topic map.

Overrides:
doGetSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all supertypes within the given range

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic type,
                                                               int offset,
                                                               int limit,
                                                               java.util.Comparator<org.tmapi.core.Topic> comparator)
Returns all topic types being a supertype of the given topic type.If the type is null the method returns all topics which have no super-types.

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

Overrides:
doGetSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
offset - the index of the first item
limit - the maximum count of returned values
comparator - the comparator
Returns:
a list of all supertypes of the given type within the given range

doGetSupertypes

protected java.util.List<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic type,
                                                               int offset,
                                                               int limit)
Returns all topic types being a supertype of the given topic type.If the type is null the method returns all topics which have no super-types.

Overrides:
doGetSupertypes in class PagedSupertypeSubtypeIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
offset - the index of the first item
limit - the maximum count of returned values
Returns:
a list of all supertypes of the given type within the given range