Wars end when one side faces a credible threat of being annihilated and has to surrender, or both sides just get sick of fighting. The problem with wars today is rather than letting them run their course until one side is decisively crushed and has to surrender, we break up the fight, impose a "ceasefire", feed, house and clothe refugees and pour money into reconstructing the damage. The effect of this is to completely shield the participants of war from the true consequences of their decision, and return the situation to the status-quo ante without resolving the cause of the war in the first place.
All this does is subsidize and prolong conflict. After resetting the situation belligerents can re-arm and lick their wounds. The intention is to reduce civilian casualties but what it does is reduce them in the short term in order to prolong them for the long term.
People don't start wars over "grievances" or "offenses" or "misunderstandings". They start them either to defend their interests or because they calculate they can benefit from it. This doesn't have to be a material benefit. It's often honor or prestige that can lend support and short-term stability to an undemocratic, dictatorial government.
So we're looking at everything the wrong way. Forget about "solutions" for the time being. Two-state, three-state, one-state they're all pipe-dreams anyway. The terrorists provoke Israel in the hope of getting a short-term conflict that they know will be broken up after a few weeks. They know public pressure will force a "ceasefire" which they will use to re-arm. They can then boast about how they're the tough guys, "more Islamic than thou" sticking it to the Zio-Imperialists and killing the Jews. Then the cycle will continue when they see their next opportunity.
Instead of trying to stop the war, we should let it run to its conclusion: a decisive, crushing defeat of Hamas that forces them to surrender to save their worthless asses. War actually leads to peace. If the terrorists are utterly crushed, then they're not going to start wars again. They're not going to have the manpower for it. They won't have the funds. The weapons. The logistics network. More importantly their calculation of war will be realigned to reality. People would be less likely to go to war if they knew a crushing, humiliating defeat was waiting for them. This is what war used to be before well-intentioned but misguided notions changed it.
See
Edward Luttwak's (awesome dude) essay
Give War a Chance.