@Override
public String getResourceType(Class<?> entityClass) {
JpaResource annotation = entityClass.getAnnotation(JpaResource.class);
if (annotation != null) {
return annotation.type();
}
if (entityClass.getAnnotation(MappedSuperclass.class) != null) {
return null; // super classes do not have a document type
}
String name = entityClass.getSimpleName();
if (name.endsWith(ENTITY_NAME_SUFFIX)) {
name = name.substring(0, name.length() - ENTITY_NAME_SUFFIX.length());
}
return Character.toLowerCase(name.charAt(0)) + name.substring(1);
}
JpaResourceInformationProvider.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:crnk-framework
作者:
评论列表
文章目录