public class CompositeIndexManager
Composite index management operations needed by the datastore api.
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 | |
---|---|
Name | Description |
indexOnlyQuery |
CompositeIndexManager.IndexComponentsOnlyQuery The query. |
Returns | |
---|---|
Type | Description |
@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 |
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 | |
---|---|
Name | Description |
index |
com.google.storage.onestore.v3.OnestoreEntity.Index The index for which we want an xml representation. |
source |
CompositeIndexManager.IndexSource The source of the provided index. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
indexOnlyQuery |
CompositeIndexManager.IndexComponentsOnlyQuery The query. |
indexes |
Collection<com.google.storage.onestore.v3.OnestoreEntity.Index> The existing indexes. |
Returns | |
---|---|
Type | Description |
@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 |