@Override
 public void setType(PermissionType type) {
   if (type != null) {
     this.type = type.getType();
   }
 }
 @Override
 public PermissionType getType() {
   return PermissionType.getInstance(type);
 }