Package com.basho.riak.client.core.query.links

Examples of com.basho.riak.client.core.query.links.RiakLink


        pojo.bucketType = "some_type";
        pojo.value = "some_value";
        pojo.metadata =
            new HashMap<String,String>(){{ put("metaKey", "metaValue");}};
        pojo.index = new HashSet<String>(){{ add("bob@gmail.com");}};
        pojo.links = new LinkedList<RiakLink>(){{ add(new RiakLink("bucket","key","tag"));}};
        pojo.vclock = vclock;
        pojo.contentType = RiakObject.DEFAULT_CONTENT_TYPE;
           
        JSONConverter<EmptyPojoWithRiakFields> jc =
            new JSONConverter<EmptyPojoWithRiakFields>(new TypeReference<EmptyPojoWithRiakFields>(){});
View Full Code Here


        BinaryValue key = BinaryValue.create("key".getBytes());

        RiakObject ro = new RiakObject();

        List<RiakLink> links = new ArrayList<RiakLink>();
        links.add(new RiakLink("bucket", "key", "tag"));
        ro.getLinks().addLinks(links);

        RiakIndexes indexes = ro.getIndexes();
        LongIntIndex longIndex = indexes.getIndex(LongIntIndex.named("dave"));
        longIndex.add(42L);
View Full Code Here

   
    @Test
    public void getRiakLinksField()
    {
        Collection<RiakLink> links = new LinkedList<RiakLink>();
        RiakLink link = new RiakLink("bucket", "key", "tag");
        links.add(link);
        link = new RiakLink("bucket", "key2", "tag");
        links.add(link);
        PojoWithAnnotatedFields pojo = new PojoWithAnnotatedFields();
        pojo.links = links;
       
        com.basho.riak.client.core.query.links.RiakLinks riakLinks =
View Full Code Here

   
    @Test
    public void getRiakLinksMethod()
    {
        Collection<RiakLink> links = new LinkedList<RiakLink>();
        RiakLink link = new RiakLink("bucket", "key", "tag");
        links.add(link);
        link = new RiakLink("bucket", "key2", "tag");
        links.add(link);
        PojoWithAnnotatedMethods pojo = new PojoWithAnnotatedMethods();
        pojo.setLinks(links);
       
        com.basho.riak.client.core.query.links.RiakLinks riakLinks =
View Full Code Here

    @Test
    public void setRiakLinksField()
    {
        com.basho.riak.client.core.query.links.RiakLinks riakLinks =
            new com.basho.riak.client.core.query.links.RiakLinks();
        RiakLink link = new RiakLink("bucket", "key", "tag");
        riakLinks.addLink(link);
        link = new RiakLink("bucket", "key2", "tag");
        riakLinks.addLink(link);
       
        PojoWithAnnotatedFields pojo = new PojoWithAnnotatedFields();
        AnnotationUtil.populateLinks(riakLinks, pojo);
       
View Full Code Here

    @Test
    public void setRiakLinksMethod()
    {
        com.basho.riak.client.core.query.links.RiakLinks riakLinks =
            new com.basho.riak.client.core.query.links.RiakLinks();
        RiakLink link = new RiakLink("bucket", "key", "tag");
        riakLinks.addLink(link);
        link = new RiakLink("bucket", "key2", "tag");
        riakLinks.addLink(link);
       
        PojoWithAnnotatedMethods pojo = new PojoWithAnnotatedMethods();
        AnnotationUtil.populateLinks(riakLinks, pojo);
       
View Full Code Here

    {
        com.basho.riak.client.core.query.links.RiakLinks riakLinks =
            new com.basho.riak.client.core.query.links.RiakLinks();
        Object o = new Object();
       
        RiakLink link = new RiakLink("bucket", "key", "tag");
        riakLinks.addLink(link);
        link = new RiakLink("bucket", "key2", "tag");
        riakLinks.addLink(link);
        AnnotationUtil.populateLinks(riakLinks, o); // should do nothing
       
        riakLinks.removeAllLinks();
        AnnotationUtil.getLinks(riakLinks, o);
View Full Code Here

                List<RiakKvPB.RpbLink> pbLinkList = content.getLinksList();
                RiakLinks riakLinks = ro.getLinks();
               
                for (RiakKvPB.RpbLink pbLink : pbLinkList)
                {
                    RiakLink link = new RiakLink(pbLink.getBucket().toStringUtf8(),
                        pbLink.getKey().toStringUtf8(),
                        pbLink.getTag().toStringUtf8());
                    riakLinks.addLink(link);
                }
            }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.query.links.RiakLink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.