当前位置: 首页>>代码示例>>Java>>正文


Java DatastoreRelationManager类代码示例

本文整理汇总了Java中com.buschmais.xo.spi.datastore.DatastoreRelationManager的典型用法代码示例。如果您正苦于以下问题:Java DatastoreRelationManager类的具体用法?Java DatastoreRelationManager怎么用?Java DatastoreRelationManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DatastoreRelationManager类属于com.buschmais.xo.spi.datastore包,在下文中一共展示了DatastoreRelationManager类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getReferencedEntity

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
private Entity getReferencedEntity(Relation relation, RelationTypeMetadata.Direction direction) {
    DatastoreRelationManager<Entity, ?, Relation, ? extends DatastoreRelationMetadata<?>, ?, ?> relationManager = sessionContext.getDatastoreSession().getDatastoreRelationManager();
    switch (direction) {
        case TO:
            return relationManager.getTo(relation);
        case FROM:
            return relationManager.getFrom(relation);
        default:
            throw direction.createNotSupportedException();
    }
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:12,代码来源:RelationPropertyManager.java

示例2: getEntityReference

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
public Object getEntityReference(Entity entity, EntityReferencePropertyMethodMetadata metadata) {
    DatastoreRelationManager<Entity, ?, Relation, ?, ?, ?> relationManager = sessionContext.getDatastoreSession().getDatastoreRelationManager();
    if (relationManager.hasSingleRelation(entity, metadata.getRelationshipMetadata(), metadata.getDirection())) {
        Relation singleRelation = (Relation) relationManager.getSingleRelation(entity, metadata.getRelationshipMetadata(), metadata.getDirection());
        Entity target = getReferencedEntity(singleRelation, metadata.getDirection());
        return sessionContext.getEntityInstanceManager().readInstance(target);
    }
    return null;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:10,代码来源:EntityPropertyManager.java

示例3: getRelationReference

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
public Object getRelationReference(Entity entity, RelationReferencePropertyMethodMetadata<?> metadata) {
    DatastoreRelationManager<Entity, ?, Relation, ? extends DatastoreRelationMetadata<?>, ?, ?> relationManager = sessionContext.getDatastoreSession()
            .getDatastoreRelationManager();
    if (relationManager.hasSingleRelation(entity, metadata.getRelationshipMetadata(), metadata.getDirection())) {
        Relation singleRelation = (Relation) relationManager.getSingleRelation(entity, metadata.getRelationshipMetadata(), metadata.getDirection());
        return sessionContext.getRelationInstanceManager().readInstance(singleRelation);
    }
    return null;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:10,代码来源:EntityPropertyManager.java

示例4: getReferencedEntity

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
private Entity getReferencedEntity(Relation relation, RelationTypeMetadata.Direction direction) {
    DatastoreRelationManager<Entity, ?, Relation, ? extends DatastoreRelationMetadata<?>, ?, ?> relationManager = sessionContext.getDatastoreSession()
            .getDatastoreRelationManager();
    switch (direction) {
    case FROM:
        return relationManager.getTo(relation);
    case TO:
        return relationManager.getFrom(relation);
    default:
        throw new XOException("Unsupported direction: " + direction);
    }
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:13,代码来源:EntityPropertyManager.java

示例5: createReference

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
private Relation createReference(Entity sourceEntity, RelationTypeMetadata metadata, RelationTypeMetadata.Direction direction, Entity targetEntity,
        Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> example) {
    DatastoreRelationManager<Entity, ?, Relation, ?, ?, PropertyMetadata> datastoreRelationManager = sessionContext.getDatastoreSession()
            .getDatastoreRelationManager();
    Relation relation = (Relation) datastoreRelationManager.createRelation(sourceEntity, metadata, direction, targetEntity, example);
    AbstractInstanceManager<?, Entity> entityInstanceManager = sessionContext.getEntityInstanceManager();
    entityInstanceManager.updateInstance(sourceEntity);
    entityInstanceManager.updateInstance(targetEntity);
    return relation;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:11,代码来源:EntityPropertyManager.java

示例6: getDatastoreRelationManager

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
   public DatastoreRelationManager<DuctileVertex, Long, DuctileEdge, DuctileEdgeMetadata, String, DuctilePropertyMetadata> getDatastoreRelationManager() {
return edgeManager;
   }
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:5,代码来源:DuctileStoreSession.java

示例7: getDatastoreRelationManager

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
   public DatastoreRelationManager<Vertex, Object, Edge, TitanEdgeMetadata, String, TitanPropertyMetadata> getDatastoreRelationManager() {
return edgeManager;
   }
 
开发者ID:PureSolTechnologies,项目名称:extended-objects-titan,代码行数:5,代码来源:TitanStoreSession.java

示例8: getDatastoreRelationManager

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
public DatastoreRelationManager<EmbeddedNode, Long, EmbeddedRelationship, RelationshipMetadata<EmbeddedRelationshipType>, EmbeddedRelationshipType, PropertyMetadata> getDatastoreRelationManager() {
    return relationManager;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:5,代码来源:EmbeddedNeo4jDatastoreSession.java

示例9: getDatastoreRelationManager

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
public DatastoreRelationManager<RemoteNode, Long, RemoteRelationship, RelationshipMetadata<RemoteRelationshipType>, RemoteRelationshipType, PropertyMetadata> getDatastoreRelationManager() {
    return relationManager;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:5,代码来源:RemoteDatastoreSession.java

示例10: TraceRelationManager

import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param delegate
 *            The delegate.
 */
public TraceRelationManager(DatastoreRelationManager<Entity, RelationId, Relation, RelationMetadata, RelationDiscriminator, PropertyMetadata> delegate) {
    this.delegate = delegate;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:10,代码来源:TraceRelationManager.java


注:本文中的com.buschmais.xo.spi.datastore.DatastoreRelationManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。