@WebServlet(description="jserv.sample example/vec3.serv",
urlPatterns="/vec3.serv")
public class Vec3
extends io.odysz.semantic.jserv.ServPort<io.odysz.semantic.jserv.user.UserReq>
Sample serv (Port = user.serv) shows how to implement data service for x-visual/bar-chart with help of semantic-transact SQL builder
function branch: a = "A" | "B" | "C";var conn = jconsts.conn; function saveTooleA() { var dat = {borrowId: 'borrow-001', items: []}; dat.items.push(['item001', 3]); // return 3 of tiem001 var usrReq = new jvue.UserReq(conn, "r_tools_borrows") // turn back tools - or any function branch tag handled by tools.serv .a("A") // or reaplace these 2 set() with data(dat) .set('borrowId', 'borrow-001') .set('items', [['item001', 3]]); var jmsg = ssClient // ssClient's current user action is handled by jeasy when loading menu .usrCmd('save') // return ssClient itself .userReq(conn, engports.tools, usrReq); // return the AnsonMsg<UserReq> object // You should get sqls at server side like this: // delete from r_tools_borrows where borrowId = 'borrow-001' // insert into detailsTbl (item001) values ('3.0') // update borrowTbl set total= where borrowId = 'borrow-001' ssClient.commit(jmsg, function(resp) { EasyMsger.ok(EasyMsger.m.saved); }, EasyMsger.error); }
Modifier and Type | Field and Description |
---|---|
protected static ArrayList<String[]> |
serialsOrder |
Constructor and Description |
---|
Vec3() |
Modifier and Type | Method and Description |
---|---|
protected io.odysz.semantic.jprotocol.AnsonMsg<XChartResp> |
cubes(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg,
io.odysz.semantics.IUser usr) |
protected void |
onGet(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg,
javax.servlet.http.HttpServletResponse resp) |
protected void |
onPost(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg,
javax.servlet.http.HttpServletResponse resp) |
protected io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jprotocol.AnsonResp> |
vectors(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg,
io.odysz.semantics.IUser usr) |
protected io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jprotocol.AnsonResp> |
xyz(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg,
io.odysz.semantics.IUser usr)
Get available x, y, z labels
|
doGet, doPost, err, ok, ok, ok, ok, ok, onGetAnsonException, write
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
protected void onGet(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg, javax.servlet.http.HttpServletResponse resp) throws IOException
onGet
in class io.odysz.semantic.jserv.ServPort<io.odysz.semantic.jserv.user.UserReq>
IOException
protected void onPost(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg, javax.servlet.http.HttpServletResponse resp) throws IOException
onPost
in class io.odysz.semantic.jserv.ServPort<io.odysz.semantic.jserv.user.UserReq>
IOException
protected io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jprotocol.AnsonResp> xyz(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg, io.odysz.semantics.IUser usr) throws io.odysz.transact.x.TransException, SQLException
jmsg
- usr
- io.odysz.transact.x.TransException
SQLException
protected io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jprotocol.AnsonResp> vectors(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg, io.odysz.semantics.IUser usr) throws io.odysz.transact.x.TransException, SQLException
io.odysz.transact.x.TransException
SQLException
protected io.odysz.semantic.jprotocol.AnsonMsg<XChartResp> cubes(io.odysz.semantic.jprotocol.AnsonMsg<io.odysz.semantic.jserv.user.UserReq> jmsg, io.odysz.semantics.IUser usr) throws io.odysz.transact.x.TransException, SQLException
io.odysz.transact.x.TransException
SQLException
Copyright © 2023. All rights reserved.