This is an old revision of the document!


ArrayList
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
 
public class MyRecord
{
  private Integer id;
  private String name;
 
  public ArrayList<Object> asArray()
  {
    ArrayList<Object> arr = new ArrayList<Object>();
 
    arr.add(this.id);
    arr.add(this.name);
 
    return arr;
  }
 
  public void fromArray(List<Object> arr)
  {
    this.id          = (Integer)arr.get(0);
    this.name        = (String)arr.get(1);
    this.created_at  = (LocalDateTime)arr.get(2);
    this.status      = (Boolean)arr.get(3);
  }
}