Package org.caffinitas.mapper.demo.entity

Examples of org.caffinitas.mapper.demo.entity.UserEntity


            try
            {

                // create a user object and persist it

                UserEntity snazy = new UserEntity();
                snazy.setUsername("snazy");
                AddressType mainAddress = new AddressType(null, null, "Koeln", "Germany");
                snazy.setMainAddress(mainAddress);
                snazy.getOtherAddresses().put(AddressKind.HOME, mainAddress);
                session.insert(snazy);

                // now load the user object

                UserEntity loaded = session.loadOne(UserEntity.class, "snazy");
                System.out.printf("got user record for %s %n", loaded.getUsername());

                //
                //
                //
View Full Code Here

TOP

Related Classes of org.caffinitas.mapper.demo.entity.UserEntity

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.