/** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package com.example.noInterfaces.simple; import commonj.sdo.Type; import java.io.Serializable; import java.math.BigDecimal; import java.util.Collection; import java.util.List; import org.apache.tuscany.sdo.impl.DataObjectBase; /** * * A representation of the model object 'Quote'. * * *
* The following features are supported: *
* If the meaning of the 'Symbol' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Symbol' attribute. * @see #isSetSymbol() * @see #unsetSymbol() * @see #setSymbol(String) * @generated */ public String getSymbol() { return symbol; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol Symbol}' attribute. * * * @param value the new value of the 'Symbol' attribute. * @see #isSetSymbol() * @see #unsetSymbol() * @see #getSymbol() * @generated */ public void setSymbol(String newSymbol) { String oldSymbol = symbol; symbol = newSymbol; boolean oldSymbol_set_ = symbol_set_; symbol_set_ = true; if (isNotifying()) notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol Symbol}' attribute. * * * @see #isSetSymbol() * @see #getSymbol() * @see #setSymbol(String) * @generated */ public void unsetSymbol() { String oldSymbol = symbol; boolean oldSymbol_set_ = symbol_set_; symbol = SYMBOL_DEFAULT_; symbol_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol Symbol}' attribute is set. * * * @return whether the value of the 'Symbol' attribute is set. * @see #unsetSymbol() * @see #getSymbol() * @see #setSymbol(String) * @generated */ public boolean isSetSymbol() { return symbol_set_; } /** * Returns the value of the 'Company Name' attribute. * ** If the meaning of the 'Company Name' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Company Name' attribute. * @see #isSetCompanyName() * @see #unsetCompanyName() * @see #setCompanyName(String) * @generated */ public String getCompanyName() { return companyName; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName Company Name}' attribute. * * * @param value the new value of the 'Company Name' attribute. * @see #isSetCompanyName() * @see #unsetCompanyName() * @see #getCompanyName() * @generated */ public void setCompanyName(String newCompanyName) { String oldCompanyName = companyName; companyName = newCompanyName; boolean oldCompanyName_set_ = companyName_set_; companyName_set_ = true; if (isNotifying()) notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName Company Name}' attribute. * * * @see #isSetCompanyName() * @see #getCompanyName() * @see #setCompanyName(String) * @generated */ public void unsetCompanyName() { String oldCompanyName = companyName; boolean oldCompanyName_set_ = companyName_set_; companyName = COMPANY_NAME_DEFAULT_; companyName_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName Company Name}' attribute is set. * * * @return whether the value of the 'Company Name' attribute is set. * @see #unsetCompanyName() * @see #getCompanyName() * @see #setCompanyName(String) * @generated */ public boolean isSetCompanyName() { return companyName_set_; } /** * Returns the value of the 'Price' attribute. * ** If the meaning of the 'Price' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Price' attribute. * @see #isSetPrice() * @see #unsetPrice() * @see #setPrice(BigDecimal) * @generated */ public BigDecimal getPrice() { return price; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice Price}' attribute. * * * @param value the new value of the 'Price' attribute. * @see #isSetPrice() * @see #unsetPrice() * @see #getPrice() * @generated */ public void setPrice(BigDecimal newPrice) { BigDecimal oldPrice = price; price = newPrice; boolean oldPrice_set_ = price_set_; price_set_ = true; if (isNotifying()) notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice Price}' attribute. * * * @see #isSetPrice() * @see #getPrice() * @see #setPrice(BigDecimal) * @generated */ public void unsetPrice() { BigDecimal oldPrice = price; boolean oldPrice_set_ = price_set_; price = PRICE_DEFAULT_; price_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice Price}' attribute is set. * * * @return whether the value of the 'Price' attribute is set. * @see #unsetPrice() * @see #getPrice() * @see #setPrice(BigDecimal) * @generated */ public boolean isSetPrice() { return price_set_; } /** * Returns the value of the 'Open1' attribute. * ** If the meaning of the 'Open1' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Open1' attribute. * @see #isSetOpen1() * @see #unsetOpen1() * @see #setOpen1(BigDecimal) * @generated */ public BigDecimal getOpen1() { return open1; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 Open1}' attribute. * * * @param value the new value of the 'Open1' attribute. * @see #isSetOpen1() * @see #unsetOpen1() * @see #getOpen1() * @generated */ public void setOpen1(BigDecimal newOpen1) { BigDecimal oldOpen1 = open1; open1 = newOpen1; boolean oldOpen1_set_ = open1_set_; open1_set_ = true; if (isNotifying()) notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 Open1}' attribute. * * * @see #isSetOpen1() * @see #getOpen1() * @see #setOpen1(BigDecimal) * @generated */ public void unsetOpen1() { BigDecimal oldOpen1 = open1; boolean oldOpen1_set_ = open1_set_; open1 = OPEN1_DEFAULT_; open1_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 Open1}' attribute is set. * * * @return whether the value of the 'Open1' attribute is set. * @see #unsetOpen1() * @see #getOpen1() * @see #setOpen1(BigDecimal) * @generated */ public boolean isSetOpen1() { return open1_set_; } /** * Returns the value of the 'High' attribute. * ** If the meaning of the 'High' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'High' attribute. * @see #isSetHigh() * @see #unsetHigh() * @see #setHigh(BigDecimal) * @generated */ public BigDecimal getHigh() { return high; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh High}' attribute. * * * @param value the new value of the 'High' attribute. * @see #isSetHigh() * @see #unsetHigh() * @see #getHigh() * @generated */ public void setHigh(BigDecimal newHigh) { BigDecimal oldHigh = high; high = newHigh; boolean oldHigh_set_ = high_set_; high_set_ = true; if (isNotifying()) notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh High}' attribute. * * * @see #isSetHigh() * @see #getHigh() * @see #setHigh(BigDecimal) * @generated */ public void unsetHigh() { BigDecimal oldHigh = high; boolean oldHigh_set_ = high_set_; high = HIGH_DEFAULT_; high_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh High}' attribute is set. * * * @return whether the value of the 'High' attribute is set. * @see #unsetHigh() * @see #getHigh() * @see #setHigh(BigDecimal) * @generated */ public boolean isSetHigh() { return high_set_; } /** * Returns the value of the 'Low' attribute. * ** If the meaning of the 'Low' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Low' attribute. * @see #isSetLow() * @see #unsetLow() * @see #setLow(BigDecimal) * @generated */ public BigDecimal getLow() { return low; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getLow Low}' attribute. * * * @param value the new value of the 'Low' attribute. * @see #isSetLow() * @see #unsetLow() * @see #getLow() * @generated */ public void setLow(BigDecimal newLow) { BigDecimal oldLow = low; low = newLow; boolean oldLow_set_ = low_set_; low_set_ = true; if (isNotifying()) notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getLow Low}' attribute. * * * @see #isSetLow() * @see #getLow() * @see #setLow(BigDecimal) * @generated */ public void unsetLow() { BigDecimal oldLow = low; boolean oldLow_set_ = low_set_; low = LOW_DEFAULT_; low_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getLow Low}' attribute is set. * * * @return whether the value of the 'Low' attribute is set. * @see #unsetLow() * @see #getLow() * @see #setLow(BigDecimal) * @generated */ public boolean isSetLow() { return low_set_; } /** * Returns the value of the 'Volume' attribute. * ** If the meaning of the 'Volume' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Volume' attribute. * @see #isSetVolume() * @see #unsetVolume() * @see #setVolume(double) * @generated */ public double getVolume() { return volume; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getVolume Volume}' attribute. * * * @param value the new value of the 'Volume' attribute. * @see #isSetVolume() * @see #unsetVolume() * @see #getVolume() * @generated */ public void setVolume(double newVolume) { double oldVolume = volume; volume = newVolume; boolean oldVolume_set_ = volume_set_; volume_set_ = true; if (isNotifying()) notify(ChangeKind.SET, VOLUME, oldVolume, volume, !oldVolume_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getVolume Volume}' attribute. * * * @see #isSetVolume() * @see #getVolume() * @see #setVolume(double) * @generated */ public void unsetVolume() { double oldVolume = volume; boolean oldVolume_set_ = volume_set_; volume = VOLUME_DEFAULT_; volume_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getVolume Volume}' attribute is set. * * * @return whether the value of the 'Volume' attribute is set. * @see #unsetVolume() * @see #getVolume() * @see #setVolume(double) * @generated */ public boolean isSetVolume() { return volume_set_; } /** * Returns the value of the 'Change1' attribute. * ** If the meaning of the 'Change1' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Change1' attribute. * @see #isSetChange1() * @see #unsetChange1() * @see #setChange1(double) * @generated */ public double getChange1() { return change1; } /** * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#getChange1 Change1}' attribute. * * * @param value the new value of the 'Change1' attribute. * @see #isSetChange1() * @see #unsetChange1() * @see #getChange1() * @generated */ public void setChange1(double newChange1) { double oldChange1 = change1; change1 = newChange1; boolean oldChange1_set_ = change1_set_; change1_set_ = true; if (isNotifying()) notify(ChangeKind.SET, CHANGE1, oldChange1, change1, !oldChange1_set_); } /** * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getChange1 Change1}' attribute. * * * @see #isSetChange1() * @see #getChange1() * @see #setChange1(double) * @generated */ public void unsetChange1() { double oldChange1 = change1; boolean oldChange1_set_ = change1_set_; change1 = CHANGE1_DEFAULT_; change1_set_ = false; if (isNotifying()) notify(ChangeKind.UNSET, CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_); } /** * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getChange1 Change1}' attribute is set. * * * @return whether the value of the 'Change1' attribute is set. * @see #unsetChange1() * @see #getChange1() * @see #setChange1(double) * @generated */ public boolean isSetChange1() { return change1_set_; } /** * Returns the value of the 'Quotes' containment reference list. * The list contents are of type {@link com.example.noInterfaces.simple.Quote}. * ** If the meaning of the 'Quotes' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Quotes' containment reference list. * @generated */ public List getQuotes() { if (quotes == null) { quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES); } return quotes; } /** * * * @generated */ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) { switch (propertyIndex) { case QUOTES: return removeFromList(getQuotes(), otherEnd, changeContext); } return super.inverseRemove(otherEnd, propertyIndex, changeContext); } /** * * * @generated */ public Object get(int propertyIndex, boolean resolve) { switch (propertyIndex) { case SYMBOL: return getSymbol(); case COMPANY_NAME: return getCompanyName(); case PRICE: return getPrice(); case OPEN1: return getOpen1(); case HIGH: return getHigh(); case LOW: return getLow(); case VOLUME: return new Double(getVolume()); case CHANGE1: return new Double(getChange1()); case QUOTES: return getQuotes(); } return super.get(propertyIndex, resolve); } /** * * * @generated */ public void set(int propertyIndex, Object newValue) { switch (propertyIndex) { case SYMBOL: setSymbol((String)newValue); return; case COMPANY_NAME: setCompanyName((String)newValue); return; case PRICE: setPrice((BigDecimal)newValue); return; case OPEN1: setOpen1((BigDecimal)newValue); return; case HIGH: setHigh((BigDecimal)newValue); return; case LOW: setLow((BigDecimal)newValue); return; case VOLUME: setVolume(((Double)newValue).doubleValue()); return; case CHANGE1: setChange1(((Double)newValue).doubleValue()); return; case QUOTES: getQuotes().clear(); getQuotes().addAll((Collection)newValue); return; } super.set(propertyIndex, newValue); } /** * * * @generated */ public void unset(int propertyIndex) { switch (propertyIndex) { case SYMBOL: unsetSymbol(); return; case COMPANY_NAME: unsetCompanyName(); return; case PRICE: unsetPrice(); return; case OPEN1: unsetOpen1(); return; case HIGH: unsetHigh(); return; case LOW: unsetLow(); return; case VOLUME: unsetVolume(); return; case CHANGE1: unsetChange1(); return; case QUOTES: getQuotes().clear(); return; } super.unset(propertyIndex); } /** * * * @generated */ public boolean isSet(int propertyIndex) { switch (propertyIndex) { case SYMBOL: return isSetSymbol(); case COMPANY_NAME: return isSetCompanyName(); case PRICE: return isSetPrice(); case OPEN1: return isSetOpen1(); case HIGH: return isSetHigh(); case LOW: return isSetLow(); case VOLUME: return isSetVolume(); case CHANGE1: return isSetChange1(); case QUOTES: return quotes != null && !quotes.isEmpty(); } return super.isSet(propertyIndex); } /** * * * @generated */ public String toString() { if (isProxy(this)) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (symbol: "); if (symbol_set_) result.append(symbol); else result.append("