@Override public String toString() { return this.getClass().getSimpleName() + "{" + "key='" + getKey() + '\'' + ", name='" + getName() + '\'' + ", visibility=" + getVisibility() + '}'; } }
@Override public String toString() { return this.getClass().getSimpleName() + "{" + "key='" + getKey() + '\'' + ", name='" + getName() + '\'' + ", visibility=" + getVisibility() + '}'; } }
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 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 equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof PropertySoftDeleteMutation)) { return false; } PropertySoftDeleteMutation that = (PropertySoftDeleteMutation) o; if (getKey() != null ? !getKey().equals(that.getKey()) : that.getKey() != null) { return false; } if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) { return false; } if (getVisibility() != null ? !getVisibility().equals(that.getVisibility()) : that.getVisibility() != null) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof PropertySoftDeleteMutation)) { return false; } PropertySoftDeleteMutation that = (PropertySoftDeleteMutation) o; if (getKey() != null ? !getKey().equals(that.getKey()) : that.getKey() != null) { return false; } if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) { return false; } if (getVisibility() != null ? !getVisibility().equals(that.getVisibility()) : that.getVisibility() != null) { return false; } return true; }
private <TElement extends Element> List<String> getFieldsToRemove(Graph graph, ExistingElementMutation<TElement> mutation) { List<String> fieldsToRemove = new ArrayList<>(); mutation.getPropertyDeletes().forEach(p -> { String propertyName = addVisibilityToPropertyName(graph, p.getName(), p.getVisibility()); fieldsToRemove.add(propertyName); PropertyDefinition propertyDefinition = getPropertyDefinition(graph, p.getName()); if (GeoShape.class.isAssignableFrom(propertyDefinition.getDataType())) { fieldsToRemove.add(propertyName + GEO_PROPERTY_NAME_SUFFIX); if (GeoPoint.class.isAssignableFrom(propertyDefinition.getDataType())) { fieldsToRemove.add(propertyName + GEO_POINT_PROPERTY_NAME_SUFFIX); } } }); mutation.getPropertySoftDeletes().forEach(p -> fieldsToRemove.add(addVisibilityToPropertyName(graph, p.getName(), p.getVisibility()))); return fieldsToRemove; }
public static PropertyDescriptor fromPropertySoftDeleteMutation(PropertySoftDeleteMutation p) { return new PropertyDescriptor(p.getKey(), p.getName(), p.getVisibility()); }
public static PropertyDescriptor fromPropertySoftDeleteMutation(PropertySoftDeleteMutation p) { return new PropertyDescriptor(p.getKey(), p.getName(), p.getVisibility()); }
private <TElement extends Element> List<String> getFieldsToRemove(Graph graph, ExistingElementMutation<TElement> mutation) { List<String> fieldsToRemove = new ArrayList<>(); mutation.getPropertyDeletes().forEach(p -> { String propertyName = addVisibilityToPropertyName(graph, p.getName(), p.getVisibility()); fieldsToRemove.add(propertyName); PropertyDefinition propertyDefinition = getPropertyDefinition(graph, p.getName()); if (GeoShape.class.isAssignableFrom(propertyDefinition.getDataType())) { fieldsToRemove.add(propertyName + GEO_PROPERTY_NAME_SUFFIX); if (GeoPoint.class.isAssignableFrom(propertyDefinition.getDataType())) { fieldsToRemove.add(propertyName + GEO_POINT_PROPERTY_NAME_SUFFIX); } } }); mutation.getPropertySoftDeletes().forEach(p -> fieldsToRemove.add(addVisibilityToPropertyName(graph, p.getName(), p.getVisibility()))); return fieldsToRemove; }
private <TElement extends Element> Map<String, Object> getFieldsToSet(Graph graph, ExistingElementMutation<TElement> mutation) { TElement element = mutation.getElement(); Map<String, Object> fieldsToSet = new HashMap<>(); mutation.getProperties().forEach(p -> addExistingValuesToFieldMap(graph, element, p.getName(), p.getVisibility(), fieldsToSet)); mutation.getPropertyDeletes().forEach(p -> addExistingValuesToFieldMap(graph, element, p.getName(), p.getVisibility(), fieldsToSet)); mutation.getPropertySoftDeletes().forEach(p -> addExistingValuesToFieldMap(graph, element, p.getName(), p.getVisibility(), fieldsToSet)); return fieldsToSet; }
private <TElement extends Element> Map<String, Object> getFieldsToSet(Graph graph, ExistingElementMutation<TElement> mutation) { TElement element = mutation.getElement(); Map<String, Object> fieldsToSet = new HashMap<>(); mutation.getProperties().forEach(p -> addExistingValuesToFieldMap(graph, element, p.getName(), p.getVisibility(), fieldsToSet)); mutation.getPropertyDeletes().forEach(p -> addExistingValuesToFieldMap(graph, element, p.getName(), p.getVisibility(), fieldsToSet)); mutation.getPropertySoftDeletes().forEach(p -> addExistingValuesToFieldMap(graph, element, p.getName(), p.getVisibility(), fieldsToSet)); return fieldsToSet; }
private void addPropertySoftDeleteToKeyValuePairs(List<KeyValuePair> results, Text elementRowKey, PropertySoftDeleteMutation propertySoftDeleteMutation) { Text columnQualifier = KeyHelper.getColumnQualifierFromPropertyColumnQualifier(propertySoftDeleteMutation.getKey(), propertySoftDeleteMutation.getName(), getNameSubstitutionStrategy()); ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(propertySoftDeleteMutation.getVisibility()); results.add(new KeyValuePair(new Key(elementRowKey, AccumuloElement.CF_PROPERTY_SOFT_DELETE, columnQualifier, columnVisibility, propertySoftDeleteMutation.getTimestamp()), AccumuloElement.SOFT_DELETE_VALUE)); }
private void addPropertySoftDeleteToKeyValuePairs(List<KeyValuePair> results, Text elementRowKey, PropertySoftDeleteMutation propertySoftDeleteMutation) { Text columnQualifier = KeyHelper.getColumnQualifierFromPropertyColumnQualifier(propertySoftDeleteMutation.getKey(), propertySoftDeleteMutation.getName(), getNameSubstitutionStrategy()); ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(propertySoftDeleteMutation.getVisibility()); results.add(new KeyValuePair(new Key(elementRowKey, AccumuloElement.CF_PROPERTY_SOFT_DELETE, columnQualifier, columnVisibility, propertySoftDeleteMutation.getTimestamp()), AccumuloElement.SOFT_DELETE_VALUE)); }
public void addPropertySoftDeleteToMutation(Mutation m, PropertySoftDeleteMutation propertySoftDelete) { Text columnQualifier = KeyHelper.getColumnQualifierFromPropertyColumnQualifier(propertySoftDelete.getKey(), propertySoftDelete.getName(), getNameSubstitutionStrategy()); ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(propertySoftDelete.getVisibility()); m.put(AccumuloElement.CF_PROPERTY_SOFT_DELETE, columnQualifier, columnVisibility, propertySoftDelete.getTimestamp(), AccumuloElement.SOFT_DELETE_VALUE); }
public void addPropertySoftDeleteToMutation(Mutation m, PropertySoftDeleteMutation propertySoftDelete) { Text columnQualifier = KeyHelper.getColumnQualifierFromPropertyColumnQualifier(propertySoftDelete.getKey(), propertySoftDelete.getName(), getNameSubstitutionStrategy()); ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(propertySoftDelete.getVisibility()); m.put(AccumuloElement.CF_PROPERTY_SOFT_DELETE, columnQualifier, columnVisibility, propertySoftDelete.getTimestamp(), AccumuloElement.SOFT_DELETE_VALUE); }
removePropertyInternal( propertySoftDeleteMutation.getKey(), propertySoftDeleteMutation.getName(), propertySoftDeleteMutation.getVisibility() );
softDeleteProperty(propertySoftDeleteMutation.getKey(), propertySoftDeleteMutation.getName(), propertySoftDeleteMutation.getTimestamp(), propertySoftDeleteMutation.getVisibility(), indexHint, authorizations);