All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.mutation.AlterPropertyVisibility Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.mutation;

import org.vertexium.Visibility;
import org.vertexium.util.IncreasingTime;

public class AlterPropertyVisibility {
    private final String key;
    private final String name;
    private final long timestamp;
    private Visibility existingVisibility;
    private final Visibility visibility;
    private final Object data;

    public AlterPropertyVisibility(String key, String name, Visibility existingVisibility, Visibility visibility, Object data) {
        this.key = key;
        this.name = name;
        this.existingVisibility = existingVisibility;
        this.visibility = visibility;
        this.data = data;
        this.timestamp = IncreasingTime.currentTimeMillis();

        // org.vertexium.inmemory.InMemoryGraph.alterElementPropertyVisibilities() requires an additional timestamp
        // to store the soft delete then the alter, this call will increment the counter
        IncreasingTime.advanceTime(1);
    }

    public String getKey() {
        return key;
    }

    public String getName() {
        return name;
    }

    public Visibility getExistingVisibility() {
        return existingVisibility;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setExistingVisibility(Visibility existingVisibility) {
        this.existingVisibility = existingVisibility;
    }

    public Visibility getVisibility() {
        return visibility;
    }

    public Object getData() {
        return data;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy