public synchronized String lookupText(String inputtype,String outputtype,String locale,String voice,String outputparams,String style,String effects,String inputtext) throws SQLException {
  if (inputtype == null || outputtype == null || locale == null || voice == null || inputtext == null) {
    throw new NullPointerException("Null argument");
  }
  String outputtext=null;
  String query="SELECT outputtext FROM marycache WHERE inputtype = '" + inputtype + "' AND outputtype = '"+ outputtype+ "' AND locale = '"+ locale+ "' AND voice = '"+ voice+ "' AND outputparams = '"+ outputparams+ "' AND style = '"+ style+ "' AND effects = '"+ effects+ "' AND inputtext = ?";
  PreparedStatement st=connection.prepareStatement(query);
  st.setString(1,inputtext);
  ResultSet results=st.executeQuery();
  if (results.next()) {
    outputtext=results.getString(1);
  }
  st.close();
  return outputtext;
}

public synchronized String lookupText ( String inputtype , String outputtype , String locale , String voice , String outputparams , String style , String effects , String inputtext ) throws SQLException { if ( inputtype == null || outputtype == null || locale == null || voice == null || inputtext == null ) { throw new NullPointerException ( "Null argument" ) ; } String outputtext = null ; String query = "SELECT outputtext FROM marycache WHERE inputtype = '" + inputtype + "' AND outputtype = '" + outputtype + "' AND locale = '" + locale + "' AND voice = '" + voice + "' AND outputparams = '" + outputparams + "' AND style = '" + style + "' AND effects = '" + effects + "' AND inputtext = ?" ; PreparedStatement st = connection . prepareStatement ( query ) ; st . setString ( 1 , inputtext ) ; ResultSet results = st . executeQuery ( ) ; if ( results . next ( ) ) { outputtext = results . getString ( 1 ) ; } st . close ( ) ; return outputtext ; }
carry out a lookup in the cache with the given parameters .
