Package org.apache.mailreaderjpa

Examples of org.apache.mailreaderjpa.Subscription


            user.setPassword("pass");
            user.setFullName("John Q. User");
            user.setFromAddress("John.User@somewhere.com");
            List<Subscription> list = new ArrayList<Subscription>();
            user.setSubscriptions(list);
            Subscription sub = null;
            sub = new Subscription();
            sub.setUser(user);
            sub.setHost("mail.yahoo.com");
            sub.setProtocol(protocol1);
            sub.setUsername("jquser");
            sub.setPassword("foo");
            list.add(sub);
            sub = new Subscription();
            sub.setUser(user);
            sub.setHost("mail.hotmail.com");
            sub.setProtocol(protocol2);
            sub.setUsername("user1234");
            sub.setPassword("bar");
            list.add(sub);
            em.persist(user);

            // Commit the database updates
            et.commit();
View Full Code Here


        String mode = (String) retrieveData(MODE_KEY);
        if (mode != null) {
            setMode(mode);
        }

        Subscription subscription = (Subscription) retrieveData(SUBSCRIPTION_KEY);
        if (subscription != null) {
            this.subscription = subscription;
        } else {
            setup();
        }
View Full Code Here

    private void setup() {

        if (getId() != 0) {
            this.subscription = getLogic().findSubscriptionById(getId());
        } else {
            this.subscription = new Subscription();
            this.subscription.setUser(getState().getUser());
            this.subscription.setProtocol((Protocol) getDomains().getProtocols()[0].getValue());
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.mailreaderjpa.Subscription

Copyright © 2018 www.massapicom. 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.