Package com.apple.foundationdb.record
Class IndexEntry
java.lang.Object
com.apple.foundationdb.record.IndexEntry
An 
IndexEntry carries around the key and value read from an index (as the name would imply).
 Further, if the key and value were produced by applying an index key expression to a record, this will carry
 around additional information about the nulls contained in the expression.- 
Constructor SummaryConstructorsConstructorDescriptionIndexEntry(Index index, Key.Evaluated key) IndexEntry(Index index, Key.Evaluated key, Key.Evaluated value) IndexEntry(Index index, Tuple key, Tuple value) IndexEntry(Index index, Tuple key, Tuple value, Tuple primaryKey) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetIndex()Get the index associated with this entry.getKey()Get the key portion of the index entry.getKeyNullType(int idx) Get the type of null stored in a given key index location.intgetKeyValue(int idx) Get a tuple element of the key tuple.Get the primary key of the record associated with this entry.getValue()Get the value portion of the index entry.inthashCode()booleanReturns true if the key expression contains a NULL value that is not aKey.Evaluated.NullStandin.NULL_UNIQUEvalue.subKey(int startIdx, int endIdx) Produces a newIndexEntrywhose key is a subset of thisIndexEntry.toString()voidvalidateInIndex(Index index) Validate that this entry is associated with the given index.
- 
Constructor Details- 
IndexEntry@API(INTERNAL) public IndexEntry(@Nonnull Index index, @Nonnull Key.Evaluated key, @Nonnull Key.Evaluated value) 
- 
IndexEntry
- 
IndexEntry
- 
IndexEntry
 
- 
- 
Method Details- 
getIndexGet the index associated with this entry. This entry was either created in order to store within this index or it was constructed from reading this index.- Returns:
- the index associated with this entry
 
- 
getKeyGet the key portion of the index entry. This is stored in the key portion of the key-value pair in the database. Index entries are generally sorted by key, and this key must be unique for all entries in an index. As a result, it generally contains the primary key of its associated record as a sub-component.- Returns:
- the key portion of the index entry
- See Also:
 
- 
getValueGet the value portion of the index entry. This is stored in the value portion of the key-value pair in the database. Index entries are not sorted by value, but the user might configure indexes to have additional fields in the index value in order to increase the number of queries that can be satisfied without needing to resolve the underlying record.- Returns:
- the value portion of the index entry
 
- 
getKeySizepublic int getKeySize()
- 
getPrimaryKeyGet the primary key of the record associated with this entry. Note that some indexes, such as the atomic mutation indexes, erase the primary key information from the indexes they store. In that case, this method might not return a reasonable result.- Returns:
- the primary key of the record that produced this index entry
 
- 
getKeyValueGet a tuple element of the key tuple.- Parameters:
- idx- the index of the desired element
- Returns:
- the tuple element at index idx
 
- 
validateInIndexValidate that this entry is associated with the given index.- Parameters:
- index- the index this entry should be a member of
 
- 
keyContainsNonUniqueNullpublic boolean keyContainsNonUniqueNull()Returns true if the key expression contains a NULL value that is not aKey.Evaluated.NullStandin.NULL_UNIQUEvalue. Calling this method on aIndexEntrythat was created directly from tuples will result in an exception.- Returns:
- trueif the key contains a non-unique null value
 
- 
getKeyNullTypeGet the type of null stored in a given key index location. Calling this method on anIndexEntrythat was created directly from tuples, or if the value atidxis not null, will result in an exception.- Parameters:
- idx- the index of a null element
- Returns:
- the type of null stored at idx
 
- 
subKeyProduces a newIndexEntrywhose key is a subset of thisIndexEntry.- Parameters:
- startIdx- the starting offset of the key to use for the new value
- endIdx- the ending offset (exclusive) of the key to use for the new value
- Returns:
- a new index entry with the subset key between startIdxandendIdx
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-