add lombok to clean codebase

This commit is contained in:
2025-11-09 18:40:38 +01:00
parent 8d9b10bace
commit c27e68caf0
88 changed files with 704 additions and 7787 deletions
+7
View File
@@ -25,5 +25,12 @@
<version>${querydsl.version}</version>
<classifier>jakarta</classifier>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>
@@ -4,10 +4,14 @@
package de.bstly.we.urlshortener.controller.model;
import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
/**
* The Class ShortenedUrlModel.
*/
@Getter
@Setter
public class ShortenedUrlModel {
private String code;
@@ -20,166 +24,4 @@ public class ShortenedUrlModel {
private boolean queryParameters;
private boolean newPassword;
/**
* Gets the code.
*
* @return the code
*/
public String getCode() {
return code;
}
/**
* Sets the code.
*
* @param code the new code
*/
public void setCode(String code) {
this.code = code;
}
/**
* Gets the new code.
*
* @return the new code
*/
public String getNewCode() {
return newCode;
}
/**
* Sets the new code.
*
* @param newCode the new new code
*/
public void setNewCode(String newCode) {
this.newCode = newCode;
}
/**
* Gets the url.
*
* @return the url
*/
public String getUrl() {
return url;
}
/**
* Sets the url.
*
* @param url the new url
*/
public void setUrl(String url) {
this.url = url;
}
/**
* Gets the note.
*
* @return the note
*/
public String getNote() {
return note;
}
/**
* Sets the note.
*
* @param note the new note
*/
public void setNote(String note) {
this.note = note;
}
/**
* Gets the expires.
*
* @return the expires
*/
public Instant getExpires() {
return expires;
}
/**
* Sets the expires.
*
* @param expires the new expires
*/
public void setExpires(Instant expires) {
this.expires = expires;
}
/**
* Gets the password.
*
* @return the password
*/
public String getPassword() {
return password;
}
/**
* Sets the password.
*
* @param password the new password
*/
public void setPassword(String password) {
this.password = password;
}
/**
* Gets the password 2.
*
* @return the password 2
*/
public String getPassword2() {
return password2;
}
/**
* Sets the password 2.
*
* @param password2 the new password 2
*/
public void setPassword2(String password2) {
this.password2 = password2;
}
/**
* Checks if is query parameters.
*
* @return true, if is query parameters
*/
public boolean isQueryParameters() {
return queryParameters;
}
/**
* Sets the query parameters.
*
* @param queryParameters the new query parameters
*/
public void setQueryParameters(boolean queryParameters) {
this.queryParameters = queryParameters;
}
/**
* Checks if is new password.
*
* @return true, if is new password
*/
public boolean isNewPassword() {
return newPassword;
}
/**
* Sets the new password.
*
* @param newPassword the new new password
*/
public void setNewPassword(boolean newPassword) {
this.newPassword = newPassword;
}
}
@@ -5,14 +5,6 @@ package de.bstly.we.urlshortener.model;
import java.time.Instant;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import org.springframework.util.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -20,6 +12,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import de.bstly.we.businesslogic.support.AbstractModelEventListener;
import de.bstly.we.model.UserData;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import lombok.Getter;
import lombok.Setter;
/**
* The Class ShortenedUrl.
@@ -27,6 +28,8 @@ import de.bstly.we.model.UserData;
@Entity
@Table(name = "shortened_urls")
@EntityListeners(AbstractModelEventListener.class)
@Getter
@Setter
public class ShortenedUrl implements UserData {
@Id
@@ -50,157 +53,7 @@ public class ShortenedUrl implements UserData {
@Transient
private boolean hasPassword;
/**
* Gets the code.
*
* @return the code
*/
public String getCode() {
return code;
}
/**
* Sets the code.
*
* @param code the new code
*/
public void setCode(String code) {
this.code = code;
}
/**
* Gets the owner.
*
* @return the owner
*/
public Long getOwner() {
return owner;
}
/**
* Sets the owner.
*
* @param owner the new owner
*/
public void setOwner(Long owner) {
this.owner = owner;
}
/**
* Gets the url.
*
* @return the url
*/
public String getUrl() {
return url;
}
/**
* Sets the url.
*
* @param url the new url
*/
public void setUrl(String url) {
this.url = url;
}
/**
* Gets the expires.
*
* @return the expires
*/
public Instant getExpires() {
return expires;
}
/**
* Sets the expires.
*
* @param expires the new expires
*/
public void setExpires(Instant expires) {
this.expires = expires;
}
/**
* Gets the password hash.
*
* @return the password hash
*/
public String getPasswordHash() {
return passwordHash;
}
/**
* Sets the password hash.
*
* @param passwordHash the new password hash
*/
public void setPasswordHash(String passwordHash) {
this.passwordHash = passwordHash;
}
/**
* Gets the link.
*
* @return the link
*/
public String getLink() {
return link;
}
/**
* Sets the link.
*
* @param link the new link
*/
public void setLink(String link) {
this.link = link;
}
/**
* Gets the note.
*
* @return the note
*/
public String getNote() {
return note;
}
/**
* Sets the note.
*
* @param note the new note
*/
public void setNote(String note) {
this.note = note;
}
/**
* Checks if is query parameters.
*
* @return true, if is query parameters
*/
public boolean isQueryParameters() {
return queryParameters;
}
/**
* Sets the query parameters.
*
* @param queryParameters the new query parameters
*/
public void setQueryParameters(boolean queryParameters) {
this.queryParameters = queryParameters;
}
/**
* Checks if is checks for password.
*
* @return true, if is checks for password
*/
public boolean isHasPassword() {
return StringUtils.hasText(passwordHash);
}
}