Package models

Examples of models.Member.save()


            try {
                txTemplate.execute(new TransactionCallbackWithoutResult() {
                    public void doInTransaction() {
                        final Member member = Member.findById(memberId);
                        member.setTicketingRegistered(YurPlan.isRegisteredAttendee(member, token));
                        member.save();
                    }
                });
            } catch (Exception e) {
                Logger.error("Exception while registering user, skipped to next", e);
            }
View Full Code Here


public class YurPlanTest extends UnitTest {

    protected static Member createMember(final String email) {
        Member member = new Member(email);
        member.email = email;
        member.save();
        return member;
    }
    @Test
    public void testLoginOK() {
        //identifiants YurPlan corrects
View Full Code Here

    private static Member createMember(final String login){
        Member m = new Member(login);
        m.firstname = login;
        m.lastname = login;
        return m.save();
    }

    @Test public void find() {

        Member speaker1 = createMember("speaker1");
View Full Code Here

   
    private static Member createMember(final String login){
        Member m = new Member(login);
        m.firstname = login;
        m.lastname = login;
        return m.save();
    }
   
    private static Talk createTalk(final String title, Member speaker, boolean valid){
        Talk t = new Talk();
        t.title = title;
View Full Code Here

        Logger.info("BEGIN JOB JobMajUserRegisteredTicketing for member with id %d", idMember);
        Member member = Member.findById(idMember);
        if (member != null) {
            String token = YurPlan.login();
            member.setTicketingRegistered(YurPlan.isRegisteredAttendee(member, token));
            member.save();
        } else {
            Logger.error("JOB JobMajUserRegisteredTicketing, member id %d not found", idMember);
        }
        Logger.info("END JOB JobMajUserRegisteredTicketing for member %d", idMember);
View Full Code Here

        m.firstname = Dummy.randomName(20);
        m.lastname = Dummy.randomName(30);
        m.longDescription = Dummy.randomText(5000);
        m.shortDescription = Dummy.randomText(140);
        m.nbConsults = Dummy.randomInt(9999);
        m.save();
       
        // Accounts
        m.addAccount(new TwitterAccount(Dummy.randomScreenName()));
        m.addAccount(new GoogleAccount(Dummy.randomGoogleId()));
       
View Full Code Here

        final int nbSharedLinks = Dummy.randomInt(5);
        for (int i = 0; i < nbSharedLinks; i++) {
            m.addSharedLink(new SharedLink(Dummy.randomString(25), Dummy.randomURL()));
        }
      
        return m.save();
    }
   
    public static Set<Member> createMembers(int nb) {
        Set<Member> members = new HashSet<Member>(nb);
        for (int i = 0; i < nb; i++) {
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.