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.secure;
 
 

Author(s):
jfischer
 
 @Table(name = "BLC_BANK_ACCOUNT_PAYMENT")
 public class BankAccountPaymentImpl implements BankAccountPayment {
 
     private static final long serialVersionUID = 1L;

    
Rather than constructing directly, use SecureOrderPaymentService#create(org.broadleafcommerce.core.payment.service.type.PaymentType ) so that the appropriate org.broadleafcommerce.common.encryption.EncryptionModule can be hooked up to this entity
 
     protected BankAccountPaymentImpl() {
         //do not allow direct instantiation -- must at least be package private for bytecode instrumentation
         //this complies with JPA specification requirements for entity construction
     }
 
     @Transient
     protected EncryptionModule encryptionModule;
 
     @Id
     @GeneratedValue(generator = "BankPaymentId")
     @GenericGenerator(
             name="BankPaymentId",
             strategy="org.broadleafcommerce.common.persistence.IdOverrideTableGenerator",
             parameters = {
                 @Parameter(name="segment_value", value="BankAccountPaymentImpl"),
                 @Parameter(name="entity_name", value="org.broadleafcommerce.core.payment.domain.BankAccountPaymentInfoImpl")
             }
         )
     @Column(name = "PAYMENT_ID")
     protected Long id;
 
     @Column(name = "REFERENCE_NUMBER", nullable=false)
     @Index(name="BANKACCOUNT_INDEX", columnNames={"REFERENCE_NUMBER"})
     protected String referenceNumber;
 
     @Column(name = "ACCOUNT_NUMBER", nullable=false)
     protected String accountNumber;
 
     @Column(name = "ROUTING_NUMBER", nullable=false)
     protected String routingNumber;
 
     @Override
     public Long getId() {
         return ;
     }
 
     @Override
     public void setId(Long id) {
         this. = id;
     }
 
     @Override
     public String getReferenceNumber() {
         return ;
     }
 
     @Override
    public void setReferenceNumber(String referenceNumber) {
        this. = referenceNumber;
    }
    @Override
    public String getAccountNumber() {
        return .decrypt();
    }
    @Override
    public void setAccountNumber(String accountNumber) {
        this. = .encrypt(accountNumber);
    }
    @Override
    public String getRoutingNumber() {
        return .decrypt();
    }
    @Override
    public void setRoutingNumber(String routingNumber) {
        this. = .encrypt(routingNumber);
    }
    @Override
        return ;
    }
    @Override
    public void setEncryptionModule(EncryptionModule encryptionModule) {
        this. = encryptionModule;
    }
    @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());
        return result;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        BankAccountPaymentImpl other = (BankAccountPaymentImplobj;
        if ( != null && other.id != null) {
            return .equals(other.id);
        }
        if ( == null) {
            if (other.accountNumber != null)
                return false;
        } else if (!.equals(other.accountNumber))
            return false;
        if ( == null) {
            if (other.referenceNumber != null)
                return false;
        } else if (!.equals(other.referenceNumber))
            return false;
        if ( == null) {
            if (other.routingNumber != null)
                return false;
        } else if (!.equals(other.routingNumber))
            return false;
        return true;
    }
New to GrepCode? Check out our FAQ X