Package org.rumbledb.items
Class ObjectItem
java.lang.Object
org.rumbledb.items.ObjectItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,Item
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionObjectItem(List<String> keys, List<Item> values, ExceptionMetadata itemMetadata) ObjectItem(Map<String, List<Item>> keyValuePairs) ObjectItem constructor from the given map data structure. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests for logical equality.Returns the dynamic type of the item (only for error message purposes).booleanReturns the effective boolean value of the item, if atomic.Returns the value associated with a specific key, if it is an object.getKeys()Returns the keys of the item, if it is an object.intReturns the mutability level of the item.Returns the path from the top level object of a DeltaFile for the item.Returns the SparkSQL type of the item for use in a query.Returns the SparkSQL value of the item for use in a query.getSparkSQLValue(ItemType itemType) Returns the SparkSQL value of the item for use in a query.Returns the location of the DeltaFile for the item.longReturns the top level ID of the item.doubleReturns the top level order (sequence number) identifierReturns the values of the item, if it is an object.Returns the Object containing the converted value of the item for a DataFrame.inthashCode()Computes a hash code.booleanisObject()Tests whether the item is an object.voidputItemByKey(String s, Item value) Adds a key-value pair, if it is an object item.voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidRemoves a key-value pair, if it is an object item.voidsetMutabilityLevel(int mutabilityLevel) Sets the mutability level of the item to a supplied value.voidSets the path from the top level object of a DeltaFile for the item to a supplied value.voidsetTableLocation(String location) Sets the location of the DeltaFile for the item to a supplied value.voidsetTopLevelID(long topLevelID) Sets the top level ID of the item to a supplied value.voidsetTopLevelOrder(double topLevelOrder) Sets the top level order parameter (rowOrder)voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rumbledb.api.Item
addParentToDescendants, append, attributes, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDay, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItems, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getNanosecond, getOffset, getParameterNames, getPeriodValue, getRDDVariablesInClosure, getSecond, getSignature, getSize, getStringValue, getTextValue, getTimeValue, getTransformer, getXmlDocumentPosition, getYear, hasDateTime, hasTimeZone, isAnyURI, isArray, isAtomic, isAttributeNode, isBase64Binary, isBinary, isBoolean, isDate, isDateTime, isDayTimeDuration, isDecimal, isDocumentNode, isDouble, isDuration, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isInt, isInteger, isNaN, isNode, isNull, isNumeric, isPeriod, isString, isTextNode, isTime, isTransformer, isYearMonthDuration, nodeName, parent, physicalEquals, putItem, putItemAt, putItemsAt, putLazyItemByKey, removeItemAt, serialize, serializeAsJSON, setParent, setXmlDocumentPosition
-
Constructor Details
-
ObjectItem
public ObjectItem() -
ObjectItem
-
ObjectItem
ObjectItem constructor from the given map data structure. For each key, the corresponding values list is turned into an ArrayItem if it contains more than a single element.- Parameters:
keyValuePairs- LinkedHashMap -- this map implementation preserves order of the keys -- essential for functionality
-
-
Method Details
-
equals
Description copied from interface:ItemTests for logical equality. The semantics are that of the eq operator. -
getKeys
Description copied from interface:ItemReturns the keys of the item, if it is an object. -
getValues
Description copied from interface:ItemReturns the values of the item, if it is an object. -
getItemByKey
Description copied from interface:ItemReturns the value associated with a specific key, if it is an object.- Specified by:
getItemByKeyin interfaceItem- Parameters:
s- a key.- Returns:
- the value associated with key.
-
putItemByKey
Description copied from interface:ItemAdds a key-value pair, if it is an object item.- Specified by:
putItemByKeyin interfaceItem- Parameters:
s- a key.value- a value.
-
removeItemByKey
Description copied from interface:ItemRemoves a key-value pair, if it is an object item.- Specified by:
removeItemByKeyin interfaceItem- Parameters:
s- a key.
-
isObject
public boolean isObject()Description copied from interface:ItemTests whether the item is an object. -
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable
-
hashCode
public int hashCode()Description copied from interface:ItemComputes a hash code. -
getDynamicType
Description copied from interface:ItemReturns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicTypein interfaceItem- Returns:
- the dynamic type as an item type.
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Specified by:
getEffectiveBooleanValuein interfaceItem- Returns:
- the effective boolean value.
-
getMutabilityLevel
public int getMutabilityLevel()Description copied from interface:ItemReturns the mutability level of the item.- Specified by:
getMutabilityLevelin interfaceItem- Returns:
- an int representing nestedness of the item inside transform expressions.
-
setMutabilityLevel
public void setMutabilityLevel(int mutabilityLevel) Description copied from interface:ItemSets the mutability level of the item to a supplied value.- Specified by:
setMutabilityLevelin interfaceItem- Parameters:
mutabilityLevel- new mutability level.
-
getTopLevelID
public long getTopLevelID()Description copied from interface:ItemReturns the top level ID of the item.- Specified by:
getTopLevelIDin interfaceItem- Returns:
- int representing the rowID of the item within a DeltaFile.
-
setTopLevelID
public void setTopLevelID(long topLevelID) Description copied from interface:ItemSets the top level ID of the item to a supplied value.- Specified by:
setTopLevelIDin interfaceItem- Parameters:
topLevelID- new top level ID.
-
getTopLevelOrder
public double getTopLevelOrder()Description copied from interface:ItemReturns the top level order (sequence number) identifier- Specified by:
getTopLevelOrderin interfaceItem- Returns:
- double representing rowOrder of the tuple
-
setTopLevelOrder
public void setTopLevelOrder(double topLevelOrder) Description copied from interface:ItemSets the top level order parameter (rowOrder)- Specified by:
setTopLevelOrderin interfaceItem- Parameters:
topLevelOrder- new rowOrder value
-
getPathIn
Description copied from interface:ItemReturns the path from the top level object of a DeltaFile for the item. -
setPathIn
Description copied from interface:ItemSets the path from the top level object of a DeltaFile for the item to a supplied value. -
getTableLocation
Description copied from interface:ItemReturns the location of the DeltaFile for the item.- Specified by:
getTableLocationin interfaceItem- Returns:
- String representing the location of the DeltaFile for the item.
-
setTableLocation
Description copied from interface:ItemSets the location of the DeltaFile for the item to a supplied value.- Specified by:
setTableLocationin interfaceItem- Parameters:
location- new location of the DeltaFile for the item.
-
getSparkSQLValue
Description copied from interface:ItemReturns the SparkSQL value of the item for use in a query.- Specified by:
getSparkSQLValuein interfaceItem- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLValue
Description copied from interface:ItemReturns the SparkSQL value of the item for use in a query.- Specified by:
getSparkSQLValuein interfaceItem- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLType
Description copied from interface:ItemReturns the SparkSQL type of the item for use in a query.- Specified by:
getSparkSQLTypein interfaceItem- Returns:
- String representing the SparkSQL type of the item.
-
atomizedValue
- Specified by:
atomizedValuein interfaceItem
-
getVariantValue
Description copied from interface:ItemReturns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.- Specified by:
getVariantValuein interfaceItem- Returns:
- Object representing the converted value of the item.
-