title: not in function in spark sql java
body: <p>Is there any '<em>is not in</em>' and '<em>not like</em>' functions in <strong>java spark sql</strong>, I have to convert below query </p>
  
  <pre><code>CASE WHEN COL_1 = 'Y' AND COL_2 NOT IN ('A','B','C','D') AND COL_2 NOT Like 
      'NRV%' then 1 else 0
  </code></pre>
  
  <p><strong>org.apache.spark.sql.functions</strong> supports <em>isin</em> and <em>like</em> functions, How to write <em>is not in</em> and <em>not like</em> using <strong>java</strong>?</p>
  
  <pre><code>functions.when(functions.col("COL_1").equalTo("Y")
  .and(functions.col("COL_2").isin("A","B","C","D"))
  .and(functions.col("COL_2").like("NRV%")), 1).otherwise(0)
  </code></pre>