public ElementUpdateContext(VisibilityTranslator visibilityTranslator, ElementMutation<T> mutation, User user) { this.visibilityTranslator = visibilityTranslator; this.mutation = mutation; this.user = user; if (mutation instanceof ExistingElementMutation) { element = ((ExistingElementMutation<T>) mutation).getElement(); } else { element = null; } }
public SoftDeletePropertyEvent(Graph graph, Element element, PropertySoftDeleteMutation propertySoftDeleteMutation) { super(graph); this.element = element; this.key = propertySoftDeleteMutation.getKey(); this.name = propertySoftDeleteMutation.getName(); this.visibility = propertySoftDeleteMutation.getVisibility(); }
@Override public boolean hasChanges() { if (newEdgeLabel != null) { return true; } return super.hasChanges(); } }
/** * Adds or updates a property. * * @param key The unique key given to the property allowing for multi-valued properties. * @param name The name of the property. * @param value The value of the property. * @param visibility The visibility to give this property. */ default void addPropertyValue(String key, String name, Object value, Visibility visibility, Authorizations authorizations) { prepareMutation().addPropertyValue(key, name, value, visibility).save(authorizations); }
public DeletePropertyEvent(Graph graph, Element element, PropertyDeleteMutation propertyDeleteMutation) { super(graph); this.element = element; this.key = propertyDeleteMutation.getKey(); this.name = propertyDeleteMutation.getName(); this.visibility = propertyDeleteMutation.getVisibility(); }
/** * Sets or updates a property value. The property key will be set to a constant. This is a convenience method * which allows treating the multi-valued nature of properties as only containing a single value. Care must be * taken when using this method because properties are not only uniquely identified by just key and name but also * visibility so adding properties with the same name and different visibility strings is still permitted. * * @param name The name of the property. * @param value The value of the property. * @param visibility The visibility to give this property. */ default void setProperty(String name, Object value, Visibility visibility, Authorizations authorizations) { prepareMutation().setProperty(name, value, visibility).save(authorizations); }
@Override public ExistingElementMutation<T> addExtendedData(String tableName, String row, String column, Object value, Visibility visibility) { return addExtendedData(tableName, row, column, null, value, null, visibility); }
@Override public ExistingElementMutation<T> alterPropertyVisibility(String name, Visibility visibility) { return alterPropertyVisibility(DEFAULT_KEY, name, visibility); }
@Override public ExistingElementMutation<T> deleteExtendedData(String tableName, String row, String column, Visibility visibility) { return deleteExtendedData(tableName, row, column, null, visibility); }
@Override public ExistingElementMutation<T> setPropertyMetadata(String propertyName, String metadataName, Object newValue, Visibility visibility) { return setPropertyMetadata(DEFAULT_KEY, propertyName, metadataName, newValue, visibility); }
public ElementMutation<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility) { return addPropertyValue(key, name, value, metadata, null, visibility); }
/** * Adds or updates a property. * * @param key The unique key given to the property allowing for multi-valued properties. * @param name The name of the property. * @param value The value of the property. * @param metadata The metadata to assign to this property. * @param visibility The visibility to give this property. */ default void addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility, Authorizations authorizations) { prepareMutation().addPropertyValue(key, name, value, metadata, visibility).save(authorizations); }
public SoftDeletePropertyEvent(Graph graph, Element element, PropertySoftDeleteMutation propertySoftDeleteMutation) { super(graph); this.element = element; this.key = propertySoftDeleteMutation.getKey(); this.name = propertySoftDeleteMutation.getName(); this.visibility = propertySoftDeleteMutation.getVisibility(); }
public DeletePropertyEvent(Graph graph, Element element, PropertyDeleteMutation propertyDeleteMutation) { super(graph); this.element = element; this.key = propertyDeleteMutation.getKey(); this.name = propertyDeleteMutation.getName(); this.visibility = propertyDeleteMutation.getVisibility(); }
@Override public ExistingElementMutation<T> addExtendedData(String tableName, String row, String column, Object value, Long timestamp, Visibility visibility) { return addExtendedData(tableName, row, column, null, value, timestamp, visibility); }
@Override public boolean hasChanges() { if (newEdgeLabel != null) { return true; } return super.hasChanges(); } }
/** * Adds or updates a property. * * @param key The unique key given to the property allowing for multi-valued properties. * @param name The name of the property. * @param value The value of the property. * @param visibility The visibility to give this property. */ default void addPropertyValue(String key, String name, Object value, Visibility visibility, Authorizations authorizations) { prepareMutation().addPropertyValue(key, name, value, visibility).save(authorizations); }
@Override public ExistingElementMutation<T> addExtendedData(String tableName, String row, String column, String key, Object value, Visibility visibility) { return addExtendedData(tableName, row, column, key, value, null, visibility); }
/** * Adds or updates a property. * * @param key The unique key given to the property allowing for multi-valued properties. * @param name The name of the property. * @param value The value of the property. * @param metadata The metadata to assign to this property. * @param visibility The visibility to give this property. */ default void addPropertyValue(String key, String name, Object value, Metadata metadata, Visibility visibility, Authorizations authorizations) { prepareMutation().addPropertyValue(key, name, value, metadata, visibility).save(authorizations); }
@Override public ExistingElementMutation<T> addExtendedData(String tableName, String row, String column, Object value, Visibility visibility) { return addExtendedData(tableName, row, column, null, value, null, visibility); }