@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; }
@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); }