hydra.ext.org.apache.tinkerpop.gremlin.TransactionPart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hydra-ext Show documentation
Show all versions of hydra-ext Show documentation
Hydra language extensions in Java; models, coders, and utilities
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.org.apache.tinkerpop.gremlin;
import java.io.Serializable;
public abstract class TransactionPart implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/apache/tinkerpop/gremlin.TransactionPart");
public static final hydra.core.Name FIELD_NAME_BEGIN = new hydra.core.Name("begin");
public static final hydra.core.Name FIELD_NAME_COMMIT = new hydra.core.Name("commit");
public static final hydra.core.Name FIELD_NAME_ROLLBACK = new hydra.core.Name("rollback");
private TransactionPart () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Begin instance) ;
R visit(Commit instance) ;
R visit(Rollback instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(TransactionPart instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Begin instance) {
return otherwise((instance));
}
default R visit(Commit instance) {
return otherwise((instance));
}
default R visit(Rollback instance) {
return otherwise((instance));
}
}
public static final class Begin extends hydra.ext.org.apache.tinkerpop.gremlin.TransactionPart implements Serializable {
public Begin () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Begin)) {
return false;
}
Begin o = (Begin) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Commit extends hydra.ext.org.apache.tinkerpop.gremlin.TransactionPart implements Serializable {
public Commit () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Commit)) {
return false;
}
Commit o = (Commit) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Rollback extends hydra.ext.org.apache.tinkerpop.gremlin.TransactionPart implements Serializable {
public Rollback () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Rollback)) {
return false;
}
Rollback o = (Rollback) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}