BicepBuddyApp/src/main/java/Matching/MatchController.java
public static void acceptMatchInitial(Match match) {
		Master.appLogger.info(":: Match sent from " + 
				UserController.getUser().toString() + " to " + 
				UserController.getInstance().onlyGetUserById(match.getOther()).toString());
		
		UserController uc = UserController.getInstance();
		
		if(match.getId() == null) {
			String id = createMatch(match);
			match.setId(id);
		}
		
		//add to primary accepted
		List<Match> matches = UserController.getUser().getAccepted();
		matches.add(match);
		UserController.getUser().setAccepted(matches);
		
		// Updating Array State for User
		uc.updateMatchedArrayState(UserController.getUser());
		
		
		//add to other waiting
		User other = UserController.getInstance().getUserById(match.getOther());
		matches = other.getWaiting();
		matches.add(match);
		other.setWaiting(matches);
		
		// Updating Array State for Other User
		uc.updateMatchedArrayState(other);
	}
/**
	 * Accept match initial.
	 *
	 * @param match the match
	 */
Accept match initial.
@param match the match
Accept match initial . @param match the match
public static void acceptMatchInitial(Match match) {
		Master.appLogger.info(":: Match sent from " + 
				UserController.getUser().toString() + " to " + 
				UserController.getInstance().onlyGetUserById(match.getOther()).toString());
		UserController uc = UserController.getInstance();
		if(match.getId() == null) {
			String id = createMatch(match);
			match.setId(id);
		}
		List<Match> matches = UserController.getUser().getAccepted();
		matches.add(match);
		UserController.getUser().setAccepted(matches);
		uc.updateMatchedArrayState(UserController.getUser());
		User other = UserController.getInstance().getUserById(match.getOther());
		matches = other.getWaiting();
		matches.add(match);
		other.setWaiting(matches);
		uc.updateMatchedArrayState(other);
	}
public static void acceptMatchInitial ( Match match ) { Master . appLogger . info ( ":: Match sent from " + UserController . getUser ( ) . toString ( ) + " to " + UserController . getInstance ( ) . onlyGetUserById ( match . getOther ( ) ) . toString ( ) ) ; UserController uc = UserController . getInstance ( ) ; if ( match . getId ( ) == null ) { String id = createMatch ( match ) ; match . setId ( id ) ; } List < Match > matches = UserController . getUser ( ) . getAccepted ( ) ; matches . add ( match ) ; UserController . getUser ( ) . setAccepted ( matches ) ; uc . updateMatchedArrayState ( UserController . getUser ( ) ) ; User other = UserController . getInstance ( ) . getUserById ( match . getOther ( ) ) ; matches = other . getWaiting ( ) ; matches . add ( match ) ; other . setWaiting ( matches ) ; uc . updateMatchedArrayState ( other ) ; }
Accept match initial.
Accept match initial .
//add to primary accepted // Updating Array State for User //add to other waiting // Updating Array State for Other User