gpt4 book ai didi

com.buschmais.xo.api.XOException类的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 00:03:05 25 4
gpt4 key购买 nike

本文整理了Java中com.buschmais.xo.api.XOException类的一些代码示例,展示了XOException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XOException类的具体详情如下:
包路径:com.buschmais.xo.api.XOException
类名称:XOException

XOException介绍

暂无

代码示例

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

private void ensureTransaction() {
  if (transaction == null) {
    throw new XOException("There is no existing transaction.");
  }
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

private EmbeddedDirection getDirection(RelationTypeMetadata.Direction direction) {
  switch (direction) {
  case FROM:
    return EmbeddedDirection.OUTGOING;
  case TO:
    return EmbeddedDirection.INCOMING;
  default:
    throw new XOException("Unsupported direction " + direction);
  }
}

代码示例来源:origin: com.puresoltechnologies.extended-objects/titan

@Override
public void begin() {
if (active) {
  throw new XOException("There is already an active transaction.");
}
active = true;
}

代码示例来源:origin: com.puresoltechnologies.ductiledb/ductiledb-xo

@Override
public void begin() {
if (active) {
  throw new XOException("There is already an active transaction.");
}
active = true;
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@Override
public void remove() {
  throw new XOException("Remove operation is not supported for find results.");
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@Override
public void remove() {
  throw new XOException("Remove operation is not supported for query results.");
}

代码示例来源:origin: com.buschmais.xo/xo.spi

/**
 * Constructor.
 *
 * @param setter The set method.
 * @param getter The corresponding {@link GetPropertyMethod}.
 * @param name   The name of the property.
 * @param type   The type of the property.
 */
public SetPropertyMethod(Method setter, GetPropertyMethod getter, String name, Class<?> type, Type genericType) {
  super(setter, name, type, genericType);
  if (getter == null) {
    throw new XOException("No getter defined for property '" + name + "' of type '" + type.getName() + "' in type '" + setter.getDeclaringClass().getName() + "'.");
  }
  this.getter = getter;
}

代码示例来源:origin: com.buschmais.xo/xo.spi

private void addType(Class<?> declaringType, String name, Class<?> type, Type genericType) {
    Class<?> existingType = types.put(name, type);
    if (existingType != null && !existingType.equals(type)) {
      throw new XOException("Get and set methods for property '" + name + "' of type '" + declaringType.getName() + "' do not declare the same type: "
          + existingType.getName() + " <> " + type.getName());
    }
    Type existingGenericType = genericTypes.put(name, genericType);
    if (existingGenericType != null && !existingGenericType.equals(genericType)) {
      throw new XOException("Get and set methods for property '" + name + "' of type '" + declaringType.getName()
          + "' do not declare the same generic type: " + existingGenericType + " <> " + type.getName());
    }
  }
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@SuppressWarnings("unchecked")
DatastoreFactory lookupFactory(URI uri) {
  String factoryClass = getFactoryClassName(uri);
  LOG.debug("try to lookup provider-class {}", factoryClass);
  try {
    return ((Class<? extends DatastoreFactory>) Class.forName(factoryClass)).newInstance();
  } catch (ReflectiveOperationException e) {
    throw new XOException("Cannot create datastore factory.", e);
  }
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@Override
public void begin() {
  if (transaction != null) {
    throw new XOException("There is already an existing transaction.");
  }
  transaction = graphDatabaseService.beginTx();
}

代码示例来源:origin: com.buschmais.xo/xo.spi

public <T> T removeInterceptor(T instance) {
    InvocationHandler invocationHandler = Proxy.getInvocationHandler(instance);
    if (!InterceptorInvocationHandler.class.isAssignableFrom(invocationHandler.getClass())) {
      throw new XOException(invocationHandler + " implementing " + Arrays.asList(invocationHandler.getClass().getInterfaces()) + " is not of expected type " + InterceptorInvocationHandler.class.getName());
    }
    return (T) ((InterceptorInvocationHandler) invocationHandler).getInstance();
  }
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@Override
  public Object convert(Object value) {
    if (value instanceof AbstractEmbeddedPropertyContainer) {
      return ((AbstractEmbeddedPropertyContainer) value).getId();
    }
    throw new XOException("Unsupported value " + value);
  }
}

代码示例来源:origin: com.puresoltechnologies.extended-objects/titan

private static <QL> GremlinExpression extractExpression(Class<?> clazz) {
Gremlin gremlin = clazz.getAnnotation(Gremlin.class);
if (gremlin == null) {
  throw new XOException(clazz.getName() + " must be annotated with "
    + Gremlin.class.getName());
}
return new GremlinExpression(gremlin);
}

代码示例来源:origin: com.puresoltechnologies.extended-objects/titan

private static <QL> GremlinExpression extractExpression(Method method) {
Gremlin gremlin = method.getAnnotation(Gremlin.class);
if (gremlin == null) {
  throw new XOException(method.getName() + " must be annotated with "
    + Gremlin.class.getName());
}
return new GremlinExpression(gremlin);
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@Override
public <QL extends Annotation> DatastoreQuery<QL> createQuery(Class<QL> queryLanguage) {
  if (Cypher.class.equals(queryLanguage)) {
    return (DatastoreQuery<QL>) new EmbeddedNeo4jCypherQuery(this);
  }
  throw new XOException("Unsupported query language: " + queryLanguage.getName());
}

代码示例来源:origin: com.puresoltechnologies.ductiledb/ductiledb-xo

private static <QL> GremlinExpression extractExpression(Class<?> clazz) {
Query gremlin = clazz.getAnnotation(Query.class);
if (gremlin == null) {
  throw new XOException(clazz.getName() + " must be annotated with " + Gremlin.class.getName());
}
return new GremlinExpression(gremlin);
}

代码示例来源:origin: com.buschmais.xo/xo.neo4j.embedded

@Override
public GraphDbNeo4jDatastore createGraphDatabaseService(URI uri, Properties properties) throws MalformedURLException {
  String graphDbPropertyName = GraphDatabaseService.class.getName();
    GraphDatabaseService graphDatabaseService = (GraphDatabaseService) properties.get(graphDbPropertyName);
  if (graphDatabaseService == null) {
    throw new XOException("Property " + graphDbPropertyName + " is not specified.");
  }
      return new GraphDbNeo4jDatastore(graphDatabaseService);
    }
  }

代码示例来源:origin: com.puresoltechnologies.ductiledb/ductiledb-xo

private static <QL> GremlinExpression extractExpression(Method method) {
Query gremlin = method.getAnnotation(Query.class);
if (gremlin == null) {
  throw new XOException(method.getName() + " must be annotated with " + Gremlin.class.getName());
}
return new GremlinExpression(gremlin);
}

代码示例来源:origin: com.puresoltechnologies.extended-objects/titan

@Override
public void commit() {
if (!active) {
  throw new XOException("There is no active transaction.");
}
active = false;
titanGraph.commit();
}

代码示例来源:origin: com.puresoltechnologies.extended-objects/titan

@Override
public void rollback() {
if (!active) {
  throw new XOException("There is no active transaction.");
}
active = false;
titanGraph.rollback();
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com