コード例 #1
0
  @Transactional
  @Override
  public ArrayList<Object> execute(JSONObject dataObject) throws SQLException, DuplicateException {

    // reservation_number
    ArrayList<Object> listFinalData = new ArrayList<Object>();
    Reservation reservation =
        reservationRepository.findOne(StringToLong.convert(dataObject.get("reservation_number")));
    reservationRepository.delete(reservation);
    History history = new History(reservation);
    HistoryRepository.save(history);
    listFinalData.add(history);

    return listFinalData;
  }
コード例 #2
0
  @Override
  public UserDetails loadUserByUsername(String tokenID) throws UsernameNotFoundException {
    // TODO Auto-generated method stub

    facebookManager.setFacebook(tokenID);

    User user = userSpecification.isExist(StringToLong.convert(facebookManager.getTokenID()));
    if (user != null) {
      // 이미존재
    } else {
      // 존재 안함
      user = new User();
      facebookManager.bindUser(user);
      user.setRole("ROLE_USER");
      userRepository.save(user);
    }

    return new FacebookDetailsImpl(user);
  }