public SqlStatement getPreparedInsertStatement ( ClassDescriptor cld ) { SqlStatement sql ; SqlForClass sfc = getSqlForClass ( cld ) ; sql = sfc . getInsertSql ( ) ; if ( sql == null ) { ProcedureDescriptor pd = cld . getInsertProcedure ( ) ; if ( pd == null ) { sql = new SqlInsertStatement ( cld , logger ) ; } else { sql = new SqlProcedureStatement ( pd , logger ) ; } // set the sql string sfc . setInsertSql ( sql ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "SQL:" + sql . getStatement ( ) ) ; } } return sql ; }
generate a prepared INSERT - Statement for the Class described by cld .