All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intuit.ipp.data.Money Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2017 Intuit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2017.07.10 at 10:56:50 AM PDT 
//


package com.intuit.ipp.data;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * 
 * 				Product: ALL
 * 				Description: Monetary value represented with as a currency code and decimal value. Moneyis always associated with another IntuitEntity and will not be manipulated as a standalone hence it is not extended from IntuitEntity.
 * 			
 * 
 * 

Java class for Money complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Money">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="CurCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Money", propOrder = { "curCode", "amount" }) public class Money implements Serializable, Equals2, HashCode2 { private final static long serialVersionUID = 1L; @XmlElement(name = "CurCode") protected String curCode; @XmlElement(name = "Amount") protected BigDecimal amount; /** * Gets the value of the curCode property. * * @return * possible object is * {@link String } * */ public String getCurCode() { return curCode; } /** * Sets the value of the curCode property. * * @param value * allowed object is * {@link String } * */ public void setCurCode(String value) { this.curCode = value; } /** * Gets the value of the amount property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getAmount() { return amount; } /** * Sets the value of the amount property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setAmount(BigDecimal value) { this.amount = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final Money that = ((Money) object); { String lhsCurCode; lhsCurCode = this.getCurCode(); String rhsCurCode; rhsCurCode = that.getCurCode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "curCode", lhsCurCode), LocatorUtils.property(thatLocator, "curCode", rhsCurCode), lhsCurCode, rhsCurCode, (this.curCode!= null), (that.curCode!= null))) { return false; } } { BigDecimal lhsAmount; lhsAmount = this.getAmount(); BigDecimal rhsAmount; rhsAmount = that.getAmount(); if (!strategy.equals(LocatorUtils.property(thisLocator, "amount", lhsAmount), LocatorUtils.property(thatLocator, "amount", rhsAmount), lhsAmount, rhsAmount, (this.amount!= null), (that.amount!= null))) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theCurCode; theCurCode = this.getCurCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "curCode", theCurCode), currentHashCode, theCurCode, (this.curCode!= null)); } { BigDecimal theAmount; theAmount = this.getAmount(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "amount", theAmount), currentHashCode, theAmount, (this.amount!= null)); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy