@Retention(value=RUNTIME) @Target(value=FIELD) public @interface UseDataSet
Dataset
.
Example:
public class PurchaseStore extends AbstractHttpServiceHandler {
@UseDataSet("myTable")
private ObjectStore <Purchase> store;
...
@GET
@Path("/get/{key}")
public void get(HttpServiceRequest request, HttpServiceResponder responder,
@PathParam("key") String key) {
Purchase purchase = store.get(key);
responder.sendString(purchase.toString());
}
...
}
See the CDAP Developers' Manual for more information.
Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.