FileDocCategorySizeDatePackage
Customer.javaAPI DocJBoss 4.2.19216Fri Jul 13 20:55:58 BST 2007xpetstore.domain.customer.ejb

Customer

public class Customer extends Object
ejb.bean name="Customer" type="CMP" view-type="local" primkey-field="userId" schema="Customer" cmp-version="${ejb.cmp.version}"
ejb.value-object name="Customer" match="*"
ejb.transaction type="Required"
ejb.persistence table-name="T_CUSTOMER"
ejb.finder signature="Customer findByEmail(java.lang.String email)" query="SELECT OBJECT(c) FROM Customer AS c WHERE c.email = ?1"
jboss.persistence create-table="${jboss.create.table}" remove-table="${jboss.remove.table}"

Fields Summary
private String
userId
private String
firstname
private String
lastname
private String
email
private String
telephone
private String
localeId
private String
street1
private String
street2
private String
city
private String
state
private String
zipcode
private String
country
private String
creditCardNumber
private String
creditCardExpiryDate
private String
creditCardType
private xpetstore.domain.signon.ejb.Account
account
Constructors Summary
public Customer()

      
   
public Customer(xpetstore.domain.signon.ejb.Account account)

      setUserId( account.getUserId(  ) );
   
public Customer(String userId, String firstname, String lastname, String email, String telephone, String localeId, String street1, String street2, String city, String state, String zipcode, String country, String creditCardNumber, String creditCardType, String creditCardExpiryDate)

      this.userId = userId;
      this.firstname = firstname;
      this.lastname = lastname;
      this.email = email;
      this.telephone = telephone;
      this.localeId = localeId;
      this.street1 = street1;
      this.street2 = street2;
      this.city = city;
      this.state = state;
      this.zipcode = zipcode;
      this.country = country;
      this.creditCardNumber = creditCardNumber;
      this.creditCardExpiryDate = creditCardExpiryDate;
      this.creditCardType = creditCardType;
   
Methods Summary
public xpetstore.domain.signon.ejb.AccountgetAccount()

ejb.interface-method
ejb.relation name="customer-account" role-name="customer-has-account" target-ejb="Account" target-role-name="account-belongs_to-customer" target-cascade-delete="yes"
ejb.value-object compose="xpetstore.domain.signon.model.AccountValue" compose-name="AccountValue" members="xpetstore.domain.signon.interfaces.Account" members-name="AccountValue" relation="external"
jboss.relation fk-column="account_fk" related-pk-field="userId" fk-contraint="${db.foreign.key}
weblogic.column-map foreign-key-column="account_fk"

       return account;
    
public java.lang.StringgetCity()

ejb.persistence column-name="city" jdbc-type="VARCHAR" sql-type="varchar(25)"

       return city;
    
public java.lang.StringgetCountry()

ejb.persistence column-name="country" jdbc-type="VARCHAR" sql-type="varchar(3)"

       return country;
    
public java.lang.StringgetCreditCardExpiryDate()

ejb.persistence column-name="creditCardExpiryDate" jdbc-type="VARCHAR" sql-type="varchar(10)"

       return creditCardExpiryDate;
    
public java.lang.StringgetCreditCardNumber()

ejb.persistence column-name="creditCardNumber" jdbc-type="VARCHAR" sql-type="varchar(25)"

       return creditCardNumber;
    
public java.lang.StringgetCreditCardType()

ejb.persistence column-name="creditCardType" jdbc-type="VARCHAR" sql-type="varchar(25)"

       return creditCardType;
    
public java.lang.StringgetEmail()

ejb.persistence column-name="email" jdbc-type="VARCHAR" sql-type="varchar(255)"

       return email;
    
public java.lang.StringgetFirstname()

ejb.persistence column-name="firstname" jdbc-type="VARCHAR" sql-type="varchar(50)"

       return firstname;
    
public java.lang.StringgetLanguage()

ejb.persistence column-name="language" jdbc-type="VARCHAR" sql-type="varchar(3)"

       return localeId;
    
public java.lang.StringgetLastname()

ejb.persistence column-name="lastname" jdbc-type="VARCHAR" sql-type="varchar(50)"

       return lastname;
    
public java.lang.StringgetState()

ejb.persistence column-name="state" jdbc-type="VARCHAR" sql-type="varchar(3)"

       return state;
    
public java.lang.StringgetStreet1()

ejb.persistence column-name="street1" jdbc-type="VARCHAR" sql-type="varchar(50)"

       return street1;
    
public java.lang.StringgetStreet2()

ejb.persistence column-name="street2" jdbc-type="VARCHAR" sql-type="varchar(50)"

       return street2;
    
public java.lang.StringgetTelephone()

ejb.persistence column-name="telephone" jdbc-type="VARCHAR" sql-type="varchar(10)"

       return telephone;
    
public java.lang.StringgetUserId()

ejb.pk-field
ejb.persistence column-name="userId" jdbc-type="VARCHAR" sql-type="varchar(10)"
ejb.interface-method
ejb.transaction type="Supports"

       return userId;
    
public java.lang.StringgetZipcode()

ejb.persistence column-name="zipcode" jdbc-type="VARCHAR" sql-type="varchar(10)"

       return zipcode;
    
public voidsetAccount(xpetstore.domain.signon.ejb.Account account)

       this.account = account;
    
public voidsetCity(java.lang.String city)

       this.city = city;
    
public voidsetCountry(java.lang.String country)

       this.country = country;
    
public voidsetCreditCardExpiryDate(java.lang.String creditCardExpiryDate)

       this.creditCardExpiryDate = creditCardExpiryDate;
    
public voidsetCreditCardNumber(java.lang.String creditCardNumber)

       this.creditCardNumber = creditCardNumber;
    
public voidsetCreditCardType(java.lang.String creditCardType)

       this.creditCardType = creditCardType;
    
public voidsetEmail(java.lang.String email)

       this.email = email;
    
public voidsetFirstname(java.lang.String firstname)

       this.firstname = firstname;
    
public voidsetLanguage(java.lang.String localeId)

       this.localeId = localeId;
    
public voidsetLastname(java.lang.String lastname)

       this.lastname = lastname;
    
public voidsetState(java.lang.String state)

       this.state = state;
    
public voidsetStreet1(java.lang.String street1)

       this.street1 = street1;
    
public voidsetStreet2(java.lang.String street2)

       this.street2 = street2;
    
public voidsetTelephone(java.lang.String telephone)

       this.telephone = telephone;
    
public voidsetUserId(java.lang.String userId)

       this.userId = userId;
    
public voidsetZipcode(java.lang.String zipcode)

       this.zipcode = zipcode;
    
public java.lang.StringtoString()

       StringBuffer buffer = new StringBuffer(200);
       buffer.append("[Customer: userId " + userId);
       buffer.append(", email " + email);
       buffer.append(", account " + account);
       buffer.append("]");
       
       return buffer.toString();