-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finalizando a inserção do Lombok no projeto...
- Loading branch information
1 parent
1c79e74
commit f9d70eb
Showing
19 changed files
with
122 additions
and
915 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 6 additions & 51 deletions
57
Back-end/src/main/java/com/casafacilimoveis/model/beans/ResponseError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,23 @@ | ||
package com.casafacilimoveis.model.beans; | ||
|
||
import com.casafacilimoveis.model.enums.CodeError; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
/** | ||
* casa-facil-imoveis | ||
* Wender Galan | ||
* Todos os direitos reservados © | ||
********************************************** | ||
* ********************************************* | ||
* Nome do arquivo: ResponseError.java | ||
* Criado por : Wender Galan | ||
* Data da criação : | ||
* Observação : | ||
********************************************** | ||
* ********************************************* | ||
*/ | ||
@Data | ||
@Builder | ||
public class ResponseError { | ||
|
||
private CodeError code; | ||
private String message; | ||
|
||
/** | ||
* Instantiates a new Response error. | ||
* | ||
* @param code the code | ||
*/ | ||
public ResponseError(CodeError code) { | ||
this.code = code; | ||
} | ||
|
||
/** | ||
* Instantiates a new Response error. | ||
* | ||
* @param code the code | ||
* @param message the message | ||
*/ | ||
public ResponseError(CodeError code, String message) { | ||
this.code = code; | ||
this.message = message; | ||
} | ||
|
||
/** | ||
* Gets code. | ||
* | ||
* @return the code | ||
*/ | ||
public int getCode() { | ||
return code != null ? code.getCode() : 0; | ||
} | ||
|
||
/** | ||
* Gets message. | ||
* | ||
* @return the message | ||
*/ | ||
public String getMessage() { | ||
return message; | ||
} | ||
|
||
/** | ||
* Sets message. | ||
* | ||
* @param message the message | ||
*/ | ||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
|
||
} |
83 changes: 7 additions & 76 deletions
83
Back-end/src/main/java/com/casafacilimoveis/model/beans/Validation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,22 @@ | ||
package com.casafacilimoveis.model.beans; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
/** | ||
* casa-facil-imoveis | ||
* Wender Galan | ||
* Todos os direitos reservados © | ||
********************************************** | ||
* ********************************************* | ||
* Nome do arquivo: Validation.java | ||
* Criado por : Wender Galan | ||
* Data da criação : | ||
* Observação : | ||
********************************************** | ||
* ********************************************* | ||
*/ | ||
@Data | ||
@Builder | ||
public class Validation { | ||
|
||
private String campo; | ||
private String mensagem; | ||
|
||
/** | ||
* Instantiates a new Validation. | ||
*/ | ||
public Validation() { | ||
} | ||
|
||
/** | ||
* Instantiates a new Validation. | ||
* | ||
* @param campo the campo | ||
* @param mensagem the mensagem | ||
*/ | ||
public Validation(String campo, String mensagem) { | ||
this.campo = campo; | ||
this.mensagem = mensagem; | ||
} | ||
|
||
/** | ||
* Gets . | ||
* | ||
* @return the | ||
*/ | ||
public String getcampo() { | ||
return campo; | ||
} | ||
|
||
/** | ||
* Sets . | ||
* | ||
* @param campo the campo | ||
*/ | ||
public void setcampo(String campo) { | ||
this.campo = campo; | ||
} | ||
|
||
/** | ||
* Gets . | ||
* | ||
* @return the | ||
*/ | ||
public String getmensagem() { | ||
return mensagem; | ||
} | ||
|
||
/** | ||
* Sets . | ||
* | ||
* @param mensagem the mensagem | ||
*/ | ||
public void setmensagem(String mensagem) { | ||
this.mensagem = mensagem; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
Validation that = (Validation) o; | ||
|
||
if (campo != null ? !campo.equals(that.campo) : that.campo != null) return false; | ||
return !(mensagem != null ? !mensagem.equals(that.mensagem) : that.mensagem != null); | ||
|
||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = campo != null ? campo.hashCode() : 0; | ||
result = 31 * result + (mensagem != null ? mensagem.hashCode() : 0); | ||
return result; | ||
} | ||
|
||
} |
Oops, something went wrong.