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

com.ebay.sdk.attributes.model.Attribute Maven / Gradle / Ivy

There is a newer version: 939.0.0
Show newest version
/*
Copyright (c) 2013 eBay, Inc.
This program is licensed under the terms of the eBay Common Development and
Distribution License (CDDL) Version 1.0 (the "License") and any subsequent  version 
thereof released by eBay.  The then-current version of the License can be found 
at http://www.opensource.org/licenses/cddl1.php and in the eBaySDKLicense file that 
is under the eBay SDK ../docs directory.
*/

package com.ebay.sdk.attributes.model;

import com.ebay.soap.eBLBaseComponents.AttributeType;
import com.ebay.soap.eBLBaseComponents.ValType;

/**
 * Wraps eBL AttributeType.
 * 

Title: AttributesLib for Java

*

Description:

*

Copyright: Copyright (c) 2004

*

Company: eBay Inc.

* @author Weijun Li * @version 1.0 */ public class Attribute extends AttributeType { private int type; //WEIJUN_TODO int SType; /** * Constructor. */ public Attribute() { } /** * Sets the type of the attribute. See AttributeType. * @param type int */ public void setType(int type) { this.type = type; } /** * Gets the type of the attribute. See AttributeType. * @return int */ public int getType() { return type; } /** * Adds to value list of the attribute. * @param val Value */ public void addValue(Value val) { ValType[] vals = this.getValue(); ValType[] newVals = new ValType[((vals == null) ? 0 : vals.length) + 1]; int i = 0; if( vals != null ) { for (i = 0; i < vals.length; i++) { newVals[i] = vals[i]; } } newVals[i] = val; this.setValue(newVals); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy