001/* 002 * Copyright 2013 Box, Inc. All rights reserved. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.nuxeo.box.api.marshalling.dao; 017 018import com.fasterxml.jackson.annotation.JsonProperty; 019 020import java.util.Map; 021 022public class BoxCollection extends BoxCollectionBase { 023 024 public static final String FIELD_TOTAL_COUNT = "total_count"; 025 026 public BoxCollection() { 027 } 028 029 /** 030 * Copy constructor, this does deep copy for all the fields. 031 * 032 * @param obj 033 */ 034 public BoxCollection(BoxCollection obj) { 035 super(obj); 036 } 037 038 /** 039 * Instantiate the object from a map. Each entry in the map reflects to a field. 040 * 041 * @param map 042 */ 043 public BoxCollection(Map<String, Object> map) { 044 super(map); 045 } 046 047 /** 048 * @return the total_count 049 */ 050 @JsonProperty("total_count") 051 public Integer getTotalCount() { 052 return (Integer) getValue(FIELD_TOTAL_COUNT); 053 } 054 055 /** 056 * @param totalCount the total_count to set 057 */ 058 @JsonProperty("total_count") 059 private void setTotalCount(Integer totalCount) { 060 put(FIELD_TOTAL_COUNT, totalCount); 061 } 062}