1st:?? mappings.setDefaultLazy(dlNode == null || dlNode.getValue().equals("true"));
2ed: mappings.setAutoImport((aiNode == null) ? true : "true".equals(aiNode.getValue()));
the first is seems a bit more effective than the second but less readable ,hence we choose the second!
bad?programmer write code readed by machine and by contraries good programmer write code readed by human!
posted on 2006-09-30 18:07
R.Zeus 閱讀(387)
評論(0) 編輯 收藏 所屬分類:
Hibernate 、
J2SE 、
Design Pattern