public class RepositoryResourceMetadata
extends java.lang.Object
| 构造器和说明 |
|---|
RepositoryResourceMetadata(org.springframework.data.mapping.PersistentEntity<?,?> entity,
java.lang.Class<?> repositoryInterface,
org.springframework.data.repository.core.CrudMethods crudMethods)
创建资源元数据
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
enableAllDataInOnePage() |
org.springframework.data.mapping.PersistentEntity<?,?> |
getEntity() |
java.lang.Class<?> |
getModelType() |
java.lang.String |
getPathName() |
java.lang.reflect.Method |
getSearchMethod(java.lang.String search) |
java.util.Set<org.springframework.http.HttpMethod> |
getSupportedHttpMethods(ResourceType resourceType) |
boolean |
isExported() |
void |
verifySupportedMethod(org.springframework.http.HttpMethod requestHttpMethod,
ResourceType resourceType)
是否支持请求方法
|
public RepositoryResourceMetadata(org.springframework.data.mapping.PersistentEntity<?,?> entity,
java.lang.Class<?> repositoryInterface,
org.springframework.data.repository.core.CrudMethods crudMethods)
entity - 持久实体repositoryInterface - 仓库接口crudMethods - 增删改查方法public org.springframework.data.mapping.PersistentEntity<?,?> getEntity()
public boolean isExported()
public java.lang.String getPathName()
public java.lang.Class<?> getModelType()
public void verifySupportedMethod(org.springframework.http.HttpMethod requestHttpMethod,
ResourceType resourceType)
throws org.springframework.web.HttpRequestMethodNotSupportedException
requestHttpMethod - 请求方法resourceType - 资源类型org.springframework.web.HttpRequestMethodNotSupportedException - 如果不支持抛出此异常public java.util.Set<org.springframework.http.HttpMethod> getSupportedHttpMethods(ResourceType resourceType)
resourceType - 资源类型public boolean enableAllDataInOnePage()
public java.lang.reflect.Method getSearchMethod(java.lang.String search)
search - search名