Class PortfolioItemSummary

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

    public final class PortfolioItemSummary
    extends Object
    implements Described, org.joda.beans.ImmutableBean, 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,
                                              Set<Currency> currencies,
                                              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 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 String getDescription()
        Gets the description of the item.
        Specified by:
        getDescription in interface Described
        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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object