odata.test.trip.pin.entity.collection.request.PersonCollectionRequest Maven / Gradle / Ivy
package odata.test.trip.pin.entity.collection.request;
import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.NameValue;
import odata.test.trip.pin.entity.Person;
import odata.test.trip.pin.entity.collection.request.TripCollectionRequest;
import odata.test.trip.pin.entity.request.PersonRequest;
import odata.test.trip.pin.entity.request.TripRequest;
import odata.test.trip.pin.schema.SchemaInfo;
public final class PersonCollectionRequest extends CollectionPageEntityRequest{
protected ContextPath contextPath;
public PersonCollectionRequest(ContextPath contextPath) {
super(contextPath, Person.class, cp -> new PersonRequest(cp), SchemaInfo.INSTANCE);
this.contextPath = contextPath;
}
public odata.test.trip.pin.entity.collection.request.PersonCollectionRequest friends() {
return new odata.test.trip.pin.entity.collection.request.PersonCollectionRequest(contextPath.addSegment("Friends"));
}
public PersonRequest friends(String userName) {
return new PersonRequest(contextPath.addSegment("Friends").addKeys(new NameValue(userName.toString())));
}
public TripCollectionRequest trips() {
return new TripCollectionRequest(contextPath.addSegment("Trips"));
}
public TripRequest trips(Integer tripId) {
return new TripRequest(contextPath.addSegment("Trips").addKeys(new NameValue(tripId.toString())));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy