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

plus.extvos.restlet.utils.EntityWrapper Maven / Gradle / Ivy

The newest version!
package plus.extvos.restlet.utils;

import com.baomidou.mybatisplus.annotation.TableName;

/**
 * @author Mingcai SHEN
 */
public class EntityWrapper {

    /**
     * Get table name as a class was annotated by TableName.
     *
     * @param cls the entity class
     * @return table name of null
     */

    public static String getTableName(Class cls) {
        if (cls.isAnnotationPresent(TableName.class)) {
            return cls.getAnnotation(TableName.class).value();
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy