org.mongodb.morphia.annotations.Entity Java Examples

The following examples show how to use org.mongodb.morphia.annotations.Entity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IConfigScript.java    From game-server with MIT License 5 votes vote down vote up
/**
 * 是否包含加载表
 * 
 * @author JiangZhiYong
 * @QQ 359135103 2017年10月18日 下午4:15:17
 * @param tables
 * @param clazz
 * @return
 */
default boolean containTable(List<String> tables, Class<?> clazz) {
	if (tables == null || tables.isEmpty()) {
		return true;
	}
	Entity entity = clazz.getAnnotation(Entity.class);
	if (entity != null && tables.contains(entity.value())) {
		return true;
	}
	return false;
}