Class ParameterSetter


  • public class ParameterSetter
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ParameterSetter fromRepository​(java.lang.Class<? extends RepositoryLike> repository)  
      void setParameter​(java.sql.PreparedStatement statement, int index, java.lang.Object arg)  
      void setParameters​(java.sql.PreparedStatement statement, java.util.List<java.lang.Object> args)
      将参数设置到预处理语句
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setParameter

        public void setParameter​(java.sql.PreparedStatement statement,
                                 int index,
                                 java.lang.Object arg)
                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • setParameters

        public void setParameters​(java.sql.PreparedStatement statement,
                                  java.util.List<java.lang.Object> args)
                           throws java.sql.SQLException
        将参数设置到预处理语句
        Parameters:
        statement - 预处理语句
        args - 参数
        Throws:
        java.sql.SQLException - SQL异常