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 022/** 023 * Enterprise. 024 */ 025@SuppressWarnings("unused") 026public class BoxEnterprise extends BoxObject { 027 028 public static final String FIELD_NAME = "name"; 029 030 public BoxEnterprise() { 031 } 032 033 /** 034 * Copy constructor, this does deep copy for all the fields. 035 * 036 * @param obj 037 */ 038 public BoxEnterprise(BoxEnterprise obj) { 039 super(obj); 040 } 041 042 /** 043 * Instantiate the object from a map. Each entry in the map reflects to a field. 044 * 045 * @param map 046 */ 047 public BoxEnterprise(Map<String, Object> map) { 048 super(map); 049 } 050 051 private String name; 052 053 /** 054 * Get name of user's enterprise. 055 * 056 * @return name 057 */ 058 @JsonProperty(FIELD_NAME) 059 public String getName() { 060 return (String) getValue(FIELD_NAME); 061 } 062 063 /** 064 * Setter. This is only used by {@see <a href="http://jackson.codehaus .org">Jackson JSON processer</a>} 065 * 066 * @param name name 067 */ 068 069 @JsonProperty(FIELD_NAME) 070 private void setName(String name) { 071 put(FIELD_NAME, name); 072 } 073}