org.crazycake.jdbcTemplateTool.utils
类 IdUtils

java.lang.Object
  继承者 org.crazycake.jdbcTemplateTool.utils.IdUtils

public class IdUtils
extends Object


构造方法摘要
IdUtils()
           
 
方法摘要
static String getAutoGeneratedId(Object po)
          根据注解获取自增主键字段名 如果没找到就返回空字符串
static void setAutoIncreamentIdValue(Object po, String autoGeneratedId, Object idValue)
          将自增id的值设置回去
 
从类 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.