All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.featherfly.component.sorm.mapping.ClassTableNameJpaFactory Maven / Gradle / Ivy

There is a newer version: 1.3.9
Show newest version

package cn.featherfly.component.sorm.mapping;


import javax.persistence.Table;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.featherfly.common.bean.BeanDescriptor;

/**
 * 

* ClassTableMapping jpa impl. use javax.persistence.Table *

* * @author 钟冀 */ public class ClassTableNameJpaFactory implements ClassTableNameFactory{ protected final Logger logger = LoggerFactory.getLogger(this.getClass()); /** * {@inheritDoc} */ @Override public String getMappingTableName(Class type) { BeanDescriptor bd = BeanDescriptor.getBeanDescriptor(type); Table table = bd.getAnnotation(Table.class); if (table != null) { return table.name(); } return null; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy