Package com.linkedin.restli.example

Examples of com.linkedin.restli.example.AlbumEntry


      final long albumId = 7;

      final CompoundKey key = new CompoundKey();
      key.append("photoId", photoId);
      key.append("albumId", albumId);
      final AlbumEntry entry = new AlbumEntry();
      entry.setPhotoId(photoId);
      entry.setAlbumId(albumId);
      entry.setAddTime(r.nextInt(Integer.MAX_VALUE));
      _data.put(key, entry);
    }
  }
View Full Code Here


  private CompoundKey[] _keys;

  private void makeData()
  {
    _entries =
        new AlbumEntry[] { new AlbumEntry().setAddTime(1), new AlbumEntry().setAddTime(2),
            new AlbumEntry().setAddTime(3), new AlbumEntry().setAddTime(4),
            new AlbumEntry().setAddTime(5) };
    _keys =
        new CompoundKey[] { new CompoundKey().append("photoId", 1L).append("albumId", 1L),
            new CompoundKey().append("photoId", 2L).append("albumId", 1L),
            new CompoundKey().append("photoId", 3L).append("albumId", 1L),
            new CompoundKey().append("photoId", 1L).append("albumId", 2L),
View Full Code Here

  @Test(expectedExceptions = RestLiServiceException.class)
  public void testBadUpdatePhotoId()
  {
    // photo 100 doesn't exist
    CompoundKey key = new CompoundKey().append("photoId", 100L).append("albumId", 1L);
    AlbumEntry entry = new AlbumEntry().setAddTime(4);
    _entryRes.update(key, entry);
  }
View Full Code Here

  @Test(expectedExceptions = RestLiServiceException.class)
  public void testBadUpdateAlbumId()
  {
    // album 100 doesn't exist
    CompoundKey key = new CompoundKey().append("photoId", 1L).append("albumId", 100L);
    AlbumEntry entry = new AlbumEntry().setAddTime(4);
    _entryRes.update(key, entry);
  }
View Full Code Here

  @Test(expectedExceptions = RestLiServiceException.class)
  public void testBadUpdateIdsInEntry()
  {
    // shouldn't be able to put IDs in update entry
    CompoundKey key = new CompoundKey().append("photoId", 1L).append("albumId", 1L);
    AlbumEntry entry = new AlbumEntry().setAddTime(4).setPhotoId(1);
    _entryRes.update(key, entry);
  }
View Full Code Here

TOP

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

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.