public abstract class InMemoryElement<TElement extends InMemoryElement> extends ElementBase
ID_PROPERTY_NAME| Modifier | Constructor and Description |
|---|---|
protected |
InMemoryElement(InMemoryGraph graph,
String id,
InMemoryTableElement<TElement> inMemoryTableElement,
FetchHints fetchHints,
Long endTime,
Authorizations authorizations) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyValue(String key,
String name,
Value value,
Metadata metadata,
Visibility visibility,
Long timestamp,
boolean indexAfterAdd,
Authorizations authorizations) |
boolean |
canRead(Authorizations authorizations) |
void |
deleteProperty(String key,
String name,
Visibility visibility,
Authorizations authorizations)
Permanently deletes a property given it's key and name from the element.
|
protected void |
extendedData(ExtendedDataMutation extendedData,
Authorizations authorizations) |
Authorizations |
getAuthorizations()
Gets the authorizations used to get this element.
|
Long |
getEndTime() |
QueryableIterable<ExtendedDataRow> |
getExtendedData(String tableName,
FetchHints fetchHints)
Gets all the rows from an extended data table.
|
com.google.common.collect.ImmutableSet<String> |
getExtendedDataTableNames()
Gets the extended data table names.
|
FetchHints |
getFetchHints()
Fetch hints used when fetching this element.
|
InMemoryGraph |
getGraph()
Gets the graph that this element belongs to.
|
Iterable<Visibility> |
getHiddenVisibilities()
Gets the list of hidden visibilities
|
Iterable<HistoricalPropertyValue> |
getHistoricalPropertyValues(String key,
String name,
Visibility visibility,
Long startTime,
Long endTime,
Authorizations authorizations)
Gets property values from the given range of timestamps in descending timestamp order.
|
String |
getId()
get the id of the element
|
protected InMemoryTableElement<TElement> |
getInMemoryTableElement() |
Iterable<Property> |
getProperties()
an Iterable of all the properties on this element that you have access to based on the authorizations
used to retrieve the element.
|
Value |
getPropertyValue(String name)
Convenience method to retrieve the first value of the property with the given name.
|
Value |
getPropertyValue(String key,
String name)
Convenience method to retrieve the first value of the property with the given name.
|
long |
getTimestamp()
The timestamp of when this element was updated.
|
Visibility |
getVisibility()
the visibility of the element.
|
boolean |
isHidden(Authorizations authorizations)
Given the supplied authorizations is this element hidden?
|
void |
markPropertyHidden(Property property,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as hidden for a given visibility.
|
void |
markPropertyVisible(Property property,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as visible for a given visibility, effectively undoing markPropertyHidden.
|
void |
markPropertyVisible(String key,
String name,
Visibility propertyVisibility,
Long timestamp,
Visibility visibility,
Authorizations authorizations)
Marks a property as visible for a given visibility, effectively undoing markPropertyHidden.
|
abstract <T extends Element> |
prepareMutation()
Prepares a mutation to allow changing multiple property values at the same time.
|
protected <T extends Element> |
saveExistingElementMutation(ExistingElementMutationImpl<T> mutation,
IndexHint indexHint,
Authorizations authorizations) |
protected void |
setInMemoryTableElement(InMemoryTableElement<TElement> inMemoryTableElement) |
protected void |
softDeleteProperty(String key,
String name,
Long timestamp,
Visibility visibility,
IndexHint indexHint,
Authorizations authorizations) |
void |
softDeleteProperty(String key,
String name,
Visibility visibility,
Authorizations authorizations)
Soft deletes a property given it's key and name from the element for a given visibility.
|
protected void |
updatePropertiesInternal(Iterable<Property> properties,
Iterable<PropertyDeleteMutation> propertyDeleteMutations,
Iterable<PropertySoftDeleteMutation> propertySoftDeleteMutations,
Iterable<ExtendedDataMutation> extendedDatas,
Iterable<ExtendedDataDeleteMutation> extendedDataDeletes,
IndexHint indexHint) |
equals, getEdgeLabelProperty, getElementIdProperty, getElementTypeProperty, getIdProperty, getInOrOutVertexIdProperty, getInVertexIdProperty, getOutVertexIdProperty, getProperties, getProperties, getProperty, getProperty, getReservedProperty, getRowIdProperty, getTableNameProperty, hashCode, internalGetProperties, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddPropertyValue, addPropertyValue, compareTo, deleteProperties, deleteProperty, deleteProperty, getExtendedData, getExtendedData, getExtendedData, getHistoricalPropertyValues, getHistoricalPropertyValues, getHistoricalPropertyValues, markPropertyHidden, markPropertyHidden, markPropertyHidden, markPropertyVisible, markPropertyVisible, setProperty, setProperty, softDeleteProperties, softDeletePropertygetProperty, getProperty, getPropertyValue, getPropertyValue, getPropertyValues, getPropertyValuesedge, vertexcreate, edge, getElementType, vertexprotected InMemoryElement(InMemoryGraph graph, String id, InMemoryTableElement<TElement> inMemoryTableElement, FetchHints fetchHints, Long endTime, Authorizations authorizations)
public String getId()
ElementIdpublic Visibility getVisibility()
Elementpublic long getTimestamp()
Elementpublic Long getEndTime()
public void deleteProperty(String key, String name, Visibility visibility, Authorizations authorizations)
Elementkey - The property key.name - The property name.visibility - The property visibility.public void softDeleteProperty(String key, String name, Visibility visibility, Authorizations authorizations)
Elementkey - The property key.name - The property name.visibility - The visibility string of the property to soft delete.protected void softDeleteProperty(String key, String name, Long timestamp, Visibility visibility, IndexHint indexHint, Authorizations authorizations)
protected void extendedData(ExtendedDataMutation extendedData, Authorizations authorizations)
public void markPropertyHidden(Property property, Long timestamp, Visibility visibility, Authorizations authorizations)
Elementproperty - The property.timestamp - The timestamp.visibility - The visibility string under which this property is hidden.
This visibility can be a superset of the property visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.public void markPropertyVisible(Property property, Long timestamp, Visibility visibility, Authorizations authorizations)
Elementproperty - The property.timestamp - The timestamp.visibility - The visibility string under which this property is now visible.authorizations - The authorizations used.public Value getPropertyValue(String name)
GeObjectname - The name of the property to retrievepublic Value getPropertyValue(String key, String name)
GeObjectkey - The key of the propertyname - The name of the property to retrievepublic void addPropertyValue(String key, String name, Value value, Metadata metadata, Visibility visibility, Long timestamp, boolean indexAfterAdd, Authorizations authorizations)
public void markPropertyVisible(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations)
Elementkey - The key of the property.name - The name of the property.propertyVisibility - The visibility of the property.timestamp - The timestamp.visibility - The visibility string under which this property is now visible.authorizations - The authorizations used.public boolean isHidden(Authorizations authorizations)
Elementauthorizations - the authorizations to check against.public Iterable<Property> getProperties()
GeObjectpublic Iterable<HistoricalPropertyValue> getHistoricalPropertyValues(String key, String name, Visibility visibility, Long startTime, Long endTime, Authorizations authorizations)
Elementkey - the key of the property.name - the name of the property.visibility - The visibility of the property to get.public abstract <T extends Element> ExistingElementMutation<T> prepareMutation()
Elementpublic Authorizations getAuthorizations()
Elementpublic InMemoryGraph getGraph()
Elementprotected void updatePropertiesInternal(Iterable<Property> properties, Iterable<PropertyDeleteMutation> propertyDeleteMutations, Iterable<PropertySoftDeleteMutation> propertySoftDeleteMutations, Iterable<ExtendedDataMutation> extendedDatas, Iterable<ExtendedDataDeleteMutation> extendedDataDeletes, IndexHint indexHint)
protected <T extends Element> void saveExistingElementMutation(ExistingElementMutationImpl<T> mutation, IndexHint indexHint, Authorizations authorizations)
public boolean canRead(Authorizations authorizations)
public Iterable<Visibility> getHiddenVisibilities()
Elementpublic FetchHints getFetchHints()
Elementprotected InMemoryTableElement<TElement> getInMemoryTableElement()
protected void setInMemoryTableElement(InMemoryTableElement<TElement> inMemoryTableElement)
public com.google.common.collect.ImmutableSet<String> getExtendedDataTableNames()
Elementpublic QueryableIterable<ExtendedDataRow> getExtendedData(String tableName, FetchHints fetchHints)
ElementtableName - The name of the table to get rows from.Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.