java.lang.Object
com.broadleafcommerce.paymenttransaction.provider.jpa.domain.JpaPayment
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.money.CurrencyProvider, com.broadleafcommerce.data.tracking.core.TenantTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>, com.broadleafcommerce.data.tracking.core.Trackable, com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>, Serializable, javax.money.CurrencySupplier

@Entity @TrackableExtension(TENANT) public class JpaPayment extends Object implements com.broadleafcommerce.data.tracking.core.TenantTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>, Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.money.CurrencyProvider, javax.money.CurrencySupplier
See Also:
  • Constructor Details

    • JpaPayment

      public JpaPayment()
  • Method Details

    • getAmount

      public javax.money.MonetaryAmount getAmount()
    • setAmount

      public void setAmount(javax.money.MonetaryAmount amount)
    • getSubtotal

      public javax.money.MonetaryAmount getSubtotal()
    • setSubtotal

      public void setSubtotal(javax.money.MonetaryAmount subtotal)
    • getAdjustmentsTotal

      public javax.money.MonetaryAmount getAdjustmentsTotal()
    • setAdjustmentsTotal

      public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal)
    • getFulfillmentTotal

      public javax.money.MonetaryAmount getFulfillmentTotal()
    • setFulfillmentTotal

      public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal)
    • getFeesTotal

      public javax.money.MonetaryAmount getFeesTotal()
    • setFeesTotal

      public void setFeesTotal(javax.money.MonetaryAmount feesTotal)
    • getTaxTotal

      public javax.money.MonetaryAmount getTaxTotal()
    • setTaxTotal

      public void setTaxTotal(javax.money.MonetaryAmount taxTotal)
    • getIncludedTaxTotal

      public javax.money.MonetaryAmount getIncludedTaxTotal()
    • setIncludedTaxTotal

      public void setIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal)
    • getBusinessDomainType

      public Class<?> getBusinessDomainType()
      Specified by:
      getBusinessDomainType in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
    • fromMe

      @NonNull public org.modelmapper.ModelMapper fromMe()
      Specified by:
      fromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • toMe

      @NonNull public org.modelmapper.ModelMapper toMe()
      Specified by:
      toMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • preFromMe

      public void preFromMe(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @NonNull Object businessDomain)
      Specified by:
      preFromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • getContextId

      public String getContextId()
      The JPA primary key.
      Specified by:
      getContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      Returns:
      the jpa primary key
    • getOwnerType

      public String getOwnerType()
      See Also:
    • getOwnerId

      public String getOwnerId()
      See Also:
    • getOwningUserType

      public String getOwningUserType()
      See Also:
    • getOwningUserId

      public String getOwningUserId()
      See Also:
    • getOwningUserName

      public String getOwningUserName()
      See Also:
    • getOwningUserEmailAddress

      public String getOwningUserEmailAddress()
      See Also:
    • getCustomerId

      public String getCustomerId()
      See Also:
    • isCustomerRegistered

      public boolean isCustomerRegistered()
      See Also:
    • getAccessRestrictions

      public List<String> getAccessRestrictions()
      See Also:
    • getName

      public String getName()
      See Also:
    • getSavedPaymentMethodId

      public String getSavedPaymentMethodId()
      See Also:
    • getType

      public String getType()
      See Also:
    • getGatewayType

      public String getGatewayType()
      See Also:
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      The currency that is used to convert between a MonetaryAmount and a BigDecimal value.
      Specified by:
      getCurrency in interface javax.money.CurrencySupplier
    • getAddressesByType

      public Map<String,Address> getAddressesByType()
      See Also:
    • getPaymentMethodProperties

      public Map<String,String> getPaymentMethodProperties()
      See Also:
    • getAttributes

      public Map<String,Object> getAttributes()
      See Also:
    • getDisplayAttributes

      public Map<String,Object> getDisplayAttributes()
      See Also:
    • getTransactions

      public List<JpaPaymentTransaction> getTransactions()
      See Also:
    • isSingleUsePaymentMethod

      public boolean isSingleUsePaymentMethod()
      See Also:
    • isShouldSavePaymentToCustomer

      @Deprecated public boolean isShouldSavePaymentToCustomer()
      Deprecated.
      since 1.0.2, in favor of shouldSavePaymentForFutureUse to support owning user types other than a customer (i.e. account).
      See Also:
    • isShouldSavePaymentForFutureUse

      public boolean isShouldSavePaymentForFutureUse()
      See Also:
    • getTracking

      public com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking getTracking()
      Specified by:
      getTracking in interface com.broadleafcommerce.data.tracking.core.Trackable
      Returns:
      the TenantJpaTracking information for this
      See Also:
      • TenantJpaTracking
    • getVersion

      public int getVersion()
      The JPA managed version of this payment. This should not be modified by application code. See JPA's @Version.
    • setContextId

      public void setContextId(String contextId)
      The JPA primary key.
      Specified by:
      setContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      Parameters:
      _id - the jpa primary key
    • setOwnerType

      public void setOwnerType(String ownerType)
      See Also:
    • setOwnerId

      public void setOwnerId(String ownerId)
      See Also:
    • setOwningUserType

      public void setOwningUserType(String owningUserType)
      See Also:
    • setOwningUserId

      public void setOwningUserId(String owningUserId)
      See Also:
    • setOwningUserName

      public void setOwningUserName(String owningUserName)
      See Also:
    • setOwningUserEmailAddress

      public void setOwningUserEmailAddress(String owningUserEmailAddress)
      See Also:
    • setCustomerId

      public void setCustomerId(String customerId)
      See Also:
    • setCustomerRegistered

      public void setCustomerRegistered(boolean isCustomerRegistered)
      See Also:
    • setAccessRestrictions

      public void setAccessRestrictions(List<String> accessRestrictions)
      See Also:
    • setName

      public void setName(String name)
      See Also:
    • setSavedPaymentMethodId

      public void setSavedPaymentMethodId(String savedPaymentMethodId)
      See Also:
    • setType

      public void setType(String type)
      See Also:
    • setGatewayType

      public void setGatewayType(String gatewayType)
      See Also:
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      The currency that is used to convert between a MonetaryAmount and a BigDecimal value.
    • setAddressesByType

      public void setAddressesByType(Map<String,Address> addressesByType)
      See Also:
    • setPaymentMethodProperties

      public void setPaymentMethodProperties(Map<String,String> paymentMethodProperties)
      See Also:
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      See Also:
    • setDisplayAttributes

      public void setDisplayAttributes(Map<String,Object> displayAttributes)
      See Also:
    • setTransactions

      public void setTransactions(List<JpaPaymentTransaction> transactions)
      See Also:
    • setSingleUsePaymentMethod

      public void setSingleUsePaymentMethod(boolean isSingleUsePaymentMethod)
      See Also:
    • setShouldSavePaymentToCustomer

      @Deprecated public void setShouldSavePaymentToCustomer(boolean shouldSavePaymentToCustomer)
      Deprecated.
      since 1.0.2, in favor of shouldSavePaymentForFutureUse to support owning user types other than a customer (i.e. account).
      See Also:
    • setShouldSavePaymentForFutureUse

      public void setShouldSavePaymentForFutureUse(boolean shouldSavePaymentForFutureUse)
      See Also:
    • setTracking

      public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking tracking)
      Specified by:
      setTracking in interface com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>
      Parameters:
      tracking - the TenantJpaTracking information for this
      See Also:
      • TenantJpaTracking
    • setVersion

      public void setVersion(int version)
      The JPA managed version of this payment. This should not be modified by application code. See JPA's @Version.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object