@Override public <O> O valueOrNull(PropertyKey key) { if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); return null; }
/** * If {@link #isImplicitKeyQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory)} is true, * this method provides the result set for the query based on the evaluation of the {@link ImplicitKey}. * </p> * Handling of implicit keys is completely distinct from "normal" query execution and handled extra * for completeness reasons. * * @param v * @return */ protected Iterable<TitanRelation> executeImplicitKeyQuery(InternalVertex v) { assert isImplicitKeyQuery(RelationCategory.PROPERTY); if (dir==Direction.IN || limit<1) return ImmutableList.of(); ImplicitKey key = (ImplicitKey)tx.getRelationType(types[0]); return ImmutableList.of((TitanRelation)new StandardVertexProperty(0,key,v,key.computeProperty(v), v.isNew()?ElementLifeCycle.New:ElementLifeCycle.Loaded)); }
@Override public <O> O valueOrNull(PropertyKey key) { verifyAccess(); if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); return it().getValueDirect(key); }
@Override public <O> O valueOrNull(PropertyKey key) { if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); return null; }
@Override public <O> O getProperty(PropertyKey key) { if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); return null; }
@Override public <O> O getProperty(PropertyKey key) { if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); throw getAccessException(); }
@Override public <O> O getProperty(PropertyKey key) { if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); return it().getPropertyDirect(key); }
@Override public <O> O valueOrNull(PropertyKey key) { verifyAccess(); if (key instanceof ImplicitKey) return ((ImplicitKey)key).computeProperty(this); return it().getValueDirect(key); }
/** * If {@link #isImplicitKeyQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory)} is true, * this method provides the result set for the query based on the evaluation of the {@link ImplicitKey}. * </p> * Handling of implicit keys is completely distinct from "normal" query execution and handled extra * for completeness reasons. * * @param v * @return */ protected Iterable<TitanRelation> executeImplicitKeyQuery(InternalVertex v) { assert isImplicitKeyQuery(RelationCategory.PROPERTY); if (dir==Direction.IN || limit<1) return ImmutableList.of(); ImplicitKey key = (ImplicitKey)tx.getRelationType(types[0]); return ImmutableList.of((TitanRelation)new StandardVertexProperty(0,key,v,key.computeProperty(v), v.isNew()?ElementLifeCycle.New:ElementLifeCycle.Loaded)); }
@Override public<A> A getProperty(String key) { if (key.equals(executor.stateKey)) { return (A)executor.getVertexState(getLongId()); } SystemRelationType t = SystemTypeManager.getSystemType(key); if (t!=null && t instanceof ImplicitKey) return ((ImplicitKey)t).computeProperty(this); throw getAccessException(); }
/** * If {@link #isImplicitKeyQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory)} is true, * this method provides the result set for the query based on the evaluation of the {@link ImplicitKey}. * </p> * Handling of implicit keys is completely distinct from "normal" query execution and handled extra * for completeness reasons. * * @param v * @return */ protected Iterable<TitanRelation> executeImplicitKeyQuery(InternalVertex v) { assert isImplicitKeyQuery(RelationCategory.PROPERTY); if (dir==Direction.IN || limit<1) return ImmutableList.of(); ImplicitKey key = (ImplicitKey)tx.getRelationType(types[0]); return ImmutableList.of((TitanRelation)new StandardProperty(0,key,v,key.computeProperty(v), v.isNew()?ElementLifeCycle.New:ElementLifeCycle.Loaded)); }