Package io.hgraphdb.models
Class ElementModel
- java.lang.Object
-
- io.hgraphdb.models.BaseModel
-
- io.hgraphdb.models.ElementModel
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
EdgeModel
,VertexModel
public abstract class ElementModel extends BaseModel
-
-
Constructor Summary
Constructors Constructor Description ElementModel(HBaseGraph graph, org.apache.hadoop.hbase.client.Table table)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PropertyRemover
clearProperty(org.apache.tinkerpop.gremlin.structure.Element element, String key)
Delete the property entry from property table.protected org.apache.hadoop.hbase.client.Scan
getPropertyScan(String label)
protected org.apache.hadoop.hbase.client.Scan
getPropertyScan(String label, byte[] key, byte[] val)
protected org.apache.hadoop.hbase.client.Scan
getPropertyScan(String label, byte[] key, byte[] inclusiveFromValue, byte[] exclusiveToValue)
abstract LoadingElementReader
getReader()
PropertyIncrementer
incrementProperty(org.apache.tinkerpop.gremlin.structure.Element element, String key, long value)
Increment the given property in the property table.void
load(List<? extends org.apache.tinkerpop.gremlin.structure.Element> elements)
Load the elements from the backing table.void
load(org.apache.tinkerpop.gremlin.structure.Element element)
Load the element from the backing table.PropertyWriter
writeProperty(org.apache.tinkerpop.gremlin.structure.Element element, String key, Object value)
Write the given property to the property table.
-
-
-
Constructor Detail
-
ElementModel
public ElementModel(HBaseGraph graph, org.apache.hadoop.hbase.client.Table table)
-
-
Method Detail
-
getReader
public abstract LoadingElementReader getReader()
-
load
public void load(org.apache.tinkerpop.gremlin.structure.Element element)
Load the element from the backing table.- Parameters:
element
- The element
-
load
public void load(List<? extends org.apache.tinkerpop.gremlin.structure.Element> elements)
Load the elements from the backing table.- Parameters:
elements
- The elements
-
clearProperty
public PropertyRemover clearProperty(org.apache.tinkerpop.gremlin.structure.Element element, String key)
Delete the property entry from property table.- Parameters:
element
- The elementkey
- The property key
-
writeProperty
public PropertyWriter writeProperty(org.apache.tinkerpop.gremlin.structure.Element element, String key, Object value)
Write the given property to the property table.- Parameters:
element
- The elementkey
- The property keyvalue
- The property value
-
incrementProperty
public PropertyIncrementer incrementProperty(org.apache.tinkerpop.gremlin.structure.Element element, String key, long value)
Increment the given property in the property table.- Parameters:
element
- The elementkey
- The property keyvalue
- The amount to increment
-
getPropertyScan
protected org.apache.hadoop.hbase.client.Scan getPropertyScan(String label)
-
getPropertyScan
protected org.apache.hadoop.hbase.client.Scan getPropertyScan(String label, byte[] key, byte[] val)
-
getPropertyScan
protected org.apache.hadoop.hbase.client.Scan getPropertyScan(String label, byte[] key, byte[] inclusiveFromValue, byte[] exclusiveToValue)
-
-