title: How to get a JPA-persisted String[] column by ResultSet#getString() in JDBC?
body: <p>I want to store multiple checkbox values in a single DB column. I don't want to store in a seperate table with <code>@OneToMany</code>.</p>
  
  <p>This is the JPA entity:</p>
  
  <pre><code>@Entity
  @Table(name="COOK")
  ...
  @Column(name="ARRAY_FOOD" )
  private String[] arrayFood;
  ...getter and setters...
  </code></pre>
  
  <p>Here are the checkbox values (JSF):</p>
  
  <pre><code>&lt;h:selectManyCheckbox value="#{foodBean.selectedModel.arrayFood}" layout="lineDirection"&gt;
      &lt;f:selectItem itemLabel="FISH"       itemValue="FISH"           /&gt;
      &lt;f:selectItem itemLabel="SOUP"       itemValue="SOUP"           /&gt;
      &lt;f:selectItem itemLabel="CAKE"       itemValue="CAKE"           /&gt;
      &lt;f:selectItem itemLabel="1/2 WATER"  itemValue="1/2 WATER"      /&gt;
      &lt;f:selectItem itemLabel="BANANA 1KG" itemValue="BANANA 1KG"     /&gt;
  &lt;/h:selectManyCheckbox&gt;
  </code></pre>
  
  <p>JPA stores the submitted checked values as follows:</p>
  
  <pre><code>Column Name Data Type   Sample Data
  ----------------------------------------
  ARRAY_FOOD  RAW (255)   ACED0005757200135B4C6A6176612E6C616E672E537472696E673BADD256E7E91D7B4702000078700000000174000141
  </code></pre>
  
  <p>How can I get the original array by <code>ResultSet</code> in aother program?</p>
  
  <pre><code>String array = rs.getString("ARRAY_FOOD");  // ???????????
  </code></pre>
  
  <p>Or how can I format it in a understandable format like so in other program I can split it by char like ";" :</p>
  
  <pre><code>FISH;SOUP;BANANA 1KG
  </code></pre>