mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-12-15 04:41:58 +09:00
Javadoc
This commit is contained in:
@@ -55,8 +55,8 @@ import tech.ailef.dbadmin.external.misc.Utils;
|
||||
|
||||
/**
|
||||
* The main DbAdmin class responsible for the initialization phase. This class scans
|
||||
* the user provided package containing the `@Entity` definitions and tries to map each
|
||||
* entity to a DbObjectSchema instance.
|
||||
* the user provided package containing the {@code Entity} definitions and tries to map each
|
||||
* entity to a {@link DbObjectSchema} instance.
|
||||
*
|
||||
* This process involves determining the correct type for each class field and its
|
||||
* configuration at the database level. An exception will be thrown if it's not possible
|
||||
|
||||
@@ -41,8 +41,10 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import tech.ailef.dbadmin.internal.InternalDbAdminConfiguration;
|
||||
|
||||
/**
|
||||
* The configuration class that adds and configures the "internal" data source.
|
||||
*
|
||||
* The configuration class for "internal" data source. This is not the
|
||||
* source connected to the user's data/entities, but rather an internal
|
||||
* H2 database which is used by Spring Boot Database Admin to store user
|
||||
* settings and other information like operations history.
|
||||
*/
|
||||
@ConditionalOnProperty(name = "dbadmin.enabled", matchIfMissing = true)
|
||||
@ComponentScan
|
||||
|
||||
@@ -49,9 +49,9 @@ public class AutocompleteController {
|
||||
|
||||
/**
|
||||
* Returns a list of entities from a given table that match an input query.
|
||||
* @param className
|
||||
* @param query
|
||||
* @return
|
||||
* @param className full qualified class name; only search items for this entity
|
||||
* @param query the query to search for
|
||||
* @return a list of {@link AutocompleteSearchResult}
|
||||
*/
|
||||
@GetMapping("/{className}")
|
||||
public ResponseEntity<?> autocomplete(@PathVariable String className, @RequestParam String query) {
|
||||
|
||||
@@ -46,25 +46,30 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
private String itemId;
|
||||
|
||||
/**
|
||||
* The requested page
|
||||
* The requested page number
|
||||
*/
|
||||
private int page;
|
||||
|
||||
/**
|
||||
* The requested page size
|
||||
* The requested number of elements per page
|
||||
*/
|
||||
private int pageSize;
|
||||
|
||||
/**
|
||||
* The requested sort key
|
||||
* The requested sort key, possibly null
|
||||
*/
|
||||
private String sortKey;
|
||||
|
||||
/**
|
||||
* The requested sort order
|
||||
* The requested sort order, possibly null
|
||||
*/
|
||||
private String sortOrder;
|
||||
|
||||
/**
|
||||
* Returns the table specified in this search request. If the value is blank or 'Any',
|
||||
* the method returns null in order ignore the field in subsequent queries.
|
||||
* @return
|
||||
*/
|
||||
public String getTable() {
|
||||
return table == null || table.isBlank() || table.equalsIgnoreCase("Any") ? null : table;
|
||||
}
|
||||
@@ -73,6 +78,11 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the actionType specified in this search request. If the value is blank or 'Any',
|
||||
* the method returns null in order ignore the field in subsequent queries.
|
||||
* @return
|
||||
*/
|
||||
public String getActionType() {
|
||||
return actionType == null || actionType.isBlank() || actionType.equalsIgnoreCase("Any") ? null : actionType;
|
||||
}
|
||||
@@ -81,6 +91,11 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
this.actionType = actionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the itemId specified in this search request. If the value is blank or 'Any',
|
||||
* the method returns null in order ignore the field in subsequent queries.
|
||||
* @return
|
||||
*/
|
||||
public String getItemId() {
|
||||
return itemId == null || itemId.isBlank() ? null : itemId;
|
||||
}
|
||||
@@ -89,6 +104,10 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested page number
|
||||
* @return
|
||||
*/
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
@@ -97,6 +116,10 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested number of elements per page
|
||||
* @return
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
@@ -105,6 +128,10 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested sort key, possibly null
|
||||
* @return
|
||||
*/
|
||||
public String getSortKey() {
|
||||
return sortKey;
|
||||
}
|
||||
@@ -113,6 +140,11 @@ public class LogsSearchRequest implements FilterRequest {
|
||||
this.sortKey = sortKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested sort order, possibly null
|
||||
* @param sortOrder
|
||||
*/
|
||||
|
||||
public String getSortOrder() {
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user