Class PortfolioItemSummary

  • All Implemented Interfaces:
    java.io.Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class PortfolioItemSummary
    extends java.lang.Object
    implements org.joda.beans.ImmutableBean, java.io.Serializable
    A summary of a portfolio item.

    This can be used to display a summary of a portfolio to a user.

    See Also:
    Serialized Form
    • Method Detail

      • meta

        public static org.joda.beans.TypedMetaBean<PortfolioItemSummary> meta()
        The meta-bean for PortfolioItemSummary.
        Returns:
        the meta-bean, not null
      • of

        public static PortfolioItemSummary of​(StandardId id,
                                              PortfolioItemType portfolioItemType,
                                              ProductType productType,
                                              java.util.Set<Currency> currencies,
                                              java.lang.String description)
        Obtains an instance.
        Parameters:
        id - the value of the property
        portfolioItemType - the value of the property, not null
        productType - the value of the property, not null
        currencies - the value of the property, not null
        description - the value of the property, not blank
        Returns:
        the instance
      • builder

        public static PortfolioItemSummary.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public org.joda.beans.TypedMetaBean<PortfolioItemSummary> metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getId

        public java.util.Optional<StandardId> getId()
        Gets the identifier of the item, optional.
        Returns:
        the optional value of the property, not null
      • getPortfolioItemType

        public PortfolioItemType getPortfolioItemType()
        Gets the type of the item.
        Returns:
        the value of the property, not null
      • getProductType

        public ProductType getProductType()
        Gets the type of the product.
        Returns:
        the value of the property, not null
      • getCurrencies

        public ImmutableSet<Currency> getCurrencies()
        Gets the currencies of the item.

        This should include the primary currencies the item is based on, not just the payment currencies.

        Returns:
        the value of the property, not null
      • getDescription

        public java.lang.String getDescription()
        Gets the description of the item.
        Returns:
        the value of the property, not blank
      • toBuilder

        public PortfolioItemSummary.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object