@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 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 int hashCode() { int result = getKey() != null ? getKey().hashCode() : 0; result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getVisibility() != null ? getVisibility().hashCode() : 0); return result; }
@Override public int hashCode() { int result = getKey() != null ? getKey().hashCode() : 0; result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getVisibility() != null ? getVisibility().hashCode() : 0); return result; }
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 boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof PropertyDeleteMutation)) { return false; } PropertyDeleteMutation that = (PropertyDeleteMutation) 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 PropertyDeleteMutation)) { return false; } PropertyDeleteMutation that = (PropertyDeleteMutation) 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; }
public static PropertyDescriptor fromPropertyDeleteMutation(PropertyDeleteMutation 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; }
public static PropertyDescriptor fromPropertyDeleteMutation(PropertyDeleteMutation 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; }
if (getVisibility() != null && that.getVisibility() == null) { return -1; if (getVisibility() == null && that.getVisibility() != null) { return 1; if (getVisibility() != null) { int result = getVisibility().compareTo(that.getVisibility()); if (result != 0) { return result;
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; }
public void addPropertyDeleteToMutation(Mutation m, PropertyDeleteMutation propertyDelete) { Text columnQualifier = KeyHelper.getColumnQualifierFromPropertyColumnQualifier(propertyDelete.getKey(), propertyDelete.getName(), getNameSubstitutionStrategy()); ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(propertyDelete.getVisibility()); m.putDelete(AccumuloElement.CF_PROPERTY, columnQualifier, columnVisibility, currentTimeMillis()); addPropertyDeleteMetadataToMutation(m, propertyDelete); }
propertyDeleteMutation.getKey(), propertyDeleteMutation.getName(), propertyDeleteMutation.getVisibility() ); this.propertyDeleteMutations.add(propertyDeleteMutation);
public void addPropertyDeleteToMutation(Mutation m, PropertyDeleteMutation propertyDelete) { Text columnQualifier = KeyHelper.getColumnQualifierFromPropertyColumnQualifier(propertyDelete.getKey(), propertyDelete.getName(), getNameSubstitutionStrategy()); ColumnVisibility columnVisibility = visibilityToAccumuloVisibility(propertyDelete.getVisibility()); m.putDelete(AccumuloElement.CF_PROPERTY, columnQualifier, columnVisibility, currentTimeMillis()); addPropertyDeleteMetadataToMutation(m, propertyDelete); }
propertyDeleteMutation.getKey(), propertyDeleteMutation.getName(), propertyDeleteMutation.getVisibility() ); this.propertyDeleteMutations.add(propertyDeleteMutation);
deleteProperty(propertyDeleteMutation.getKey(), propertyDeleteMutation.getName(), propertyDeleteMutation.getVisibility(), authorizations);