public abstract class ElementBuilder<T extends Element> extends Object implements ElementMutation<T>
DEFAULT_KEY| Modifier | Constructor and Description |
|---|---|
protected |
ElementBuilder(String elementId) |
| Modifier and Type | Method and Description |
|---|---|
ElementMutation<T> |
addExtendedData(String tableName,
String row,
String column,
Object value,
Long timestamp,
Visibility visibility)
Adds an extended data cell to the element.
|
ElementBuilder<T> |
addExtendedData(String tableName,
String row,
String column,
Object value,
Visibility visibility)
Adds an extended data cell to the element.
|
ElementBuilder<T> |
addExtendedData(String tableName,
String row,
String column,
String key,
Object value,
Long timestamp,
Visibility visibility)
Adds an extended data cell to the element.
|
ElementBuilder<T> |
addExtendedData(String tableName,
String row,
String column,
String key,
Object value,
Visibility visibility)
Adds an extended data cell to the element.
|
ElementBuilder<T> |
addPropertyValue(String key,
String name,
Object value,
Metadata metadata,
Long timestamp,
Visibility visibility)
Adds or updates a property.
|
ElementBuilder<T> |
addPropertyValue(String key,
String name,
Object value,
Metadata metadata,
Visibility visibility)
Adds or updates a property.
|
ElementBuilder<T> |
addPropertyValue(String key,
String name,
Object value,
Visibility visibility)
Adds or updates a property.
|
ElementBuilder<T> |
deleteExtendedData(String tableName,
String row,
String column,
String key,
Visibility visibility)
Deletes an extended data cell from an element.
|
ElementBuilder<T> |
deleteExtendedData(String tableName,
String row,
String column,
Visibility visibility)
Deletes an extended data cell from an element.
|
ElementBuilder<T> |
deleteProperty(Property property)
Deletes a property.
|
ElementBuilder<T> |
deleteProperty(String key,
String name,
Visibility visibility)
Deletes a property.
|
ElementBuilder<T> |
deleteProperty(String name,
Visibility visibility)
Deletes the default property with that name.
|
String |
getElementId() |
Iterable<ExtendedDataMutation> |
getExtendedData()
Gets the extended data mutations.
|
Iterable<ExtendedDataDeleteMutation> |
getExtendedDataDeletes()
Gets the extended data columns currently being deleted in this mutation
|
com.google.common.collect.ImmutableSet<String> |
getExtendedDataTableNames() |
IndexHint |
getIndexHint()
Gets the currently set index hint.
|
Iterable<Property> |
getProperties()
Gets the properties currently in this mutation.
|
Iterable<PropertyDeleteMutation> |
getPropertyDeletes()
Gets the properties currently being deleted in this mutation.
|
Iterable<PropertySoftDeleteMutation> |
getPropertySoftDeletes()
Gets the properties currently being soft deleted in this mutation.
|
boolean |
hasChanges()
true, if this mutation has any changes.
|
abstract T |
save(Authorizations authorizations)
saves the element to the graph.
|
ElementMutation<T> |
setIndexHint(IndexHint indexHint)
Sets the index hint of this element.
|
ElementBuilder<T> |
setProperty(String name,
Object value,
Metadata metadata,
Visibility visibility)
Sets or updates a property value.
|
ElementBuilder<T> |
setProperty(String name,
Object value,
Visibility visibility)
Sets or updates a property value.
|
ElementBuilder<T> |
softDeleteProperty(Property property)
Soft deletes a property.
|
ElementBuilder<T> |
softDeleteProperty(String key,
String name,
Visibility visibility)
Soft deletes a property.
|
ElementBuilder<T> |
softDeleteProperty(String name,
Visibility visibility)
Soft deletes the default property with that name.
|
protected ElementBuilder(String elementId)
public String getElementId()
public ElementBuilder<T> setProperty(String name, Object value, Visibility visibility)
The added property will also be indexed in the configured search provider. The type of the value will determine how it gets indexed.
setProperty in interface ElementMutation<T extends Element>name - The name of the property.value - The value of the property.visibility - The visibility to give this property.public ElementBuilder<T> setProperty(String name, Object value, Metadata metadata, Visibility visibility)
The added property will also be indexed in the configured search provider. The type of the value will determine how it gets indexed.
setProperty in interface ElementMutation<T extends Element>name - The name of the property.value - The value of the property.metadata - The metadata to assign to this property.visibility - The visibility to give this property.public ElementBuilder<T> addPropertyValue(String key, String name, Object value, Visibility visibility)
The added property will also be indexed in the configured search provider. The type of the value will determine how it gets indexed.
addPropertyValue in interface ElementMutation<T extends Element>key - The unique key given to the property allowing for multi-valued properties.name - The name of the property.value - The value of the property.visibility - The visibility to give this property.public ElementBuilder<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility)
The added property will also be indexed in the configured search provider. The type of the value will determine how it gets indexed.
addPropertyValue in interface ElementMutation<T extends Element>key - The unique key given to the property allowing for multi-valued properties.name - The name of the property.value - The value of the property.metadata - The metadata to assign to this property.visibility - The visibility to give this property.public ElementBuilder<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Long timestamp, Visibility visibility)
ElementMutationaddPropertyValue in interface ElementMutation<T extends Element>key - The unique key given to the property allowing for multi-valued properties.name - The name of the property.value - The value of the property.metadata - The metadata to assign to this property.timestamp - The timestamp of the property.visibility - The visibility to give this property.public ElementBuilder<T> deleteProperty(Property property)
ElementMutationdeleteProperty in interface ElementMutation<T extends Element>property - the property to delete.public ElementBuilder<T> deleteProperty(String name, Visibility visibility)
ElementMutationdeleteProperty in interface ElementMutation<T extends Element>name - the property name to delete.visibility - the visibility of the property to delete.public ElementBuilder<T> deleteProperty(String key, String name, Visibility visibility)
ElementMutationdeleteProperty in interface ElementMutation<T extends Element>key - the key of the property to delete.name - the name of the property to delete.visibility - the visibility of the property to delete.public ElementBuilder<T> softDeleteProperty(Property property)
ElementMutationsoftDeleteProperty in interface ElementMutation<T extends Element>property - the property to soft delete.public ElementBuilder<T> softDeleteProperty(String name, Visibility visibility)
ElementMutationsoftDeleteProperty in interface ElementMutation<T extends Element>name - the property name to soft delete.visibility - the visibility of the property to soft delete.public ElementBuilder<T> softDeleteProperty(String key, String name, Visibility visibility)
ElementMutationsoftDeleteProperty in interface ElementMutation<T extends Element>key - the key of the property to soft delete.name - the name of the property to soft delete.visibility - the visibility of the property to soft delete.public ElementBuilder<T> addExtendedData(String tableName, String row, String column, Object value, Visibility visibility)
ElementMutationaddExtendedData in interface ElementMutation<T extends Element>tableName - The extended data table to add the cell to.row - The row to add the cell to.column - The column name.value - The cell value.visibility - The visibility of the value.public ElementMutation<T> addExtendedData(String tableName, String row, String column, Object value, Long timestamp, Visibility visibility)
ElementMutationaddExtendedData in interface ElementMutation<T extends Element>tableName - The extended data table to add the cell to.row - The row to add the cell to.column - The column name.value - The cell value.timestamp - The timestamp of the value. null, to automatically generate one.visibility - The visibility of the value.public ElementBuilder<T> addExtendedData(String tableName, String row, String column, String key, Object value, Visibility visibility)
ElementMutationaddExtendedData in interface ElementMutation<T extends Element>tableName - The extended data table to add the cell to.row - The row to add the cell to.column - The column name.key - The column multi-value key.value - The cell value.visibility - The visibility of the value.public ElementBuilder<T> addExtendedData(String tableName, String row, String column, String key, Object value, Long timestamp, Visibility visibility)
ElementMutationaddExtendedData in interface ElementMutation<T extends Element>tableName - The extended data table to add the cell to.row - The row to add the cell to.column - The column name.key - The column multi-value key.value - The cell value.timestamp - The timestamp of the value. null, to automatically generate one.visibility - The visibility of the value.public ElementBuilder<T> deleteExtendedData(String tableName, String row, String column, Visibility visibility)
ElementMutationdeleteExtendedData in interface ElementMutation<T extends Element>tableName - The extended data table to add the cell to.row - The row to add the cell to.column - The column name.visibility - The visibility of the value.public ElementBuilder<T> deleteExtendedData(String tableName, String row, String column, String key, Visibility visibility)
ElementMutationdeleteExtendedData in interface ElementMutation<T extends Element>tableName - The extended data table to add the cell to.row - The row to add the cell to.column - The column name.key - The column multi-value key.visibility - The visibility of the value.public abstract T save(Authorizations authorizations)
save in interface ElementMutation<T extends Element>public Iterable<Property> getProperties()
ElementMutationgetProperties in interface ElementMutation<T extends Element>public Iterable<PropertyDeleteMutation> getPropertyDeletes()
ElementMutationgetPropertyDeletes in interface ElementMutation<T extends Element>public Iterable<PropertySoftDeleteMutation> getPropertySoftDeletes()
ElementMutationgetPropertySoftDeletes in interface ElementMutation<T extends Element>public Iterable<ExtendedDataMutation> getExtendedData()
ElementMutationgetExtendedData in interface ElementMutation<T extends Element>public Iterable<ExtendedDataDeleteMutation> getExtendedDataDeletes()
ElementMutationgetExtendedDataDeletes in interface ElementMutation<T extends Element>public IndexHint getIndexHint()
ElementMutationgetIndexHint in interface ElementMutation<T extends Element>public com.google.common.collect.ImmutableSet<String> getExtendedDataTableNames()
public ElementMutation<T> setIndexHint(IndexHint indexHint)
ElementMutationsetIndexHint in interface ElementMutation<T extends Element>public boolean hasChanges()
ElementMutationhasChanges in interface ElementMutation<T extends Element>Copyright © 2014–2018. All rights reserved.