Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * #%L
   * BroadleafCommerce Framework
   * %%
   * Copyright (C) 2009 - 2013 Broadleaf Commerce
   * %%
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * 
  *       http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * #L%
  */
 package org.broadleafcommerce.core.payment.domain;
 
 
 import java.util.Date;
 

Deprecated:
- payment logs should now be captured as raw responses in Payment Transaction line items
 
 @Table(name = "BLC_PAYMENT_LOG")
 public class PaymentLogImpl implements PaymentLog {
 
     private static final long serialVersionUID = 1L;
 
     @Id
     @GeneratedValue(generator = "PaymentLogId")
     @GenericGenerator(
         name="PaymentLogId",
         strategy="org.broadleafcommerce.common.persistence.IdOverrideTableGenerator",
         parameters = {
             @Parameter(name="segment_value", value="PaymentLogImpl"),
             @Parameter(name="entity_name", value="org.broadleafcommerce.core.payment.domain.PaymentLogImpl")
         }
     )
     @Column(name = "PAYMENT_LOG_ID")
     protected Long id;
 
     @Column(name = "USER_NAME", nullable=false)
     @Index(name="PAYMENTLOG_USER_INDEX", columnNames={"USER_NAME"})
     @AdminPresentation(friendlyName = "PaymentLogImpl_User_Name", order = 1, group = "PaymentLogImpl_Payment_Log", readOnly = true)
     protected String userName;
 
     @Column(name = "TRANSACTION_TIMESTAMP", nullable=false)
     @AdminPresentation(friendlyName = "PaymentLogImpl_Transaction_Time", order = 3, group = "PaymentLogImpl_Payment_Log", readOnly = true)
     protected Date transactionTimestamp;
 
     @Column(name = "ORDER_PAYMENT_ID")
     @Index(name="PAYMENTLOG_ORDERPAYMENT_INDEX", columnNames={"ORDER_PAYMENT_ID"})
     @AdminPresentation(excluded = true, readOnly = true)
     protected Long orderPaymentId;
 
     @ManyToOne(targetEntity = CustomerImpl.class)
     @JoinColumn(name = "CUSTOMER_ID")
     @Index(name="PAYMENTLOG_CUSTOMER_INDEX", columnNames={"CUSTOMER_ID"})
     protected Customer customer;
 
     @Column(name = "ORDER_PAYMENT_REF_NUM")
     @Index(name="PAYMENTLOG_REFERENCE_INDEX", columnNames={"ORDER_PAYMENT_REFERENCE_NUMBER"})
     @AdminPresentation(friendlyName = "PaymentLogImpl_Payment_Ref_Number", order = 4, group = "PaymentLogImpl_Payment_Log", readOnly = true)
     protected String orderPaymentReferenceNumber;
 
     @Column(name = "TRANSACTION_TYPE", nullable=false)
    @Index(name="PAYMENTLOG_TRANTYPE_INDEX", columnNames={"TRANSACTION_TYPE"})
    @AdminPresentation(friendlyName = "PaymentLogImpl_Transaction_Type", order = 5, group = "PaymentLogImpl_Payment_Log", readOnly = true)
    protected String transactionType;
    @Column(name = "TRANSACTION_SUCCESS")
    @AdminPresentation(friendlyName = "PaymentLogImpl_Transaction_Successfule", order = 6, group = "PaymentLogImpl_Payment_Log", readOnly = true)
    protected Boolean transactionSuccess = false;
    @Column(name = "EXCEPTION_MESSAGE")
    @AdminPresentation(friendlyName = "PaymentLogImpl_Exception_Message", order = 7, group = "PaymentLogImpl_Payment_Log", readOnly = true)
    protected String exceptionMessage;
    @Column(name = "LOG_TYPE", nullable=false)
    @Index(name="PAYMENTLOG_LOGTYPE_INDEX", columnNames={"LOG_TYPE"})
    @AdminPresentation(friendlyName = "PaymentLogImpl_Type", order = 8, group = "PaymentLogImpl_Payment_Log", readOnly = true)
    protected String logType;
    @Column(name = "AMOUNT_PAID", precision=19, scale=5)
    @AdminPresentation(friendlyName = "PaymentLogImpl_Amount", order = 2, group = "PaymentLogImpl_Payment_Log", readOnly = true)
    protected BigDecimal amountPaid;
    @ManyToOne(targetEntity = BroadleafCurrencyImpl.class)
    @JoinColumn(name = "CURRENCY_CODE")
    @AdminPresentation(friendlyName = "PaymentLogImpl_currency", order = 2, group = "PaymentLogImpl_Payment_Log", readOnly = true)
    protected BroadleafCurrency currency;
    
    
    @Override
    public Long getId() {
        return ;
    }
    @Override
    public void setId(Long id) {
        this. = id;
    }
    @Override
    public String getUserName() {
        return ;
    }
    @Override
    public void setUserName(String userName) {
        this. = userName;
    }
    @Override
    public Date getTransactionTimestamp() {
        return ;
    }
    @Override
    public void setTransactionTimestamp(Date transactionTimestamp) {
        this. = transactionTimestamp;
    }
    @Override
    public Long getPaymentInfoId() {
        return ;
    }
    @Override
    public void setPaymentInfoId(Long paymentInfoId) {
        this. = paymentInfoId;
    }
    @Override
    public Customer getCustomer() {
        return ;
    }
    @Override
    public void setCustomer(Customer customer) {
        this. = customer;
    }
    @Override
        return ;
    }
    @Override
    public void setPaymentInfoReferenceNumber(String paymentInfoReferenceNumber) {
        this. = paymentInfoReferenceNumber;
    }
    @Override
        return PaymentTransactionType.getInstance();
    }
    @Override
    public void setTransactionType(PaymentTransactionType transactionType) {
        this. = transactionType.getType();
    }
    @Override
    public PaymentLogEventType getLogType() {
        return PaymentLogEventType.getInstance();
    }
    @Override
    public void setLogType(PaymentLogEventType logType) {
        this. = logType.getType();
    }
    @Override
    public Boolean getTransactionSuccess() {
        if ( == null) {
            return .;
        } else {
            return ;
        }
    }
    @Override
    public void setTransactionSuccess(Boolean transactionSuccess) {
        this. = transactionSuccess;
    }
    @Override
    public String getExceptionMessage() {
        return ;
    }
    @Override
    public void setExceptionMessage(String exceptionMessage) {
        this. = exceptionMessage;
    }
    @Override
    public Money getAmountPaid() {
        return BroadleafCurrencyUtils.getMoney();
    }
    @Override
    public void setAmountPaid(Money amountPaid) {
        this. = Money.toAmount(amountPaid);
    }
    @Override
    public BroadleafCurrency getCurrency() {
        return ;
    }
    @Override
    public void setCurrency(BroadleafCurrency currency) {
        this. = currency;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (( == null) ? 0 : .hashCode());
        result = prime * result + (( == null) ? 0 : .hashCode());
        result = prime * result + (( == null) ? 0 : .hashCode());
        result = prime * result + (( == null) ? 0 : .hashCode());
        result = prime * result + (( == null) ? 0 : .hashCode());
        return result;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        PaymentLogImpl other = (PaymentLogImplobj;
        if ( != null && other.id != null) {
            return .equals(other.id);
        }
        if ( == null) {
            if (other.customer != null) {
                return false;
            }
        } else if (!.equals(other.customer)) {
            return false;
        }
        if ( == null) {
            if (other.orderPaymentId != null) {
                return false;
            }
        } else if (!.equals(other.orderPaymentId)) {
            return false;
        }
        if ( == null) {
            if (other.orderPaymentReferenceNumber != null) {
                return false;
            }
        } else if (!.equals(other.orderPaymentReferenceNumber)) {
            return false;
        }
        if ( == null) {
            if (other.transactionTimestamp != null) {
                return false;
            }
        } else if (!.equals(other.transactionTimestamp)) {
            return false;
        }
        if ( == null) {
            if (other.userName != null) {
                return false;
            }
        } else if (!.equals(other.userName)) {
            return false;
        }
        return true;
    }
New to GrepCode? Check out our FAQ X