Search in sources :

Example 1 with ExistingElementMutationImpl

use of org.vertexium.mutation.ExistingElementMutationImpl in project vertexium by visallo.

the class InMemoryVertex method prepareMutation.

@Override
@SuppressWarnings("unchecked")
public ExistingElementMutation<Vertex> prepareMutation() {
    return new ExistingElementMutationImpl<Vertex>(this) {

        @Override
        public Vertex save(Authorizations authorizations) {
            IndexHint indexHint = getIndexHint();
            Visibility oldElementVisibility = InMemoryVertex.this.getVisibility();
            saveExistingElementMutation(this, indexHint, authorizations);
            Vertex vertex = getElement();
            if (indexHint != IndexHint.DO_NOT_INDEX) {
                saveMutationToSearchIndex(vertex, oldElementVisibility, getNewElementVisibility(), getAlterPropertyVisibilities(), getExtendedData(), authorizations);
            }
            return vertex;
        }
    };
}
Also used : IndexHint(org.vertexium.search.IndexHint) ExistingElementMutationImpl(org.vertexium.mutation.ExistingElementMutationImpl)

Aggregations

ExistingElementMutationImpl (org.vertexium.mutation.ExistingElementMutationImpl)1 IndexHint (org.vertexium.search.IndexHint)1