1 /* 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package com.oracle.xmlns.internal.webservices.jaxws_databinding; 27 import javax.xml.bind.annotation.XmlAccessType; 28 import javax.xml.bind.annotation.XmlAccessorType; 29 import javax.xml.bind.annotation.XmlAttribute; 30 import javax.xml.bind.annotation.XmlRootElement; 31 import javax.xml.bind.annotation.XmlType; 32 import javax.xml.ws.soap.MTOM; 33 import java.lang.annotation.Annotation; 34 35 import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; 36 37 38 /** 39 * This file was generated by JAXB-RI v2.2.6 and afterwards modified 40 * to implement appropriate Annotation 41 * 42 * <p>Java class for anonymous complex type. 43 * 44 * <p>The following schema fragment specifies the expected content contained within this class. 45 * 46 * <pre> 47 * <complexType> 48 * <complexContent> 49 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 50 * <attribute name="enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> 51 * <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}int" default="0" /> 52 * </restriction> 53 * </complexContent> 54 * </complexType> 55 * </pre> 56 * 57 * 58 */ 59 @XmlAccessorType(XmlAccessType.FIELD) 60 @XmlType(name = "") 61 @XmlRootElement(name = "mtom") 62 public class XmlMTOM implements MTOM { 63 64 @XmlAttribute(name = "enabled") 65 protected Boolean enabled; 66 @XmlAttribute(name = "threshold") 67 protected Integer threshold; 68 69 /** 70 * Gets the value of the enabled property. 71 * 72 * @return 73 * possible object is 74 * {@link Boolean } 75 * 76 */ 77 public boolean isEnabled() { 78 if (enabled == null) { 79 return true; 80 } else { 81 return enabled; 82 } 83 } 84 85 /** 86 * Sets the value of the enabled property. 87 * 88 * @param value 89 * allowed object is 90 * {@link Boolean } 91 * 92 */ 93 public void setEnabled(Boolean value) { 94 this.enabled = value; 95 } 96 97 /** 98 * Gets the value of the threshold property. 99 * 100 * @return 101 * possible object is 102 * {@link Integer } 103 * 104 */ 105 public int getThreshold() { 106 if (threshold == null) { 107 return 0; 108 } else { 109 return threshold; 110 } 111 } 112 113 /** 114 * Sets the value of the threshold property. 115 * 116 * @param value 117 * allowed object is 118 * {@link Integer } 119 * 120 */ 121 public void setThreshold(Integer value) { 122 this.threshold = value; 123 } 124 125 @Override 126 public boolean enabled() { 127 return nullSafe(enabled, Boolean.TRUE); 128 } 129 130 @Override 131 public int threshold() { 132 return nullSafe(threshold, 0); 133 } 134 135 @Override 136 public Class<? extends Annotation> annotationType() { 137 return MTOM.class; 138 } 139 }