Created
September 7, 2015 05:38
-
-
Save wendal/324f130278a376169fd0 to your computer and use it in GitHub Desktop.
示例获取一个动态表名
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String getTableName(Dao dao, Class<?> klass, Object t) { | |
final Entity<?> en = dao.getEntity(klass); | |
final String[] name = new String[1]; | |
TableName.run(t, new Runnable() { | |
public void run() { | |
name[0] = en.getTableName(); | |
} | |
}); | |
return name[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment