public class OrientEdge extends OrientElement implements com.tinkerpop.blueprints.Edge
alter database custom useLightweightEdges=false
.Modifier and Type | Field and Description |
---|---|
protected String |
label |
protected OIdentifiable |
vIn |
protected OIdentifiable |
vOut |
classicDetachMode, DEF_ORIGINAL_ID_FIELDNAME, LABEL_FIELD_NAME, rawElement, settings
Modifier | Constructor and Description |
---|---|
|
OrientEdge()
(Internal) Called by serialization
|
protected |
OrientEdge(OrientBaseGraph rawGraph,
OIdentifiable rawEdge) |
protected |
OrientEdge(OrientBaseGraph rawGraph,
OIdentifiable out,
OIdentifiable in,
String iLabel) |
protected |
OrientEdge(OrientBaseGraph rawGraph,
OIdentifiable rawEdge,
String iLabel) |
protected |
OrientEdge(OrientBaseGraph rawGraph,
String iLabel,
Object... fields) |
Modifier and Type | Method and Description |
---|---|
void |
convertToDocument()
(Blueprints Extension) Converts the lightweight edge to a regular edge creating the underlying
document to store edge's properties.
|
protected ODocument |
createDocument(String iLabel) |
protected boolean |
dropEdgeFromVertex(OIdentifiable iEdge,
ODocument iVertex,
String iFieldName,
Object iFieldValue) |
boolean |
equals(Object object) |
String |
getBaseClassName()
(Blueprints Extension) Returns "E" as base class name all the edge's sub-classes extend.
|
String |
getClassName(String iLabel)
(Blueprints Extension) Returns the class name based on graph settings.
|
static OIdentifiable |
getConnection(ODocument iEdgeRecord,
com.tinkerpop.blueprints.Direction iDirection) |
String |
getElementType()
(Blueprints Extension) Returns "Edge".
|
Object |
getId()
Returns the Edge Id assuring to save it if it's transient yet.
|
OIdentifiable |
getInVertex()
(Blueprints Extension) Returns the incoming vertex in form of record.
|
String |
getLabel()
Returns the Edge's label.
|
OIdentifiable |
getOutVertex()
(Blueprints Extension) Returns the outgoing vertex in form of record.
|
Map<String,Object> |
getProperties()
(Blueprints Extension) Gets all the properties from a Vertex or Edge in one shot.
|
<T> T |
getProperty(String key)
Returns a Property value.
|
Set<String> |
getPropertyKeys()
Returns all the Property names as Set of String.
|
ODocument |
getRecord()
(Blueprints Extension) Returns the underlying record if it's a regular edge, otherwise it
created a document with no identity with the edge properties.
|
static String |
getRecordLabel(OIdentifiable iEdge)
(Blueprints Extension) Returns the record label if any, otherwise NULL.
|
OrientEdgeType |
getType() |
OrientVertex |
getVertex(com.tinkerpop.blueprints.Direction direction)
Returns the connected incoming or outgoing vertex.
|
boolean |
isLabeled(String[] iLabels)
Returns true if the edge is labeled with any of the passed strings.
|
static boolean |
isLabeled(String iEdgeLabel,
String[] iLabels)
(Blueprints Extension) Returns true if the edge is labeled with any of the passed strings.
|
boolean |
isLightweight() |
void |
readExternal(ObjectInput in) |
void |
remove()
Removes the Edge from the Graph.
|
<T> T |
removeProperty(String key)
Removed a Property.
|
void |
setProperty(String key,
Object value)
Set a Property value.
|
String |
toString()
Returns a string representation of the edge.
|
void |
writeExternal(ObjectOutput out) |
attach, checkClass, checkDeletedInTx, checkForClassInSchema, checkIfAttached, compare, compareTo, copyTo, detach, fromStream, getGraph, getIdentity, hashCode, isDetached, isLocked, lock, lockingStrategy, reload, save, save, setCurrentGraphInThreadLocal, setProperties, setPropertiesInternal, setProperty, setPropertyInternal, switchToAutoAttachmentMode, switchToManualAttachmentMode, toStream, unlock, validateProperty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
protected OIdentifiable vOut
protected OIdentifiable vIn
protected String label
public OrientEdge()
protected OrientEdge(OrientBaseGraph rawGraph, OIdentifiable rawEdge)
protected OrientEdge(OrientBaseGraph rawGraph, OIdentifiable rawEdge, String iLabel)
protected OrientEdge(OrientBaseGraph rawGraph, String iLabel, Object... fields)
protected OrientEdge(OrientBaseGraph rawGraph, OIdentifiable out, OIdentifiable in, String iLabel)
public static OIdentifiable getConnection(ODocument iEdgeRecord, com.tinkerpop.blueprints.Direction iDirection)
public static boolean isLabeled(String iEdgeLabel, String[] iLabels)
iEdgeLabel
- Label of current edgeiLabels
- Labels as array of Stringspublic static String getRecordLabel(OIdentifiable iEdge)
iEdge
- Edge instancepublic OrientEdgeType getType()
public OrientVertex getVertex(com.tinkerpop.blueprints.Direction direction)
getVertex
in interface com.tinkerpop.blueprints.Edge
direction
- Direction between IN or OUTpublic OIdentifiable getOutVertex()
public OIdentifiable getInVertex()
public String getLabel()
alter database custom useClassForEdgeLabel=false
getLabel
in interface com.tinkerpop.blueprints.Edge
getLabel
in class OrientElement
public boolean equals(Object object)
equals
in interface Comparator<OIdentifiable>
equals
in class OrientElement
public Object getId()
getId
in interface com.tinkerpop.blueprints.Element
getId
in class OrientElement
public <T> T getProperty(String key)
getProperty
in interface com.tinkerpop.blueprints.Element
getProperty
in class OrientElement
key
- Property namepublic boolean isLightweight()
public Set<String> getPropertyKeys()
getPropertyKeys
in interface com.tinkerpop.blueprints.Element
public Map<String,Object> getProperties()
OrientElement
getProperties
in class OrientElement
public void setProperty(String key, Object value)
setProperty
in interface com.tinkerpop.blueprints.Element
setProperty
in class OrientElement
key
- Property namevalue
- Property valuepublic <T> T removeProperty(String key)
removeProperty
in interface com.tinkerpop.blueprints.Element
removeProperty
in class OrientElement
key
- Property namepublic void remove()
remove
in interface com.tinkerpop.blueprints.Element
public final String getBaseClassName()
getBaseClassName
in class OrientElement
public String getElementType()
getElementType
in class OrientElement
public String toString()
public ODocument getRecord()
getRecord
in interface OIdentifiable
getRecord
in class OrientElement
public void convertToDocument()
public String getClassName(String iLabel)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class OrientElement
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class OrientElement
IOException
ClassNotFoundException
public boolean isLabeled(String[] iLabels)
iLabels
- Labels as array of Stringsprotected boolean dropEdgeFromVertex(OIdentifiable iEdge, ODocument iVertex, String iFieldName, Object iFieldValue)
Copyright © 2009–2020 OrientDB. All rights reserved.