查询设备与页面的关联关系

@param accessToken    accessToken
@param relationSearch relationSearch
@return result
978224
public static RelationSearchResult relationSearch(String accessToken,
                                                      RelationSearch relationSearch) {
        return relationSearch(accessToken,
                JsonUtil.toJSONString(relationSearch));
    }
1206685
public function getByAccessToken(AccessTokenEntity $accessToken)
    {
        $result = $this->getConnection()->table('oauth_sessions')
                ->select('oauth_sessions.*')
                ->join('oauth_access_tokens', 'oauth_sessions.id', '=', 'oauth_access_tokens.session_id')
                ->where('oauth_access_tokens.id', $accessToken->getId())
                ->first();

        if (is_null($result)) {
            return;
        }

        return (new SessionEntity($this->getServer()))
               ->setId($result->id)
               ->setOwner($result->owner_type, $result->owner_id);
    }
381303
@Override
	public Links findLinksWithRel(LinkRelation relation, InputStream representation) {

		Assert.notNull(relation, "LinkRelation must not be null!");

		try {

			Object parseResult = getExpression(relation).read(representation);
			return createLinksFrom(parseResult, relation);

		} catch (IOException o_O) {
			throw new RuntimeException(o_O);
		} catch (PathNotFoundException o_O) {
			return Links.NONE;
		}
	}
1145149
public static PageDeleteResult pageDelete(String accessToken,
                                              PageDelete pageDelete) {
        return pageDelete(accessToken, JsonUtil.toJSONString(pageDelete));
    }
298330
RelationBuilder getRelationBuilder(Object target, Relation relation, Node source)
    {
        RelationBuilder relationBuilder = new RelationBuilder(target, relation, source);
        relationBuilder.assignGraphGenerator(this.generator);
        return relationBuilder;
    }
229906
function findUserFromAccessToken(accessToken, UserModel) {

    if (!accessToken) return null;

    return UserModel.findById(accessToken.userId).then((user) => {
        if (!user) return Promise.reject('No user with this access token was found.');
        return Promise.resolve(user);
    });
}
1208603
@Override
    public List find(List<IndexClause> ixClause, EntityMetadata m, boolean isRelation, List<String> relations,
            int maxResult, List<String> columns)
    {
        Selector selector = clientFactory.getSelector(pool);

        SlicePredicate slicePredicate = Selector.newColumnsPredicateAll(false, Integer.MAX_VALUE);
        if (columns != null && !columns.isEmpty())
        {
            slicePredicate = Selector.newColumnsPredicate(columns.toArray(new String[] {}));
        }

        List<Object> entities = new ArrayList<Object>();
        if (ixClause.isEmpty())
        {
            if (m.isCounterColumnType())
            {
                try
                {
                    IPooledConnection connection = getConnection();
                    org.apache.cassandra.thrift.Cassandra.Client thriftClient = connection.getAPI();
                    List<KeySlice> ks = thriftClient.get_range_slices(new ColumnParent(m.getTableName()),
                            slicePredicate, Selector.newKeyRange("", "", maxResult), getConsistencyLevel());
                    connection.release();
                    entities = onCounterColumn(m, isRelation, relations, ks);
                }
                catch (InvalidRequestException irex)
                {
                    log.error("Error during executing find, Caused by: .", irex);
                    throw new PersistenceException(irex);
                }
                catch (UnavailableException uex)
                {
                    log.error("Error during executing find, Caused by: .", uex);
                    throw new PersistenceException(uex);
                }
                catch (TimedOutException tex)
                {
                    log.error("Error during executing find, Caused by: .", tex);
                    throw new PersistenceException(tex);
                }
                catch (TException tex)
                {
                    log.error("Error during executing find, Caused by: .", tex);
                    throw new PersistenceException(tex);
                }
            }
            else
            {
                if (m.getType().isSuperColumnFamilyMetadata())
                {
                    Map<Bytes, List<SuperColumn>> qResults = selector.getSuperColumnsFromRows(m.getTableName(),
                            selector.newKeyRange("", "", maxResult), slicePredicate, getConsistencyLevel());
                    entities = new ArrayList<Object>(qResults.size());

                    MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                            m.getPersistenceUnit());

                    EntityType entityType = metaModel.entity(m.getEntityClazz());

                    List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();

                    for (Bytes key : qResults.keySet())
                    {
                        onSuperColumn(m, isRelation, relations, entities, qResults.get(key), key.getBytes());
                    }
                }
                else
                {
                    Map<Bytes, List<Column>> qResults = selector.getColumnsFromRows(m.getTableName(),
                            selector.newKeyRange("", "", maxResult), slicePredicate, getConsistencyLevel());
                    entities = new ArrayList<Object>(qResults.size());
                    MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                            m.getPersistenceUnit());

                    EntityType entityType = metaModel.entity(m.getEntityClazz());

                    List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();
                    for (Bytes key : qResults.keySet())
                    {
                        onColumn(m, isRelation, relations, entities, qResults.get(key), subManagedType, key.getBytes());
                    }
                }

            }
        }
        else
        {
            entities = new ArrayList<Object>();
            for (IndexClause ix : ixClause)
            {
                Map<Bytes, List<Column>> qResults = selector.getIndexedColumns(m.getTableName(), ix, slicePredicate,
                        getConsistencyLevel());

                MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                        m.getPersistenceUnit());

                EntityType entityType = metaModel.entity(m.getEntityClazz());

                List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();

                for (Bytes key : qResults.keySet())
                {
                    onColumn(m, isRelation, relations, entities, qResults.get(key), subManagedType, key.getBytes());
                }
            }
        }
        return entities;
    }
1254771
public static BaseResult barSet(String accessToken, BarSet barSet) {
        return barSet(accessToken, JsonUtil.toJSONString(barSet));
    }
1358084
private List<String> searchTokens(SNode n, long cnr)
  {
    List<String> result = new LinkedList<String>();
    if (n instanceof SToken)
    {
      result.add(n.getId());
      if (componentOfToken.get(n.getId()) == null)
      {
        List<Long> newlist = new LinkedList<Long>();
        newlist.add(cnr);
        componentOfToken.put(n.getId(), newlist);
      }
      else
      {
        List<Long> newlist = componentOfToken.get(n.getId());
        if (!newlist.contains(cnr))
        {
          newlist.add(cnr);
        }
      }
    }
    else
    {
      List<SRelation<SNode, SNode>> outgoing = n.getGraph().getOutRelations(n.getId());
      if(outgoing != null)
      {
        for (SRelation<? extends SNode,? extends SNode> e : outgoing)
        {
          if(!(e instanceof SPointingRelation) && e.getSource() instanceof SNode && e.getTarget() instanceof SNode)
          {
            List<String> Med = searchTokens((SNode) e.getTarget(), cnr);
            for (String s : Med)
            {
              if (!result.contains(s))
              {
                result.add(s);
              }
            }
          }
        }
      }
    }
    return result;
  }
581811
public static OpenPluginTokenResult openpluginToken(String accessToken, OpenPluginToken openPluginToken) {
        return openpluginToken(accessToken, JsonUtil.toJSONString(openPluginToken));
    }
337686
public Relation getRelations(int i) {
    if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_relations == null)
      jcasType.jcas.throwFeatMissing("relations", "de.julielab.jules.types.ace.Document");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_relations), i);
    return (Relation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_relations), i)));}
479514
public static BaseResult homepageSet(String accessToken, HomePageSet homePageSet) {
        return homepageSet(accessToken, JsonUtil.toJSONString(homePageSet));
    }
1330655
public static ShopListResult shopList(String accessToken, ShopList shopList) {
        return shopList(accessToken, JsonUtil.toJSONString(shopList));
    }
28825
public static UpdateResult update(String accessToken,
			UpdateGeneralCoupon updateGeneralCoupon) {
		return update(accessToken, JsonUtil.toJSONString(updateGeneralCoupon));
	}
566513
public static DeviceSearchResult deviceSearch(String accessToken,
                                                  DeviceSearch deviceSearch) {
        return deviceSearch(accessToken, JsonUtil.toJSONString(deviceSearch));
    }
530810
public static LandingPageCreateResult landingPageCreate(String accessToken, LandingPageCreate landingPage) {
		return landingPageCreate(accessToken,
				JsonUtil.toJSONString(landingPage));
	}
528392
public static UserGetShakeInfoResult userGetShakeInfo(String accessToken,
                                                          UserGetShakeInfo userGetShakeInfo) {
        return userGetShakeInfo(accessToken,
                JsonUtil.toJSONString(userGetShakeInfo));
    }