首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

hibernate中应用Class.simpleName获取实体名

2013-07-04 
hibernate中使用Class.simpleName获取实体名举例package com.tepublic class Student{}?使用SessionFact

hibernate中使用Class.simpleName获取实体名

举例;

package com.tepublic class Student{};

?使用

SessionFactory sf = null;//String className = ((org.hibernate.impl.SessionFactoryImpl)sf).getImportedClassName("Student");Assert.assertEquals(className,"com.te.Student");

?

热点排行