Package com.cubusmail.user

Examples of com.cubusmail.user.UserAccountDao


   * @param args
   */
  public static void main( String[] args ) {

    ApplicationContext context = new ClassPathXmlApplicationContext( "cubus_beans.xml" );
    UserAccountDao dao = (UserAccountDao) context.getBean( "userAccountDao" );

   
    UserAccount account = (UserAccount) context.getBean( "userAccount" );
    account.setCreated( new Date() );
    account.setLastLogin( new Date() );
    account.setUsername( "schlierf" );

    for ( int i = 0; i < 5; i++ ) {
      Identity identity = (Identity) context.getBean( "identity" );
      identity.setBcc( "bcc" + 1 );
      identity.setDisplayName( "Displayname" + 1 );
      identity.setEmail( "email" + 1 );
      identity.setOrganisation( "organisation" + 1 );
      account.addIdentity( identity );
    }

    Long id = dao.saveUserAccount( account );
    System.out.println( "id " + id );
  }
View Full Code Here

TOP

Related Classes of com.cubusmail.user.UserAccountDao

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.