コード例 #1
0
 /**
  * Remove role from group roles by name
  *
  * @param role
  * @return true if remove successful otherwise false
  */
 public boolean removeRole(String roleName) {
   if (StringUtil.isEmpty(roleName)) return false;
   for (UserRole role : getRoles()) {
     if (roleName.equals(role.getRole())) {
       removeRole(role);
       return true;
     }
   }
   return false;
 }
コード例 #2
0
ファイル: UserGroup.java プロジェクト: Ideyatech/opentides3
 /**
  * Remove role from group authority by name
  *
  * @param role
  * @return true if remove successful otherwise false
  */
 public boolean removeAuthority(String authorityName) {
   if (StringUtil.isEmpty(authorityName)) return false;
   for (UserAuthority role : getAuthorities()) {
     if (authorityName.equals(role.getAuthority())) {
       removeAuthority(role);
       return true;
     }
   }
   return false;
 }
コード例 #3
0
 /* (non-Javadoc)
  * @see org.opentides.persistence.impl.BaseEntityDAOJpaImpl#appendOrderToExample(org.opentides.bean.BaseEntity)
  */
 @Override
 protected String appendOrderToExample(SystemCodes example) {
   if (StringUtil.isEmpty(example.getOrderOption())) return "order by obj.value asc";
   else return super.appendOrderToExample(example);
 }