Class CompositeIndexManager (2.0.0)

public class CompositeIndexManager

Composite index management operations needed by the datastore api.

Inheritance

java.lang.Object > CompositeIndexManager

Constructors

CompositeIndexManager()

public CompositeIndexManager()

Methods

compositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery)

protected @Nullable OnestoreEntity.Index compositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery)

Given a IndexComponentsOnlyQuery, return the Index needed to fulfill the query, or null if no index is needed.

This code needs to remain in sync with its counterparts in other languages. If you modify this code please make sure you make the same update in the local datastore for other languages.

Parameter
NameDescription
indexOnlyQueryCompositeIndexManager.IndexComponentsOnlyQuery

The query.

Returns
TypeDescription
@org.checkerframework.checker.nullness.qual.Nullable com.google.storage.onestore.v3.OnestoreEntity.Index

The index that must be present in order to fulfill the query, or null if no index is needed.

generateXmlForIndex(OnestoreEntity.Index index, CompositeIndexManager.IndexSource source)

protected String generateXmlForIndex(OnestoreEntity.Index index, CompositeIndexManager.IndexSource source)

Generate an xml representation of the provided Index.

Parameters
NameDescription
indexcom.google.storage.onestore.v3.OnestoreEntity.Index

The index for which we want an xml representation.

sourceCompositeIndexManager.IndexSource

The source of the provided index.

Returns
TypeDescription
String

The xml representation of the provided index.

minimumCompositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery, Collection<OnestoreEntity.Index> indexes)

protected @Nullable OnestoreEntity.Index minimumCompositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery, Collection<OnestoreEntity.Index> indexes)

Given a IndexComponentsOnlyQuery and a collection of existing Indexs, return the minimum Index needed to fulfill the query, or null if no index is needed.

This code needs to remain in sync with its counterparts in other languages. If you modify this code please make sure you make the same update in the local datastore for other languages.

Parameters
NameDescription
indexOnlyQueryCompositeIndexManager.IndexComponentsOnlyQuery

The query.

indexesCollection<com.google.storage.onestore.v3.OnestoreEntity.Index>

The existing indexes.

Returns
TypeDescription
@org.checkerframework.checker.nullness.qual.Nullable com.google.storage.onestore.v3.OnestoreEntity.Index

The minimum index that must be present in order to fulfill the query, or null if no index is needed.