protected void deleteProperty( InMemoryElement element, InMemoryTableElement inMemoryTableElement, String key, String name, Visibility visibility, Authorizations authorizations ) { Property property = inMemoryTableElement.getProperty(key, name, visibility, FetchHints.ALL_INCLUDING_HIDDEN, authorizations); inMemoryTableElement.deleteProperty(key, name, visibility, authorizations); getSearchIndex().deleteProperty(this, element, PropertyDescriptor.fromProperty(property), authorizations); if (hasEventListeners()) { fireGraphEvent(new DeletePropertyEvent(this, element, property)); } }
protected void softDeleteProperty(InMemoryTableElement inMemoryTableElement, Property property, Long timestamp, IndexHint indexHint, Authorizations authorizations) { Element element; if (inMemoryTableElement instanceof InMemoryTableVertex) { inMemoryTableElement.appendSoftDeletePropertyMutation(property.getKey(), property.getName(), property.getVisibility(), timestamp); element = getVertex(inMemoryTableElement.getId(), FetchHints.ALL_INCLUDING_HIDDEN, authorizations); } else if (inMemoryTableElement instanceof InMemoryTableEdge) { inMemoryTableElement.appendSoftDeletePropertyMutation(property.getKey(), property.getName(), property.getVisibility(), timestamp); element = getEdge(inMemoryTableElement.getId(), FetchHints.ALL_INCLUDING_HIDDEN, authorizations); } else { throw new IllegalArgumentException("Unexpected element type: " + inMemoryTableElement.getClass().getName()); } if (indexHint != IndexHint.DO_NOT_INDEX) { getSearchIndex().deleteProperty(this, element, PropertyDescriptor.fromProperty(property), authorizations); } if (hasEventListeners()) { fireGraphEvent(new SoftDeletePropertyEvent(this, element, property)); } }
void softDeleteProperty(AccumuloElement element, Property property, Authorizations authorizations) { Mutation m = new Mutation(element.getId()); elementMutationBuilder.addPropertySoftDeleteToMutation(m, property); addMutations(element, m); getSearchIndex().deleteProperty( this, element, PropertyDescriptor.fromProperty(property), authorizations ); if (hasEventListeners()) { queueEvent(new SoftDeletePropertyEvent(this, element, property)); } }
void softDeleteProperty(AccumuloElement element, Property property, Authorizations authorizations) { Mutation m = new Mutation(element.getId()); elementMutationBuilder.addPropertySoftDeleteToMutation(m, property); addMutations(element, m); getSearchIndex().deleteProperty( this, element, PropertyDescriptor.fromProperty(property), authorizations ); if (hasEventListeners()) { queueEvent(new SoftDeletePropertyEvent(this, element, property)); } }
void deleteProperty(AccumuloElement element, Property property, Authorizations authorizations) { if (!element.getFetchHints().isIncludePropertyAndMetadata(property.getName())) { throw new VertexiumMissingFetchHintException(element.getFetchHints(), "Property " + property.getName() + " needs to be included with metadata"); } Mutation m = new Mutation(element.getId()); elementMutationBuilder.addPropertyDeleteToMutation(m, property); addMutations(element, m); getSearchIndex().deleteProperty( this, element, PropertyDescriptor.fromProperty(property), authorizations ); if (hasEventListeners()) { queueEvent(new DeletePropertyEvent(this, element, property)); } }
void deleteProperty(AccumuloElement element, Property property, Authorizations authorizations) { if (!element.getFetchHints().isIncludePropertyAndMetadata(property.getName())) { throw new VertexiumMissingFetchHintException(element.getFetchHints(), "Property " + property.getName() + " needs to be included with metadata"); } Mutation m = new Mutation(element.getId()); elementMutationBuilder.addPropertyDeleteToMutation(m, property); addMutations(element, m); getSearchIndex().deleteProperty( this, element, PropertyDescriptor.fromProperty(property), authorizations ); if (hasEventListeners()) { queueEvent(new DeletePropertyEvent(this, element, property)); } }