コード例 #1
0
 public static PermissionTemplateDto newPermissionTemplateDto() {
   return new PermissionTemplateDto()
       .setName(randomAlphanumeric(60))
       .setDescription(randomAscii(500))
       .setUuid(Uuids.create())
       .setCreatedAt(new Date())
       .setUpdatedAt(new Date());
 }
コード例 #2
0
 public void save(Activity activity) {
   ActivityDto dto =
       new ActivityDto()
           .setKey(Uuids.create())
           .setAuthor(userSession.getLogin())
           .setAction(activity.getAction())
           .setMessage(activity.getMessage())
           .setData(KeyValueFormat.format(activity.getData()))
           .setType(activity.getType().name());
   dbClient.activityDao().insert(dto);
   indexer.index();
 }