Skip to content

Commit 6110ff5

Browse files
committed
chore(font): rename FontLoreEntity to FontStringEntity for better understanding
1 parent 2938988 commit 6110ff5

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/main/java/net/onelitefeather/vulpes/api/model/FontEntity.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import jakarta.persistence.Id;
88
import jakarta.persistence.OneToMany;
99
import net.onelitefeather.vulpes.api.generator.VulpesGenerator;
10-
import net.onelitefeather.vulpes.api.model.font.FontLoreEntity;
10+
import net.onelitefeather.vulpes.api.model.font.FontStringEntity;
1111

1212
import java.util.List;
1313
import java.util.UUID;
@@ -37,7 +37,7 @@ public class FontEntity implements VulpesModel {
3737
private int height;
3838
private int ascent;
3939
@OneToMany(mappedBy = "font", cascade = CascadeType.ALL)
40-
private List<FontLoreEntity> chars;
40+
private List<FontStringEntity> chars;
4141

4242
/**
4343
* Default constructor for JPA and Micronaut Data.
@@ -71,7 +71,7 @@ public FontEntity(
7171
String comment,
7272
int height,
7373
int ascent,
74-
List<FontLoreEntity> chars
74+
List<FontStringEntity> chars
7575
) {
7676
this.id = id;
7777
this.uiName = uiName;
@@ -193,7 +193,7 @@ public void setHeight(int height) {
193193
*
194194
* @return the list of characters in the font
195195
*/
196-
public List<FontLoreEntity> getChars() {
196+
public List<FontStringEntity> getChars() {
197197
return chars;
198198
}
199199

@@ -202,7 +202,7 @@ public List<FontLoreEntity> getChars() {
202202
*
203203
* @param chars the list of characters to set
204204
*/
205-
public void setChars(List<FontLoreEntity> chars) {
205+
public void setChars(List<FontStringEntity> chars) {
206206
this.chars = chars;
207207
}
208208

src/main/java/net/onelitefeather/vulpes/api/model/font/FontLoreEntity.java renamed to src/main/java/net/onelitefeather/vulpes/api/model/font/FontStringEntity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.util.UUID;
1414

1515
@Entity(name = "font_lore")
16-
public final class FontLoreEntity implements Comparable<FontLoreEntity> {
16+
public final class FontStringEntity implements Comparable<FontStringEntity> {
1717
@Id
1818
@GeneratedValue(strategy = GenerationType.UUID)
1919
@VulpesGenerator
@@ -24,17 +24,17 @@ public final class FontLoreEntity implements Comparable<FontLoreEntity> {
2424
private FontEntity font;
2525
private int orderIndex;
2626

27-
public FontLoreEntity() {
27+
public FontStringEntity() {
2828
}
2929

30-
public FontLoreEntity(
30+
public FontStringEntity(
3131
UUID id,
32-
String line,
32+
String content,
3333
FontEntity font,
3434
int orderIndex
3535
) {
3636
this.id = id;
37-
this.line = line;
37+
this.line = content;
3838
this.font = font;
3939
this.orderIndex = orderIndex;
4040
}
@@ -75,7 +75,7 @@ public int getOrderIndex() {
7575
public boolean equals(Object obj) {
7676
if (obj == this) return true;
7777
if (obj == null || obj.getClass() != this.getClass()) return false;
78-
var that = (FontLoreEntity) obj;
78+
var that = (FontStringEntity) obj;
7979
return Objects.equals(this.id, that.id) &&
8080
Objects.equals(this.line, that.line) &&
8181
Objects.equals(this.font, that.font);
@@ -95,7 +95,7 @@ public String toString() {
9595
}
9696

9797
@Override
98-
public int compareTo(FontLoreEntity o) {
98+
public int compareTo(FontStringEntity o) {
9999
return Integer.compare(this.orderIndex, o.orderIndex);
100100
}
101101
}

src/main/java/net/onelitefeather/vulpes/api/repository/font/FontLoreRepository.java renamed to src/main/java/net/onelitefeather/vulpes/api/repository/font/FontStringRepository.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
import io.micronaut.data.model.Page;
66
import io.micronaut.data.model.Pageable;
77
import io.micronaut.data.repository.PageableRepository;
8-
import net.onelitefeather.vulpes.api.model.font.FontLoreEntity;
8+
import net.onelitefeather.vulpes.api.model.font.FontStringEntity;
99

1010
import java.util.UUID;
1111

1212
/**
13-
* Repository definition to manage {@link FontLoreRepository} entities.
13+
* Repository definition to manage {@link FontStringRepository} entities.
1414
*
1515
* @version 1.0.0
1616
* @since 1.7.0
1717
* @author theEvilReaper
1818
*/
1919
@Repository
20-
public interface FontLoreRepository extends PageableRepository<FontLoreEntity, UUID> {
20+
public interface FontStringRepository extends PageableRepository<FontStringEntity, UUID> {
2121

2222
/**
2323
* Retrieves the characters associated with a font by its ID.
@@ -28,5 +28,5 @@ public interface FontLoreRepository extends PageableRepository<FontLoreEntity, U
2828
@Query(value = "SELECT f FROM font_lore f WHERE f.font.id = :id",
2929
countQuery = "SELECT count(f) FROM font_lore f WHERE f.font.id = :id"
3030
)
31-
Page<FontLoreEntity> findCharsByFontId(UUID id, Pageable pageable);
31+
Page<FontStringEntity> findCharsByFontId(UUID id, Pageable pageable);
3232
}

0 commit comments

Comments
 (0)