Examples of MeException


Examples of com.bugyal.imentor.frontend.shared.MeException

  }

  @Override
  public ParticipantVO create(ParticipantVO p) throws MeException {
    if (p.getId() != null && p.getId() != 0) {
      throw new MeException("Cannot create already created participant");
    }

    Location location = new Location(p.getLatitude(), p.getLongitude(), p
        .getLocationString(), p.getRadius());
    Participant pi = null;
    try {
      pi = pm.createParticipant(p.getName(), p.getGender(), location, p
          .getEmail(), p.getFacebookId());
      pm.addHasKnowledge(pi, p.getHasSubjects(), 1, pi);
      pm.addNeedKnowledge(pi, p.getNeedSubjects(), 1, pi);
      save(pi, p);
    } catch (MentorException m) {
      throw new MeException(m.getMessage());
    }
    if (pi != null) {
      return ValueObjectGenerator.create(pi);
    } else {
      return null;
View Full Code Here

Examples of com.bugyal.imentor.frontend.shared.MeException

  }

  @Override
  public OpportunityVO createOpportunity(OpportunityVO o) throws MeException {
    if (o.getId() != null) {
      throw new MeException("Cannot create already created participant");
    }

    Location location = new Location(o.getLatitude(), o.getLongitude(), o
        .getLocString(), o.getRadius());
    Opportunity oi = null;
View Full Code Here

Examples of com.bugyal.imentor.frontend.shared.MeException

  }

  @Override
  public ParticipantVO update(ParticipantVO p) throws MeException {
    if (p.getId() == null) {
      throw new MeException("New participant, cannot update.");
    }

    Participant pi = null;
    Key key = KeyFactory.createKey(Participant.class.getSimpleName(), p
        .getId());

    try {
      pi = pm.findById(key);
      save(pi, p);
    } catch (MentorException m) {
      throw new MeException(m.getMessage());
    }
    if (pi != null) {
      return ValueObjectGenerator.create(pi);
    } else {
      return null;
View Full Code Here

Examples of com.bugyal.imentor.frontend.shared.MeException

  }

  @Override
  public OpportunityVO updateOpportunity(OpportunityVO o) throws MeException {
    if (o.getId() == null) {
      throw new MeException("New opportunity, cannot update.");
    }

    Opportunity oi = null;
    Key key = KeyFactory.createKey(Opportunity.class.getSimpleName(), o
        .getId());

    try {
      oi = om.findById(key);
      save(oi, o);
    } catch (MentorException m) {
      throw new MeException(m.getMessage());
    }
    if (oi != null) {
      return ValueObjectGenerator.create(oi);
    } else {
      return null;
View Full Code Here

Examples of com.bugyal.imentor.frontend.shared.MeException

  public void generateRandomData(int range) throws MeException {
    try {
      new DataGenerator(range);
    } catch (MentorException e) {
      e.printStackTrace();
      throw new MeException(e.getMessage());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.