title: get max value in java8 list using stream
body: <p>I want to find max value in java list using java8 lambda expression,
  so, I have a Class called TicketMaster and item table is TicketMasterLog ,in TicketMasterLog class I have StatusMaster Class statusId reference column, so here i want to find max statusId in TicketMasterLog List, below i'll give my code please refer</p>
  
  <pre><code>@Entity
  @Table(name="ticket_master")
  @NamedQuery(name="TicketMaster.findAll", query="SELECT t FROM TicketMastert")
  public class TicketMaster implements Serializable {
  private static final long serialVersionUID = 1L;
    @Id
    @Column(name="TICKET_ID", unique=true, nullable=false, length=10)
    private String ticketId;
  
    //bi-directional many-to-one association to TicketMasterLog
    @OneToMany(mappedBy="ticketMaster",cascade=CascadeType.ALL)
    private List&lt;TicketMasterLog&gt; ticketMasterLogs;
  
   //getters and stters
  }
  </code></pre>
  
  <p>and TicketMasterItem Table is</p>
  
  <pre><code>@Entity
  @Table(name="ticket_master_log")
  @NamedQuery(name="TicketMasterLog.findAll", query="SELECT t FROM   TicketMasterLog t")
  public class TicketMasterLog implements Serializable {
  private static final long serialVersionUID = 1L;
  
  @EmbeddedId
  private TicketMasterLogPK id;
  //bi-directional many-to-one association to StatusMaster
  @ManyToOne(fetch=FetchType.LAZY)
  @JoinColumn(name="STATUS_ID")
  private StatusMaster statusMaster;
  
  //bi-directional many-to-one association to TicketMaster
  @ManyToOne(fetch=FetchType.LAZY)
  @JoinColumn(name="TICKET_ID", nullable=false, insertable=false, updatable=false)
  private TicketMaster ticketMaster;
  
  //getters and setters
  
  }
  </code></pre>
  
  <p>and StatusMaster Table is</p>
  
  <pre><code>@Entity
  @Table(name="status_master")
  @NamedQuery(name="StatusMaster.findAll", query="SELECT s FROM StatusMaster s")
  public class StatusMaster implements Serializable {
  private static final long serialVersionUID = 1L;
  
  @Id
  @Column(name="STATUS_ID", unique=true, nullable=false, length=10)
  private String statusId;
  
  @Column(name="STATUS_NAME", length=45)
  private String statusName;
  
  //bi-directional many-to-one association to TicketMasterLog
  @OneToMany(mappedBy="statusMaster")
  private List&lt;TicketMasterLog&gt; ticketMasterLogs;
  
  //getters and setters...
  </code></pre>
  
  <p>Now I have a TicketMasterlog List </p>
  
  <pre><code>List&lt;TicketMasterLog&gt; tl = //some objects;
  </code></pre>
  
  <p>so in that list I want find max status id value </p>
  
  <p>thanking you.</p>