001package org.nuxeo.box.api.marshalling.dao; 002 003import com.fasterxml.jackson.annotation.JsonProperty; 004 005import java.util.Map; 006 007public class BoxEventCollection extends BoxCollectionBase { 008 009 public static final String FIELD_CHUNK_SIZE = "chunk_size"; 010 011 public static final String FIELD_NEXT_STREAM_POSITION = "next_stream_position"; 012 013 public BoxEventCollection() { 014 } 015 016 /** 017 * Copy constructor, this does deep copy for all the fields. 018 * 019 * @param obj 020 */ 021 public BoxEventCollection(BoxEventCollection obj) { 022 super(obj); 023 } 024 025 /** 026 * Instantiate the object from a map. Each entry in the map reflects to a field. 027 * 028 * @param map 029 */ 030 public BoxEventCollection(Map<String, Object> map) { 031 super(map); 032 } 033 034 /** 035 * @return the chunk size 036 */ 037 @JsonProperty(FIELD_CHUNK_SIZE) 038 public Integer getChunkSize() { 039 return (Integer) getValue(FIELD_CHUNK_SIZE); 040 } 041 042 /** 043 * @param chunkSize size the chunk size 044 */ 045 @JsonProperty(FIELD_CHUNK_SIZE) 046 private void setChunkSize(Integer chunkSize) { 047 put(FIELD_CHUNK_SIZE, chunkSize); 048 } 049 050 /** 051 * @return the next stream_position 052 */ 053 @JsonProperty(FIELD_NEXT_STREAM_POSITION) 054 public Long getNextStreamPosition() { 055 return (Long) getValue(FIELD_NEXT_STREAM_POSITION); 056 } 057 058 /** 059 * @param nextStreamPosition the next stream position 060 */ 061 @JsonProperty(FIELD_NEXT_STREAM_POSITION) 062 private void setNextStreamPosition(Long nextStreamPosition) { 063 put(FIELD_NEXT_STREAM_POSITION, nextStreamPosition); 064 } 065}