@Override public ElementBuilder<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Long timestamp, Visibility visibility) { if (name == null) { throw new NullPointerException("property name cannot be null for property: " + name + ":" + key); } if (value == null) { throw new NullPointerException("property value cannot be null for property: " + name + ":" + key); } this.properties.add(new MutablePropertyImpl( key, name, value, metadata, timestamp, null, visibility, FetchHints.ALL_INCLUDING_HIDDEN )); return this; }
@Override public boolean isHidden(Authorizations authorizations) { if (hiddenVisibilities != null) { for (Visibility v : getHiddenVisibilities()) { if (authorizations.canRead(v)) { return true; } } } return false; }
@Override public ElementBuilder<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Long timestamp, Visibility visibility) { if (name == null) { throw new NullPointerException("property name cannot be null for property: " + name + ":" + key); } if (value == null) { throw new NullPointerException("property value cannot be null for property: " + name + ":" + key); } this.properties.add(new MutablePropertyImpl( key, name, value, metadata, timestamp, null, visibility, FetchHints.ALL_INCLUDING_HIDDEN )); return this; }
@Override public boolean isHidden(Authorizations authorizations) { if (hiddenVisibilities != null) { for (Visibility v : getHiddenVisibilities()) { if (authorizations.canRead(v)) { return true; } } } return false; }
@Override public ElementMutation<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Long timestamp, Visibility visibility) { Preconditions.checkNotNull(name, "property name cannot be null for property: " + name + ":" + key); Preconditions.checkNotNull(value, "property value cannot be null for property: " + name + ":" + key); properties.add(new MutablePropertyImpl(key, name, value, metadata, timestamp, null, visibility, FetchHints.ALL_INCLUDING_HIDDEN)); return this; }
@Override public ElementMutation<T> addPropertyValue(String key, String name, Object value, Metadata metadata, Long timestamp, Visibility visibility) { Preconditions.checkNotNull(name, "property name cannot be null for property: " + name + ":" + key); Preconditions.checkNotNull(value, "property value cannot be null for property: " + name + ":" + key); properties.add(new MutablePropertyImpl(key, name, value, metadata, timestamp, null, visibility, FetchHints.ALL_INCLUDING_HIDDEN)); return this; }
protected Property getElementIdProperty() { if (elementIdProperty == null) { elementIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.ELEMENT_ID, getId().getElementId(), null, null, null, null, FetchHints.ALL ); } return elementIdProperty; }
protected Property getRowIdProperty() { if (rowIdProperty == null) { rowIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.ROW_ID, getId().getRowId(), null, null, null, null, FetchHints.ALL ); } return rowIdProperty; }
protected Property getTableNameProperty() { if (tableNameProperty == null) { tableNameProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.TABLE_NAME, getId().getTableName(), null, null, null, null, FetchHints.ALL ); } return tableNameProperty; }
protected Property getRowIdProperty() { if (rowIdProperty == null) { rowIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.ROW_ID, getId().getRowId(), null, null, null, null, FetchHints.ALL ); } return rowIdProperty; }
protected Property getTableNameProperty() { if (tableNameProperty == null) { tableNameProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.TABLE_NAME, getId().getTableName(), null, null, null, null, FetchHints.ALL ); } return tableNameProperty; }
protected Property getElementIdProperty() { if (elementIdProperty == null) { elementIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.ELEMENT_ID, getId().getElementId(), null, null, null, null, FetchHints.ALL ); } return elementIdProperty; }
protected Property getIdProperty() { if (idProperty == null) { idProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ID_PROPERTY_NAME, getId(), null, getTimestamp(), null, null, getFetchHints() ); } return idProperty; }
protected Property getIdProperty() { if (idProperty == null) { idProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ID_PROPERTY_NAME, getId(), null, getTimestamp(), null, null, getFetchHints() ); } return idProperty; }
protected Property getInVertexIdProperty() { if (inVertexIdProperty == null && this instanceof Edge) { String inVertexId = ((Edge) this).getVertexId(Direction.IN); inVertexIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, Edge.IN_VERTEX_ID_PROPERTY_NAME, inVertexId, null, getTimestamp(), null, null, getFetchHints() ); } return inVertexIdProperty; }
protected Property getEdgeLabelProperty() { if (edgeLabelProperty == null && this instanceof Edge) { String edgeLabel = ((Edge) this).getLabel(); edgeLabelProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, Edge.LABEL_PROPERTY_NAME, edgeLabel, null, getTimestamp(), null, null, getFetchHints() ); } return edgeLabelProperty; }
protected Property getElementTypeProperty() { if (elementTypeProperty == null) { elementTypeProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.ELEMENT_TYPE, getId().getElementType().name(), null, null, null, null, FetchHints.ALL ); } return elementTypeProperty; }
protected Property getOutVertexIdProperty() { if (outVertexIdProperty == null && this instanceof Edge) { String outVertexId = ((Edge) this).getVertexId(Direction.OUT); outVertexIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, Edge.OUT_VERTEX_ID_PROPERTY_NAME, outVertexId, null, getTimestamp(), null, null, getFetchHints() ); } return outVertexIdProperty; }
protected Property getElementTypeProperty() { if (elementTypeProperty == null) { elementTypeProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, ExtendedDataRow.ELEMENT_TYPE, getId().getElementType().name(), null, null, null, null, FetchHints.ALL ); } return elementTypeProperty; }
protected Property getOutVertexIdProperty() { if (outVertexIdProperty == null && this instanceof Edge) { String outVertexId = ((Edge) this).getVertexId(Direction.OUT); outVertexIdProperty = new MutablePropertyImpl( ElementMutation.DEFAULT_KEY, Edge.OUT_VERTEX_ID_PROPERTY_NAME, outVertexId, null, getTimestamp(), null, null, getFetchHints() ); } return outVertexIdProperty; }