org.crazycake.jdbcTemplateTool.utils
类 IdUtils
java.lang.Object
org.crazycake.jdbcTemplateTool.utils.IdUtils
public class IdUtils
- extends Object
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdUtils
public IdUtils()
getAutoGeneratedId
public static String getAutoGeneratedId(Object po)
throws SecurityException,
NoSuchMethodException
- 根据注解获取自增主键字段名
如果没找到就返回空字符串
- 参数:
po -
- 返回:
- increamentIdFieldName
- 抛出:
NoSuchMethodException
SecurityException
setAutoIncreamentIdValue
public static void setAutoIncreamentIdValue(Object po,
String autoGeneratedId,
Object idValue)
throws Exception,
NoSuchMethodException
- 将自增id的值设置回去
- 参数:
po - autoGeneratedId - idValue -
- 抛出:
Exception
NoSuchMethodException
Copyright © 2014. All rights reserved.