public void nextState(String airplaneId) {
		
		Query qCurrentState = em.createQuery("select e from airplane e where e.id = '" + airplaneId + "'");
		
		if( qCurrentState.getResultList().size() > 0) {
			
			Airplane airplane = (Airplane) qCurrentState.getResultList().get(0);
			Airplane.State newState = State.IN_APPROACH;
			
			// set new state
			switch(airplane.getState()) {
			
			case IN_APPROACH:
				newState = State.ACCEPTED;
				break;
			
			case ACCEPTED:
			case IN_QUEUE:
				newState = State.LANDED;
				break;
			
			case LANDED:
				newState = State.PARKING;
				releaseRunway(getAirplane(airplaneId).getRunway().getId());
				break;
			
			case PARKING:
				newState = State.PARKING;
				break;
			
			}
			
			// write to database
			Query qNewState = em.createQuery("update airplane set state = '" + newState.ordinal() + "'" +
								" where id = '" + airplaneId + "'");
			int updateCnt = qNewState.executeUpdate();
			
			if(updateCnt <= 0) {
				System.out.println("[AirportFacade][nextState] Error: Set new state " +
									newState + " failed! No database update.");
			}
			
			
		}else{
			System.out.println("[AirportFacade][nextState] Error: No airplane found! (airplane id: " + airplaneId + ")");
			return;
		}
		
	}