Package com.linkedin.restli.example

Examples of com.linkedin.restli.example.Album


    server.start();

    Photo photoEntity = REST_CLIENT.sendRequest(PHOTOS_BUILDERS.get().id(1L).build()).getResponseEntity();
    Assert.assertEquals(photoEntity.getTitle(), "Photo 1");

    Album albumEntity = REST_CLIENT.sendRequest(ALBUMS_BUILDERS.get().id(1L).build()).getResponseEntity();
    Assert.assertEquals(albumEntity.getTitle(), "Awesome Album #1");

    server.stop();
  }
View Full Code Here


  // update an existing photo with given entity
  @Override
  public UpdateResponse update(Long key, Album entity)
  {
    final Album currPhoto = _db.getData().get(key);
    if (currPhoto == null)
    {
      return new UpdateResponse(HttpStatus.S_404_NOT_FOUND);
    }
View Full Code Here

    // initialize some random albums at the first the resource class is loaded
    for (int i = 0; i < numInitAlbums; i++)
    {
      final long id = _currId.incrementAndGet();
      final long date = r.nextInt(Integer.MAX_VALUE);
      final Album album = new Album()
          .setId(id)
          .setUrn(String.valueOf(id))
          .setTitle("Awesome Album #" + id)
          .setCreationTime(date);

      _data.put(album.getId(), album);
    }
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.example.Album

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.