46 lines
969 B
Java
Executable file
46 lines
969 B
Java
Executable file
package de.pzzz.vertx;
|
|
|
|
import java.io.Serializable;
|
|
|
|
public class RestDataRequest<T> implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String id;
|
|
private T data;
|
|
private RestCommand command;
|
|
|
|
public RestDataRequest<T> listRequest() {
|
|
this.command = RestCommand.LIST;
|
|
return this;
|
|
}
|
|
|
|
public RestDataRequest<T> getRequest(final String id) {
|
|
this.command = RestCommand.GET;
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(final String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public T getData() {
|
|
return data;
|
|
}
|
|
|
|
public void setData(final T data) {
|
|
this.data = data;
|
|
}
|
|
|
|
public RestCommand getCommand() {
|
|
return command;
|
|
}
|
|
|
|
public void setCommand(final RestCommand command) {
|
|
this.command = command;
|
|
}
|
|
}
|