When I try to type a date in the part of the code where null is listed it wont work. They are date variables but I dont know how to just hard code a date. If i put 02/05/2018 where the null is. It will ask me to make it a string but I want it to go in as a date.
Just like how I randomly type in a customer or a number I would like to randomly type in a date.
DTO
private Long id;
private String name;
private long nmcAcctNo;
private int hubId;
private Date createTime;
private Date updateTime;
public CustomerDTO()
{
}
public CustomerDTO(Long id, String name, long nmcAcctNo, int hubId, Date createTime, Date updateTime)
{
super();
this.id = id;
this.name = name;
this.nmcAcctNo = nmcAcctNo;
this.hubId = hubId;
this.createTime = createTime;
this.updateTime = updateTime;
}
REST
// Your implementation should pull the actual list of customers from the database.
List<CustomerDTO> fakeCustomerList = new ArrayList<CustomerDTO>();
fakeCustomerList.add(new CustomerDTO(1L, "Customer 1", 1, 1, null, null));
fakeCustomerList.add(new CustomerDTO(2L, "Customer 2", 2, 1, null, null));
fakeCustomerList.add(new CustomerDTO(3L, "Customer 3", 3, 1, null, null));
fakeCustomerList.add(new CustomerDTO(4L, "Customer 4", 4, 1, null, null));
fakeCustomerList.add(new CustomerDTO(5L, "Customer 5", 5, 1, null, null));
fakeCustomerList.add(new CustomerDTO(6L, "Customer 6", 6, 2, null, null));
fakeCustomerList.add(new CustomerDTO(7L, "Customer 7", 7, 2, null, null));
fakeCustomerList.add(new CustomerDTO(8L, "Customer 8", 8, 2, null, null));
fakeCustomerList.add(new CustomerDTO(9L, "Customer 9", 9, 3, null, null));
fakeCustomerList.add(new CustomerDTO(10L, "Customer 10", 10, 4, null, null));
return fakeCustomerList;
}