- All Superinterfaces:
Comparable<OIdentifiable>, Comparator<OIdentifiable>, OIdentifiable, ORecord, ORecordElement, OSerializableStream, Serializable
- All Known Subinterfaces:
OEdge, OVertex
- All Known Implementing Classes:
ODocument, ODocumentEmbedded, OEdgeDelegate, OEdgeDocument, OVertexDelegate, OVertexDocument, OViewDocument
public interface OElement
extends ORecord
- Author:
- Luigi Dell'Aquila
-
-
Method Summary
Returns an instance of OEdge representing current element
Returns an instance of OVertex representing current element
<RET> RET
Gets a property given its name
Returns all the names of defined properties
Returns the type of current element, ie the class in the schema (if any)
boolean
Check if a property exists in the Element
boolean
return true if the current element is an edge
boolean
return true if the current element is a vertex
<RET> RET
void
void
Methods inherited from interface com.orientechnologies.orient.core.record.ORecord
clear, copy, delete, detach, fromJSON, getDatabase, getIdentity, getInternalStatus, getSize, getVersion, isDirty, load, reload, reload, reset, save, save, save, save, setInternalStatus, toJSON, toJSON, unload
-
Method Details
-
getPropertyNames
Returns all the names of defined properties
- Returns:
- all the names of defined properties
-
getProperty
<RET> RET getProperty(String name)
Gets a property given its name
- Type Parameters:
RET -
- Parameters:
name - the property name
- Returns:
- Returns the property value
-
hasProperty
boolean hasProperty(String propertyName)
Check if a property exists in the Element
- Parameters:
propertyName -
- Returns:
- true if exists otherwise false.
-
setProperty
Sets a property value
- Parameters:
name - the property name
value - the property value
-
-
removeProperty
<RET> RET removeProperty(String name)
Remove a property
- Parameters:
name - the property name
-
asVertex
Returns an instance of OVertex representing current element
- Returns:
- An OVertex that represents the current element. An empty optional if the current
element is not a vertex
-
asEdge
Returns an instance of OEdge representing current element
- Returns:
- An OEdge that represents the current element. An empty optional if the current element
is not an edge
-
isVertex
boolean isVertex()
return true if the current element is a vertex
- Returns:
- true if the current element is a vertex
-
isEdge
boolean isEdge()
return true if the current element is an edge
- Returns:
- true if the current element is an edge
-
getSchemaType
Returns the type of current element, ie the class in the schema (if any)
- Returns:
- the type of current element. An empty optional is returned if current element does not
have a schema