-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
166 additions
and
73 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
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
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
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
14 changes: 14 additions & 0 deletions
14
src/main/java/de/holarse/backend/db/repositories/AttachmentTypeRepository.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.holarse.backend.db.repositories; | ||
|
||
import de.holarse.backend.db.AttachmentType; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
/** | ||
* | ||
* @author comrad | ||
*/ | ||
public interface AttachmentTypeRepository extends JpaRepository<AttachmentType, Integer> { | ||
|
||
AttachmentType findByCode(String code); | ||
|
||
} |
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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package de.holarse.backend.view; | ||
|
||
import de.holarse.backend.db.Attachment; | ||
|
||
public class AttachmentView { | ||
|
||
private Integer id; | ||
private String description; | ||
private String data; | ||
private Integer weight; | ||
private boolean markAsDeleted; | ||
|
||
public static AttachmentView of(final Attachment attachment) { | ||
final AttachmentView view = new AttachmentView(); | ||
view.setId(attachment.getId()); | ||
view.setData(attachment.getData()); | ||
view.setDescription(attachment.getDescription()); | ||
view.setWeight(attachment.getWeight()); | ||
|
||
return view; | ||
} | ||
|
||
public Integer getWeight() { | ||
return weight; | ||
} | ||
|
||
public void setWeight(Integer weight) { | ||
this.weight = weight; | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public String getData() { | ||
return data; | ||
} | ||
|
||
public void setData(String data) { | ||
this.data = data; | ||
} | ||
|
||
public boolean isMarkAsDeleted() { | ||
return markAsDeleted; | ||
} | ||
|
||
public void setMarkAsDeleted(boolean markAsDeleted) { | ||
this.markAsDeleted = markAsDeleted; | ||
} | ||
|
||
|
||
|
||
} |
40 changes: 0 additions & 40 deletions
40
src/main/java/de/holarse/backend/view/WebsiteLinkView.java
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.