001    /***************************************************************************************************
002     *               MODULE DESCRIPTION
003     ****************************************************************************************************
004     *
005     *               NAME:           StringItem.java
006     *               LANGUAGE:       Java2
007     *               DATE:           4.12.2002
008     *               AUTHOR:         Miika Nurminen, University of Jyväskylä
009     *
010     ****************************************************************************************************
011     *               COPYRIGHT (C) KIURU -PROJECT GROUP
012     *               Limited rights granted. Please refer to license
013     ****************************************************************************************************
014     *  
015     ****************************************************************************************************
016     *               UPDATES
017     ****************************************************************************************************
018     *
019     *   4.12.2002: Initial release / mn
020     *
021     ****************************************************************************************************/
022    package kiurubeans;
023    
024    /**
025     * Representation of a preparedstatement item of type <code>String</code>.
026     */
027    public class StringItem extends kiurubeans.StatementItem {
028      
029      /**
030       * Creates a new instance of StateMentItem with String content.
031       * @param content content for PreparedStatement
032       */
033      public StringItem(String content) {
034        super(content);
035      }
036      
037      /**
038       * Sets target's parameter of a given index. ASSUMES target is set!
039       *
040       * @param index index number for parameter
041       * @throws SQLException if problems with setting
042       */
043      void assignItem(int index) throws java.sql.SQLException {
044        target.setString(index,getContent().toString());
045      }
046      
047    }
048    /***************************************************************************************************
049     *               COPYRIGHT (C) KIURU -PROJECT GROUP
050     *               Limited rights granted. Please refer to license.
051     **************************************************************************************************/