FileDocCategorySizeDatePackage
Customer.javaAPI DocJBoss 4.2.14711Fri Jul 13 20:55:36 BST 2007xpetstore.domain

Customer

public class Customer extends Object implements Serializable
author
Herve Tchepannou
hibernate.class
table="T_CUSTOMER"

Fields Summary
private Account
_account
private Address
_address
private CreditCard
_creditCard
private String
_email
private String
_firstname
private String
_language
private String
_lastname
private String
_telephone
Constructors Summary
public Customer()


    //~ Constructors -----------------------------------------------------------

        
public Customer(Account account)

        _account = account;
    
Methods Summary
public AccountgetAccount()

return
Account
hibernate.one-to-one
cascade="all"

        return _account;
    
public AddressgetAddress()

return
Address
hibernate.component

        return _address;
    
public CreditCardgetCreditCard()

return
CreditCard
hibernate.component

        return _creditCard;
    
public java.lang.StringgetEmail()

return
String
hibernate.property
length="255" not-null="true" unique="true"

        return _email;
    
public java.lang.StringgetFirstname()

return
String
hibernate.property
length="50"

        return _firstname;
    
public java.lang.StringgetLanguage()

return
String
hibernate.property
length="3"

        return _language;
    
public java.lang.StringgetLastname()

return
String
hibernate.property
length="50"

        return _lastname;
    
public java.lang.StringgetTelephone()

return
String
hibernate.property
length="10"

        return _telephone;
    
public java.lang.StringgetUserId()

return
String
hibernate.id
generator-class="assigned" length="10"

        return ( _account != null )
               ? _account.getUserId(  )
               : "";
    
public voidset(xpetstore.domain.Customer cst)

        _account.set( cst.getAccount(  ) );
        _address.set( cst.getAddress(  ) );
        _creditCard.set( cst.getCreditCard(  ) );
        _email     = cst.getEmail(  );
        _firstname = cst.getFirstname(  );
        _lastname  = cst.getLastname(  );
        _language  = cst.getLanguage(  );
        _telephone = cst.getTelephone(  );
    
public voidsetAccount(Account account)
Sets the account.

param
account The account to set

        _account = account;
    
public voidsetAddress(Address address)
Sets the address.

param
address The address to set

        _address = address;
    
public voidsetCreditCard(CreditCard creditCard)
Sets the creditCard.

param
creditCard The creditCard to set

        _creditCard = creditCard;
    
public voidsetEmail(java.lang.String email)
Sets the email.

param
email The email to set

        _email = email;
    
public voidsetFirstname(java.lang.String firstname)
Sets the firstname.

param
firstname The firstname to set

        _firstname = firstname;
    
public voidsetLanguage(java.lang.String language)
Sets the language.

param
language The language to set

        _language = language;
    
public voidsetLastname(java.lang.String lastname)
Sets the lastname.

param
lastname The lastname to set

        _lastname = lastname;
    
public voidsetTelephone(java.lang.String telephone)
Sets the telephone.

param
telephone The telephone to set

        _telephone = telephone;
    
public voidsetUserId(java.lang.String userId)
Sets the userId.

param
userId The userId to set

        if ( _account == null )
        {
            _account = new Account(  );
        }

        _account.setUserId( userId );