コード例 #1
0
  public TitlesDepartmentUnitUnitGroup addTitlesDepartmentUnitUnitGroup(
      long titlesId,
      long departmentId,
      long unitId,
      long unitGroupId,
      ServiceContext serviceContext) {
    try {
      TitlesDepartmentUnitUnitGroup o =
          titlesDepartmentUnitUnitGroupPersistence.create(counterLocalService.increment());

      o.setTitlesId(titlesId);
      o.setUnitGroupId(unitGroupId);
      o.setUnitId(unitId);
      o.setDepartmentId(departmentId);

      o.setCreateDate(new Date());
      o.setModifiedDate(new Date());
      o.setGroupId(serviceContext.getScopeGroupId());
      o.setCompanyId(serviceContext.getCompanyId());
      o.setUserId(serviceContext.getUserId());

      return super.addTitlesDepartmentUnitUnitGroup(o);
    } catch (SystemException e) {
      LOGGER.info(e);
    }
    return null;
  }
コード例 #2
0
 public void completelyRemoveAll() {
   for (TitlesDepartmentUnitUnitGroup item : findAll()) {
     try {
       titlesDepartmentUnitUnitGroupPersistence.remove(item.getTitlesDepartmentUnitUnitGroupId());
     } catch (NoSuchTitlesDepartmentUnitUnitGroupException e) {
       LOGGER.info(e);
     } catch (SystemException e) {
       LOGGER.info(e);
     }
   }
 }