public synchronized void insertText(String inputtype,String outputtype,String locale,String voice,String outputparams,String style,String effects,String inputtext,String outputtext) throws SQLException {
  if (inputtype == null || outputtype == null || locale == null || voice == null || inputtext == null || outputtext == null) {
    throw new NullPointerException("Null argument");
  }
  if (lookupText(inputtype,outputtype,locale,voice,outputparams,style,effects,inputtext) != null) {
    return;
  }
  String query="INSERT INTO MARYCACHE (inputtype, outputtype, locale, voice, outputparams, style, effects, inputtext, outputtext) VALUES ('" + inputtype + "','"+ outputtype+ "','"+ locale+ "','"+ voice+ "','"+ outputparams+ "','"+ style+ "','"+ effects+ "',?,?)";
  PreparedStatement st=connection.prepareStatement(query);
  st.setString(1,inputtext);
  st.setString(2,outputtext);
  st.executeUpdate();
  st.close();
}

public synchronized void insertText ( String inputtype , String outputtype , String locale , String voice , String outputparams , String style , String effects , String inputtext , String outputtext ) throws SQLException { if ( inputtype == null || outputtype == null || locale == null || voice == null || inputtext == null || outputtext == null ) { throw new NullPointerException ( "Null argument" ) ; } if ( lookupText ( inputtype , outputtype , locale , voice , outputparams , style , effects , inputtext ) != null ) { return ; } String query = "INSERT INTO MARYCACHE (inputtype, outputtype, locale, voice, outputparams, style, effects, inputtext, outputtext) VALUES ('" + inputtype + "','" + outputtype + "','" + locale + "','" + voice + "','" + outputparams + "','" + style + "','" + effects + "',?,?)" ; PreparedStatement st = connection . prepareStatement ( query ) ; st . setString ( 1 , inputtext ) ; st . setString ( 2 , outputtext ) ; st . executeUpdate ( ) ; st . close ( ) ; }
insert a record of a mary request producing data of type text into the cache . if a record with the same lookup keys ( i . e . , all parameters everything except outputtext ) exists already , this call does nothing .
