本文整理汇总了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();
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例6: getDatastoreRelationManager
import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
public DatastoreRelationManager<DuctileVertex, Long, DuctileEdge, DuctileEdgeMetadata, String, DuctilePropertyMetadata> getDatastoreRelationManager() {
return edgeManager;
}
示例7: getDatastoreRelationManager
import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
public DatastoreRelationManager<Vertex, Object, Edge, TitanEdgeMetadata, String, TitanPropertyMetadata> getDatastoreRelationManager() {
return edgeManager;
}
示例8: getDatastoreRelationManager
import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
public DatastoreRelationManager<EmbeddedNode, Long, EmbeddedRelationship, RelationshipMetadata<EmbeddedRelationshipType>, EmbeddedRelationshipType, PropertyMetadata> getDatastoreRelationManager() {
return relationManager;
}
示例9: getDatastoreRelationManager
import com.buschmais.xo.spi.datastore.DatastoreRelationManager; //导入依赖的package包/类
@Override
public DatastoreRelationManager<RemoteNode, Long, RemoteRelationship, RelationshipMetadata<RemoteRelationshipType>, RemoteRelationshipType, PropertyMetadata> getDatastoreRelationManager() {
return relationManager;
}
示例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;
}