@Override
	public synchronized RecordParam insert(String site, String type, String name, int used, String flags,
			String values) throws DatabaseException {
    	SqlPreparedStatementWrapper psInsert = null;
        try {
        	psInsert = DbSQL.getSingleton().getPreparedStatement("param.ps.insert");
			psInsert.getPs().setString(1, site);
			psInsert.getPs().setString(2, type);
			psInsert.getPs().setString(3, name);
			psInsert.getPs().setInt(4, used);
			psInsert.getPs().setString(5, flags);
			psInsert.getPs().setString(6, values);
			psInsert.getPs().executeUpdate();
			
			long id;
			try (ResultSet rs = psInsert.getLastInsertedId()) {
				rs.next();
				id = rs.getLong(1);
			}
			return read(id);
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psInsert);
		}
    }
@ Override public synchronized RecordParam insert ( String site , String type , String name , int used , String flags , String values ) throws DatabaseException { SqlPreparedStatementWrapper psInsert = null ; try { psInsert = DbSQL . getSingleton ( ) . getPreparedStatement ( "param.ps.insert" ) ; psInsert . getPs ( ) . setString ( 1 , site ) ; psInsert . getPs ( ) . setString ( 2 , type ) ; psInsert . getPs ( ) . setString ( 3 , name ) ; psInsert . getPs ( ) . setInt ( 4 , used ) ; psInsert . getPs ( ) . setString ( 5 , flags ) ; psInsert . getPs ( ) . setString ( 6 , values ) ; psInsert . getPs ( ) . executeUpdate ( ) ; long id ; try ( ResultSet rs = psInsert . getLastInsertedId ( ) ) { rs . next ( ) ; id = rs . getLong ( 1 ) ; } return read ( id ) ; } catch ( SQLException e ) { throw new DatabaseException ( e ) ; } finally { DbSQL . getSingleton ( ) . releasePreparedStatement ( psInsert ) ; } }
/* (non-Javadoc)
@see org.parosproxy.paros.db.paros.TableParam#insert(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String)