本文整理汇总了Java中com.mysql.fabric.xmlrpc.base.Member类的典型用法代码示例。如果您正苦于以下问题:Java Member类的具体用法?Java Member怎么用?Java Member使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Member类属于com.mysql.fabric.xmlrpc.base包,在下文中一共展示了Member类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unwrapValue
import com.mysql.fabric.xmlrpc.base.Member; //导入依赖的package包/类
/**
* Unwrap the underlying object from the Value wrapper.
*/
private Object unwrapValue(Value v) {
if (v.getType() == Value.TYPE_array) {
return methodResponseArrayToList((Array) v.getValue());
} else if (v.getType() == Value.TYPE_struct) {
Map<String, Object> s = new HashMap<String, Object>();
for (Member m : ((Struct) v.getValue()).getMember()) {
s.put(m.getName(), unwrapValue(m.getValue()));
}
return s;
}
return v.getValue();
}
示例2: requestPro
import com.mysql.fabric.xmlrpc.base.Member; //导入依赖的package包/类
@Override
public HashMap<String, Object> requestPro(HttpServletRequest request, HttpServletResponse response)
throws Throwable {
HashMap<String, Object> returns = new HashMap<String, Object>();
Member mdb = new Member();
Connection conn = ConnectMysql.getConnector();
PreparedStatement ps = null;
String widgetId = request.getParameter("widgetId").toString();
String comment = request.getParameter("comment").toString();
String userId = request.getParameter("userId").toString();
String grade = request.getParameter("grade").toString();
// System.out.println(widgetId + " / " + comment + " / " + userId + " / " + grade);
// insert into post (widget_num, comment, review, u_id) values ('1', 'testing', 0, 3);
String sql = "insert into post (widget_id, comment, review, u_id) values ('"+ widgetId +"', '"+comment+"', "+ grade +", "+userId+");";
ps = conn.prepareCall(sql);
ps.executeUpdate();
sql = "update widgetDetail set count = count +1, totalReview = totalReview +"+grade+" where widget_id = "+widgetId+";";
ps = conn.prepareCall(sql);
ps.executeUpdate();
returns.put("id", widgetId);
returns.put("view", "Store.jsp");
return returns;
}
示例3: unwrapValue
import com.mysql.fabric.xmlrpc.base.Member; //导入依赖的package包/类
/**
* Unwrap the underlying object from the Value wrapper.
*/
private Object unwrapValue(Value v) {
if (v.getType() == Value.TYPE_array) {
return methodResponseArrayToList((Array)v.getValue());
} else if (v.getType() == Value.TYPE_struct) {
Map<String, Object> s = new HashMap<String, Object>();
for (Member m : ((Struct)v.getValue()).getMember()) {
s.put(m.getName(), unwrapValue(m.getValue()));
}
return s;
}
return v.getValue();
}