BankAccountDTO.java
package io.github.jhipster.sample.service.dto;
/*-
* #%L
* Jhipster Sample Application
* %%
* Copyright (C) 2017 Osgiliath
* %%
* 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%
*/
import java.time.Instant;
import java.time.LocalDate;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
import javax.persistence.Lob;
import io.github.jhipster.sample.domain.enumeration.BankAccountType;
/**
* A DTO for the BankAccount entity.
*/
public class BankAccountDTO implements Serializable {
private Long id;
@NotNull
private String name;
private Integer bankNumber;
private Long agencyNumber;
private Float lastOperationDuration;
private Double meanOperationDuration;
@NotNull
private BigDecimal balance;
private LocalDate openingDay;
private Instant lastOperationDate;
private Boolean active;
private BankAccountType accountType;
@Lob
private byte[] attachment;
private String attachmentContentType;
@Lob
private String description;
private Long userId;
private String userLogin;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getBankNumber() {
return bankNumber;
}
public void setBankNumber(Integer bankNumber) {
this.bankNumber = bankNumber;
}
public Long getAgencyNumber() {
return agencyNumber;
}
public void setAgencyNumber(Long agencyNumber) {
this.agencyNumber = agencyNumber;
}
public Float getLastOperationDuration() {
return lastOperationDuration;
}
public void setLastOperationDuration(Float lastOperationDuration) {
this.lastOperationDuration = lastOperationDuration;
}
public Double getMeanOperationDuration() {
return meanOperationDuration;
}
public void setMeanOperationDuration(Double meanOperationDuration) {
this.meanOperationDuration = meanOperationDuration;
}
public BigDecimal getBalance() {
return balance;
}
public void setBalance(BigDecimal balance) {
this.balance = balance;
}
public LocalDate getOpeningDay() {
return openingDay;
}
public void setOpeningDay(LocalDate openingDay) {
this.openingDay = openingDay;
}
public Instant getLastOperationDate() {
return lastOperationDate;
}
public void setLastOperationDate(Instant lastOperationDate) {
this.lastOperationDate = lastOperationDate;
}
public Boolean isActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
public BankAccountType getAccountType() {
return accountType;
}
public void setAccountType(BankAccountType accountType) {
this.accountType = accountType;
}
public byte[] getAttachment() {
return attachment;
}
public void setAttachment(byte[] attachment) {
this.attachment = attachment;
}
public String getAttachmentContentType() {
return attachmentContentType;
}
public void setAttachmentContentType(String attachmentContentType) {
this.attachmentContentType = attachmentContentType;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserLogin() {
return userLogin;
}
public void setUserLogin(String userLogin) {
this.userLogin = userLogin;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BankAccountDTO bankAccountDTO = (BankAccountDTO) o;
if(bankAccountDTO.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), bankAccountDTO.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "BankAccountDTO{" +
"id=" + getId() +
", name='" + getName() + "'" +
", bankNumber=" + getBankNumber() +
", agencyNumber=" + getAgencyNumber() +
", lastOperationDuration=" + getLastOperationDuration() +
", meanOperationDuration=" + getMeanOperationDuration() +
", balance=" + getBalance() +
", openingDay='" + getOpeningDay() + "'" +
", lastOperationDate='" + getLastOperationDate() + "'" +
", active='" + isActive() + "'" +
", accountType='" + getAccountType() + "'" +
", attachment='" + getAttachment() + "'" +
", description='" + getDescription() + "'" +
"}";
}
}