Package org.nutz.dao.entity

Examples of org.nutz.dao.entity.Entity


  }
  public String getClassNameByTableName(String tableName){
    EntityHolder entities=(EntityHolder) CommonUtils.getProperty(dao, "entities");
    Map<Class<?>, Entity<?>> mappings=(Map<Class<?>, Entity<?>>) CommonUtils.getProperty(entities, "mappings");
    Collection<Entity<?>> beanEntities=mappings.values();
    Entity beanEntity=null;
    for (Entity<?> entity : beanEntities) {
      if(entity.getTableName().equals(tableName)){
        beanEntity=entity;
        break;
      }
    }
    if(beanEntity!=null){
      return beanEntity.getType().getName();
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.nutz.dao.entity.Entity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.