Package com.titan.customer

Examples of com.titan.customer.Name


          CruiseLocal cruise, CabinLocal cabin,
          double amount)
  throws javax.ejb.FinderException, java.rmi.RemoteException, 
       javax.naming.NamingException {
   
    Name custname = customer.getName();
        System.out.println("Got customer Name");

    description = custname.getFirstName()+
       " " + custname.getLastName() +
       " has been booked for the "
       + cruise.getName() +
       " cruise on ship " +
       cruise.getShip().getName() + ".\n"
       " Your accommodations include " +
View Full Code Here


      javax.rmi.PortableRemoteObject.narrow(obj, CustomerHomeRemote.class);

    // create example customer
    System.out.println("Creating customer for use in example...");
    Integer primaryKey = new Integer(1);
    Name name = new Name("Monson", "Richard");
    CustomerRemote customer = home.create(primaryKey);
    customer.setName(name);

    // find Customer by key
    System.out.println("Getting name of customer using getName()..");
    customer = home.findByPrimaryKey(primaryKey);
    name = customer.getName();
    System.out.print(primaryKey+" = ");
    System.out.println(name.getFirstName( )+" "+name.getLastName( ));
               
    // change customer's name
    System.out.println("Setting name of customer using setName()..");
    name = new Name("Monson-Haefel", "Richard");
    customer.setName(name);
    System.out.println("Getting name of customer using getName()..");
    name = customer.getName();
    System.out.print(primaryKey+" = ");
    System.out.println(name.getFirstName( )+" "+name.getLastName( ));

    // remove Customer to clean up
    System.out.println("Removing customer...");
    customer.remove();
                System.exit(0);
View Full Code Here

          CruiseLocal cruise, CabinLocal cabin,
          double amount)
  throws javax.ejb.FinderException, java.rmi.RemoteException, 
       javax.naming.NamingException {
   
    Name custname = customer.getName();
    description = custname.getFirstName()+
       " " + custname.getLastName() +
       " has been booked for the "
       + cruise.getName() +
       " cruise on ship " +
       cruise.getShip().getName() + ".\n"
       " Your accommodations include " +
View Full Code Here

TOP

Related Classes of com.titan.customer.Name

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.