Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
My failed attemp to fix supportsRemoveVertices()
- Loading branch information
Showing
4 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
driver/src/main/java/org/apache/tinkerpop/gremlin/orientdb/RemovedOIdentifiable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package org.apache.tinkerpop.gremlin.orientdb; | ||
|
||
import org.apache.tinkerpop.gremlin.structure.Edge; | ||
import org.apache.tinkerpop.gremlin.structure.Element; | ||
|
||
import com.orientechnologies.orient.core.db.record.OIdentifiable; | ||
import com.orientechnologies.orient.core.id.ORID; | ||
import com.orientechnologies.orient.core.record.ORecord; | ||
import com.orientechnologies.orient.core.storage.OStorage.LOCKING_STRATEGY; | ||
|
||
public final class RemovedOIdentifiable implements OIdentifiable { | ||
|
||
private final ORID id; | ||
|
||
public RemovedOIdentifiable(ORID id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public int compareTo(OIdentifiable o) { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public int compare(OIdentifiable o1, OIdentifiable o2) { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public ORID getIdentity() { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public <T extends ORecord> T getRecord() { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public void lock(boolean iExclusive) { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public boolean isLocked() { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public LOCKING_STRATEGY lockingStrategy() { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
@Override | ||
public void unlock() { | ||
throw Element.Exceptions.elementAlreadyRemoved(Edge.class, id); | ||
} | ||
|
||
} |