public abstract class PostgreSQLAttributeIndex<A,O extends com.eventsourcing.Entity>
extends com.eventsourcing.index.AbstractAttributeIndex<A,O>
| Modifier and Type | Class and Description |
|---|---|
protected class |
PostgreSQLAttributeIndex.MatchingResultSet<O extends com.eventsourcing.Entity,T extends com.googlecode.cqengine.query.Query<com.eventsourcing.EntityHandle<O>>> |
protected static class |
PostgreSQLAttributeIndex.OnConflictDo |
| Modifier and Type | Field and Description |
|---|---|
protected com.eventsourcing.index.KeyObjectStore<java.util.UUID,com.eventsourcing.EntityHandle<O>> |
keyObjectStore |
| Modifier | Constructor and Description |
|---|---|
protected |
PostgreSQLAttributeIndex(com.eventsourcing.index.Attribute<O,A> attribute,
java.util.Set<java.lang.Class<? extends com.googlecode.cqengine.query.Query>> supportedQueries)
Protected constructor, called by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Iterator<com.eventsourcing.EntityHandle<O>> iterator,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
boolean |
addAll(com.googlecode.cqengine.persistence.support.ObjectSet<com.eventsourcing.EntityHandle<O>> objectSet,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
protected void |
addAll(com.googlecode.cqengine.persistence.support.ObjectStore<com.eventsourcing.EntityHandle<O>> objectStore,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
void |
clear(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
protected abstract com.eventsourcing.layout.TypeHandler |
getAttributeTypeHandler() |
java.lang.Integer |
getCountForKey(A key,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
java.lang.Integer |
getCountOfDistinctKeys(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
protected abstract javax.sql.DataSource |
getDataSource() |
com.googlecode.cqengine.index.support.CloseableIterable<A> |
getDistinctKeys(A lowerBound,
boolean lowerInclusive,
A upperBound,
boolean upperInclusive,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<A> |
getDistinctKeys(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<A> |
getDistinctKeysDescending(A lowerBound,
boolean lowerInclusive,
A upperBound,
boolean upperInclusive,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<A> |
getDistinctKeysDescending(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.Index<com.eventsourcing.EntityHandle<O>> |
getEffectiveIndex() |
com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> |
getKeysAndValues(A lowerBound,
boolean lowerInclusive,
A upperBound,
boolean upperInclusive,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> |
getKeysAndValues(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> |
getKeysAndValuesDescending(A lowerBound,
boolean lowerInclusive,
A upperBound,
boolean upperInclusive,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> |
getKeysAndValuesDescending(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
protected com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyStatistics<A>> |
getKeyStatisticsForDistinctKeys(java.lang.String order) |
protected abstract com.eventsourcing.layout.Layout<O> |
getLayout() |
protected A |
getQuantizedValue(A attributeValue) |
com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyStatistics<A>> |
getStatisticsForDistinctKeys(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyStatistics<A>> |
getStatisticsForDistinctKeysDescending(com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
protected abstract java.lang.String |
getTableName() |
protected abstract int |
indexRetrievalCost() |
void |
init(com.googlecode.cqengine.persistence.support.ObjectStore<com.eventsourcing.EntityHandle<O>> objectStore,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
boolean |
isMutable() |
boolean |
isQuantized() |
protected abstract boolean |
isUnique() |
protected com.googlecode.cqengine.index.support.CloseableIterable<A> |
queryDistinctKeys(A lowerBound,
boolean lowerInclusive,
A upperBound,
boolean upperInclusive,
java.lang.String order) |
protected com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> |
queryKeysAndValues(A lowerBound,
boolean lowerInclusive,
A upperBound,
boolean upperInclusive,
com.googlecode.cqengine.query.option.QueryOptions queryOptionsString,
java.lang.String order) |
protected com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> |
queryKeysAndValues(java.lang.String order) |
boolean |
removeAll(com.googlecode.cqengine.persistence.support.ObjectSet<com.eventsourcing.EntityHandle<O>> objects,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
com.googlecode.cqengine.resultset.ResultSet<com.eventsourcing.EntityHandle<O>> |
retrieve(com.googlecode.cqengine.query.Query<com.eventsourcing.EntityHandle<O>> query,
com.googlecode.cqengine.query.option.QueryOptions queryOptions) |
protected static <A,O extends com.eventsourcing.Entity> |
serializableComparable(com.eventsourcing.index.Attribute<O,A> attribute) |
protected com.eventsourcing.index.KeyObjectStore<java.util.UUID,com.eventsourcing.EntityHandle<O extends com.eventsourcing.Entity>> keyObjectStore
protected PostgreSQLAttributeIndex(com.eventsourcing.index.Attribute<O,A> attribute, java.util.Set<java.lang.Class<? extends com.googlecode.cqengine.query.Query>> supportedQueries)
attribute - The attribute on which the index will be builtsupportedQueries - The set of Query types which the subclass implementation supportsprotected static <A,O extends com.eventsourcing.Entity> com.eventsourcing.index.Attribute<O,?> serializableComparable(com.eventsourcing.index.Attribute<O,A> attribute)
protected abstract javax.sql.DataSource getDataSource()
protected abstract com.eventsourcing.layout.Layout<O> getLayout()
protected abstract java.lang.String getTableName()
protected abstract com.eventsourcing.layout.TypeHandler getAttributeTypeHandler()
protected abstract boolean isUnique()
public com.googlecode.cqengine.index.support.CloseableIterable<A> getDistinctKeys(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public java.lang.Integer getCountForKey(A key, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public java.lang.Integer getCountOfDistinctKeys(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyStatistics<A>> getStatisticsForDistinctKeys(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyStatistics<A>> getStatisticsForDistinctKeysDescending(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
protected com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyStatistics<A>> getKeyStatisticsForDistinctKeys(java.lang.String order) throws java.sql.SQLException
java.sql.SQLExceptionpublic com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> getKeysAndValues(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
protected com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> queryKeysAndValues(java.lang.String order) throws java.sql.SQLException
java.sql.SQLExceptionpublic com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> getKeysAndValuesDescending(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public boolean isMutable()
public boolean isQuantized()
public com.googlecode.cqengine.index.Index<com.eventsourcing.EntityHandle<O>> getEffectiveIndex()
public boolean addAll(com.googlecode.cqengine.persistence.support.ObjectSet<com.eventsourcing.EntityHandle<O>> objectSet, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public boolean addAll(java.util.Iterator<com.eventsourcing.EntityHandle<O>> iterator, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
protected void addAll(com.googlecode.cqengine.persistence.support.ObjectStore<com.eventsourcing.EntityHandle<O>> objectStore, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public boolean removeAll(com.googlecode.cqengine.persistence.support.ObjectSet<com.eventsourcing.EntityHandle<O>> objects, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public void clear(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public void init(com.googlecode.cqengine.persistence.support.ObjectStore<com.eventsourcing.EntityHandle<O>> objectStore, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public com.googlecode.cqengine.index.support.CloseableIterable<A> getDistinctKeys(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
protected com.googlecode.cqengine.index.support.CloseableIterable<A> queryDistinctKeys(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, java.lang.String order) throws java.sql.SQLException
java.sql.SQLExceptionpublic com.googlecode.cqengine.index.support.CloseableIterable<A> getDistinctKeysDescending(com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public com.googlecode.cqengine.index.support.CloseableIterable<A> getDistinctKeysDescending(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> getKeysAndValues(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
public com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> getKeysAndValuesDescending(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
protected com.googlecode.cqengine.index.support.CloseableIterable<com.googlecode.cqengine.index.support.KeyValue<A,com.eventsourcing.EntityHandle<O>>> queryKeysAndValues(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, com.googlecode.cqengine.query.option.QueryOptions queryOptionsString, java.lang.String order) throws java.sql.SQLException
java.sql.SQLExceptionpublic com.googlecode.cqengine.resultset.ResultSet<com.eventsourcing.EntityHandle<O>> retrieve(com.googlecode.cqengine.query.Query<com.eventsourcing.EntityHandle<O>> query, com.googlecode.cqengine.query.option.QueryOptions queryOptions)
protected abstract int indexRetrievalCost()