一、拼接HQL時的類名能夠這樣: javascript
Person.class.getClassName();
二、回車事件: java
<script type="text/javascript" language=JavaScript charset="UTF-8"> document.onkeydown=function(event){ var e = event || window.event || arguments.callee.caller.arguments[0]; if(e && e.keyCode==27){ // 按 Esc //要作的事情 } if(e && e.keyCode==113){ // 按 F2 //要作的事情 } if(e && e.keyCode==13){ // enter 鍵 //要作的事情 } }; </script>
三、jbpm查詢實例接口,當要查詢全部流程實例時: code
ProcessDefinitionQuery query = processEngine.getRepositoryService() .createProcessDefinitionQuery().orderAsc(ProcessDefinitionQuery.PROPERTY_KEY) .orderAsc(ProcessDefinitionQuery.PROPERTY_VERSION); List<ProcessDefinition> list = query.list(); List<ProcessDefinition> newList = new ArrayList<ProcessDefinition>(list.size());
@SuppressWarnings("serial") public class DeploypropInfo implements ProcessDefinition { private String name; private String key; private String id; private int version; private String deploymentId; private String imageResourceName; private String description; private boolean isSuspended; ....get() set()....
關於系統中的常量,能夠放在接口中,由於接口中定義的全部屬性都是final static的;好比jbpm中的Context就是這麼一個接口; 接口