Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.remoting.samples.transporter.multiple;
 

Author(s):
Tom Elrod
 
 public class CustomerProcessorImpl implements CustomerProcessor
{
   
Takes the customer passed, and if not null and customer id is less than 0, will create a new random id and set it. The customer object returned will be the modified customer object passed.

Parameters:
customer
Returns:
   public Customer processCustomer(Customer customer)
   {
      if(customer != null && customer.getCustomerId() < 0)
      {
         customer.setCustomerId(new Random().nextInt(1000));
      }
      ..println("processed customer with new id of " + customer.getCustomerId());
      return customer;
   }
New to GrepCode? Check out our FAQ X