public class

PortfolioData

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.finance.PortfolioData

Class Overview

Data for the portfolio.

Summary

Constants
String CURRENCYCODE XML "currencyCode" attribute name
String GAINPERCENTAGE XML "gainPercentage" attribute name
String RETURN1W XML "return1w" attribute name
String RETURN1Y XML "return1y" attribute name
String RETURN3M XML "return3m" attribute name
String RETURN3Y XML "return3y" attribute name
String RETURN4W XML "return4w" attribute name
String RETURN5Y XML "return5y" attribute name
String RETURNOVERALL XML "returnOverall" attribute name
String RETURNYTD XML "returnYTD" attribute name
String XML_NAME XML element name
Fields
private String currencyCode ISO4217 currency code
private Double gainPercentage Percentage gain
private Double return1w 1 week return (percentage)
private Double return1y 1 year return (percentage)
private Double return3m 3 month return (percentage)
private Double return3y 3 year return (percentage)
private Double return4w 4 week return (percentage)
private Double return5y 5 year return (percentage)
private Double returnOverall Overall return (percentage)
private Double returnYTD Year-to-date return (percentage)
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
PortfolioData()
Default mutable constructor.
PortfolioData(String currencyCode, Double gainPercentage, Double return1w, Double return1y, Double return3m, Double return3y, Double return4w, Double return5y, Double returnOverall, Double returnYTD)
Immutable constructor.
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
CostBasis getCostBasis()
Returns the cost basis of the portfolio in the portfolio default currency.
String getCurrencyCode()
Returns the ISO4217 currency code.
DaysGain getDaysGain()
Returns the today's gain for the portfolio in the portfolio default currency.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
Gain getGain()
Returns the gain for the portfolio in the portfolio default currency.
Double getGainPercentage()
Returns the percentage gain.
MarketValue getMarketValue()
Returns the market value of the portfolio in the portfolio default currency.
Double getReturn1w()
Returns the 1 week return (percentage).
Double getReturn1y()
Returns the 1 year return (percentage).
Double getReturn3m()
Returns the 3 month return (percentage).
Double getReturn3y()
Returns the 3 year return (percentage).
Double getReturn4w()
Returns the 4 week return (percentage).
Double getReturn5y()
Returns the 5 year return (percentage).
Double getReturnOverall()
Returns the overall return (percentage).
Double getReturnYTD()
Returns the Year-to-date return (percentage).
boolean hasCostBasis()
Returns whether it has the cost basis of the portfolio in the portfolio default currency.
boolean hasCurrencyCode()
Returns whether it has the ISO4217 currency code.
boolean hasDaysGain()
Returns whether it has the today's gain for the portfolio in the portfolio default currency.
boolean hasGain()
Returns whether it has the gain for the portfolio in the portfolio default currency.
boolean hasGainPercentage()
Returns whether it has the percentage gain.
boolean hasMarketValue()
Returns whether it has the market value of the portfolio in the portfolio default currency.
boolean hasReturn1w()
Returns whether it has the 1 week return (percentage).
boolean hasReturn1y()
Returns whether it has the 1 year return (percentage).
boolean hasReturn3m()
Returns whether it has the 3 month return (percentage).
boolean hasReturn3y()
Returns whether it has the 3 year return (percentage).
boolean hasReturn4w()
Returns whether it has the 4 week return (percentage).
boolean hasReturn5y()
Returns whether it has the 5 year return (percentage).
boolean hasReturnOverall()
Returns whether it has the overall return (percentage).
boolean hasReturnYTD()
Returns whether it has the Year-to-date return (percentage).
void setCostBasis(CostBasis costBasis)
Sets the cost basis of the portfolio in the portfolio default currency.
void setCurrencyCode(String currencyCode)
Sets the ISO4217 currency code.
void setDaysGain(DaysGain daysGain)
Sets the today's gain for the portfolio in the portfolio default currency.
void setGain(Gain gain)
Sets the gain for the portfolio in the portfolio default currency.
void setGainPercentage(Double gainPercentage)
Sets the percentage gain.
void setMarketValue(MarketValue marketValue)
Sets the market value of the portfolio in the portfolio default currency.
void setReturn1w(Double return1w)
Sets the 1 week return (percentage).
void setReturn1y(Double return1y)
Sets the 1 year return (percentage).
void setReturn3m(Double return3m)
Sets the 3 month return (percentage).
void setReturn3y(Double return3y)
Sets the 3 year return (percentage).
void setReturn4w(Double return4w)
Sets the 4 week return (percentage).
void setReturn5y(Double return5y)
Sets the 5 year return (percentage).
void setReturnOverall(Double returnOverall)
Sets the overall return (percentage).
void setReturnYTD(Double returnYTD)
Sets the Year-to-date return (percentage).
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String CURRENCYCODE

XML "currencyCode" attribute name

Constant Value: "currencyCode"

private static final String GAINPERCENTAGE

XML "gainPercentage" attribute name

Constant Value: "gainPercentage"

private static final String RETURN1W

XML "return1w" attribute name

Constant Value: "return1w"

private static final String RETURN1Y

XML "return1y" attribute name

Constant Value: "return1y"

private static final String RETURN3M

XML "return3m" attribute name

Constant Value: "return3m"

private static final String RETURN3Y

XML "return3y" attribute name

Constant Value: "return3y"

private static final String RETURN4W

XML "return4w" attribute name

Constant Value: "return4w"

private static final String RETURN5Y

XML "return5y" attribute name

Constant Value: "return5y"

private static final String RETURNOVERALL

XML "returnOverall" attribute name

Constant Value: "returnOverall"

private static final String RETURNYTD

XML "returnYTD" attribute name

Constant Value: "returnYTD"

static final String XML_NAME

XML element name

Constant Value: "portfolioData"

Fields

private String currencyCode

ISO4217 currency code

private Double gainPercentage

Percentage gain

private Double return1w

1 week return (percentage)

private Double return1y

1 year return (percentage)

private Double return3m

3 month return (percentage)

private Double return3y

3 year return (percentage)

private Double return4w

4 week return (percentage)

private Double return5y

5 year return (percentage)

private Double returnOverall

Overall return (percentage)

private Double returnYTD

Year-to-date return (percentage)

Public Constructors

public PortfolioData ()

Default mutable constructor.

public PortfolioData (String currencyCode, Double gainPercentage, Double return1w, Double return1y, Double return3m, Double return3y, Double return4w, Double return5y, Double returnOverall, Double returnYTD)

Immutable constructor.

Parameters
currencyCode ISO4217 currency code.
gainPercentage Percentage gain.
return1w 1 week return (percentage).
return1y 1 year return (percentage).
return3m 3 month return (percentage).
return3y 3 year return (percentage).
return4w 4 week return (percentage).
return5y 5 year return (percentage).
returnOverall Overall return (percentage).
returnYTD Year-to-date return (percentage).

Public Methods

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public CostBasis getCostBasis ()

Returns the cost basis of the portfolio in the portfolio default currency.

Returns
  • cost basis of the portfolio in the portfolio default currency

public String getCurrencyCode ()

Returns the ISO4217 currency code.

Returns
  • ISO4217 currency code

public DaysGain getDaysGain ()

Returns the today's gain for the portfolio in the portfolio default currency.

Returns
  • today's gain for the portfolio in the portfolio default currency

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

public Gain getGain ()

Returns the gain for the portfolio in the portfolio default currency.

Returns
  • gain for the portfolio in the portfolio default currency

public Double getGainPercentage ()

Returns the percentage gain.

Returns
  • percentage gain

public MarketValue getMarketValue ()

Returns the market value of the portfolio in the portfolio default currency.

Returns
  • market value of the portfolio in the portfolio default currency

public Double getReturn1w ()

Returns the 1 week return (percentage).

Returns
  • 1 week return (percentage)

public Double getReturn1y ()

Returns the 1 year return (percentage).

Returns
  • 1 year return (percentage)

public Double getReturn3m ()

Returns the 3 month return (percentage).

Returns
  • 3 month return (percentage)

public Double getReturn3y ()

Returns the 3 year return (percentage).

Returns
  • 3 year return (percentage)

public Double getReturn4w ()

Returns the 4 week return (percentage).

Returns
  • 4 week return (percentage)

public Double getReturn5y ()

Returns the 5 year return (percentage).

Returns
  • 5 year return (percentage)

public Double getReturnOverall ()

Returns the overall return (percentage).

Returns
  • overall return (percentage)

public Double getReturnYTD ()

Returns the Year-to-date return (percentage).

Returns
  • Year-to-date return (percentage)

public boolean hasCostBasis ()

Returns whether it has the cost basis of the portfolio in the portfolio default currency.

Returns
  • whether it has the cost basis of the portfolio in the portfolio default currency

public boolean hasCurrencyCode ()

Returns whether it has the ISO4217 currency code.

Returns
  • whether it has the ISO4217 currency code

public boolean hasDaysGain ()

Returns whether it has the today's gain for the portfolio in the portfolio default currency.

Returns
  • whether it has the today's gain for the portfolio in the portfolio default currency

public boolean hasGain ()

Returns whether it has the gain for the portfolio in the portfolio default currency.

Returns
  • whether it has the gain for the portfolio in the portfolio default currency

public boolean hasGainPercentage ()

Returns whether it has the percentage gain.

Returns
  • whether it has the percentage gain

public boolean hasMarketValue ()

Returns whether it has the market value of the portfolio in the portfolio default currency.

Returns
  • whether it has the market value of the portfolio in the portfolio default currency

public boolean hasReturn1w ()

Returns whether it has the 1 week return (percentage).

Returns
  • whether it has the 1 week return (percentage)

public boolean hasReturn1y ()

Returns whether it has the 1 year return (percentage).

Returns
  • whether it has the 1 year return (percentage)

public boolean hasReturn3m ()

Returns whether it has the 3 month return (percentage).

Returns
  • whether it has the 3 month return (percentage)

public boolean hasReturn3y ()

Returns whether it has the 3 year return (percentage).

Returns
  • whether it has the 3 year return (percentage)

public boolean hasReturn4w ()

Returns whether it has the 4 week return (percentage).

Returns
  • whether it has the 4 week return (percentage)

public boolean hasReturn5y ()

Returns whether it has the 5 year return (percentage).

Returns
  • whether it has the 5 year return (percentage)

public boolean hasReturnOverall ()

Returns whether it has the overall return (percentage).

Returns
  • whether it has the overall return (percentage)

public boolean hasReturnYTD ()

Returns whether it has the Year-to-date return (percentage).

Returns
  • whether it has the Year-to-date return (percentage)

public void setCostBasis (CostBasis costBasis)

Sets the cost basis of the portfolio in the portfolio default currency.

Parameters
costBasis Cost basis of the portfolio in the portfolio default currency or null to reset

public void setCurrencyCode (String currencyCode)

Sets the ISO4217 currency code.

Parameters
currencyCode ISO4217 currency code or null to reset

public void setDaysGain (DaysGain daysGain)

Sets the today's gain for the portfolio in the portfolio default currency.

Parameters
daysGain Today's gain for the portfolio in the portfolio default currency or null to reset

public void setGain (Gain gain)

Sets the gain for the portfolio in the portfolio default currency.

Parameters
gain Gain for the portfolio in the portfolio default currency or null to reset

public void setGainPercentage (Double gainPercentage)

Sets the percentage gain.

Parameters
gainPercentage Percentage gain or null to reset

public void setMarketValue (MarketValue marketValue)

Sets the market value of the portfolio in the portfolio default currency.

Parameters
marketValue Market value of the portfolio in the portfolio default currency or null to reset

public void setReturn1w (Double return1w)

Sets the 1 week return (percentage).

Parameters
return1w 1 week return (percentage) or null to reset

public void setReturn1y (Double return1y)

Sets the 1 year return (percentage).

Parameters
return1y 1 year return (percentage) or null to reset

public void setReturn3m (Double return3m)

Sets the 3 month return (percentage).

Parameters
return3m 3 month return (percentage) or null to reset

public void setReturn3y (Double return3y)

Sets the 3 year return (percentage).

Parameters
return3y 3 year return (percentage) or null to reset

public void setReturn4w (Double return4w)

Sets the 4 week return (percentage).

Parameters
return4w 4 week return (percentage) or null to reset

public void setReturn5y (Double return5y)

Sets the 5 year return (percentage).

Parameters
return5y 5 year return (percentage) or null to reset

public void setReturnOverall (Double returnOverall)

Sets the overall return (percentage).

Parameters
returnOverall Overall return (percentage) or null to reset

public void setReturnYTD (Double returnYTD)

Sets the Year-to-date return (percentage).

Parameters
returnYTD Year-to-date return (percentage) or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.