Tuesday, February 9, 2010

How to run mql command in Java

You can execute mql command in JSP and JPO. Here is one example. The following function is used to check if a Part is an assembly or not by check the existence of Bill of Material.


public Boolean isAssembly(Context context, String objectId) throws Exception {
String mql = "expand bus "+objectId+" from rel EBOM select bus id dump ";
MQLCommand cmd = new MQLCommand();
cmd.open(context);
cmd.executeCommand(context,mql);
String sResult = cmd.getResult().trim();
cmd.close(context);
if (sResult.length()>0) {
return true;
} else {
return false;
}
}

4 comments:

  1. can you please share me any one how to write JPO and JSP in ENOVIA to my mail ID:thinkofrags@gmail.com

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Please share the details about how to write JPO and JSP's.
    Email ID: akashkalgapure07@gmail.com

    ReplyDelete