fix formatting in PagingRequest#getPagingParams JavaDoc and reorder RecordEntity#getName method.

This commit is contained in:
2025-12-31 13:38:32 +01:00
parent 77a584afb6
commit dd586be9f4
2 changed files with 18 additions and 18 deletions
@@ -54,7 +54,7 @@ public class PagingRequest {
* Retrieves the pagination parameters in a key-value map format.
*
* @return a map containing the pagination parameters, where the key "page" indicates the current
* page number and the key "perPage" indicates the number of items per page.
* page number and the key "perPage" indicates the number of items per page.
*/
public Map<String, String> getPagingParams() {
return Map.of("page", String.valueOf(page), "perPage", String.valueOf(perPage));
@@ -53,23 +53,6 @@ public class RecordEntity extends AbstractEntity {
super();
}
/**
* Retrieves the name of the DNS record.
* If the name contains a dot ('.'), only the substring before the first dot is returned.
*
* @return the name of the DNS record, potentially truncated before the first dot,
* or the full name if no dot is present.
*/
public String getName() {
if (name != null) {
int pos = name.indexOf('.');
if (pos > 0) {
return name.substring(0, pos);
}
}
return name;
}
/**
* Builds and returns a {@link RecordEntity} instance with the specified attributes.
*
@@ -117,4 +100,21 @@ public class RecordEntity extends AbstractEntity {
rec.setId(id);
return rec;
}
/**
* Retrieves the name of the DNS record.
* If the name contains a dot ('.'), only the substring before the first dot is returned.
*
* @return the name of the DNS record, potentially truncated before the first dot,
* or the full name if no dot is present.
*/
public String getName() {
if (name != null) {
int pos = name.indexOf('.');
if (pos > 0) {
return name.substring(0, pos);
}
}
return name;
}
}