this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);
//Return target creature card from your graveyard to your hand;
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
// and/or return target enchantment card from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(filterCard));
this.getSpellAbility().addMode(mode);
}