/**
 * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * Component of: Red Hat Application Server
 * 
 * Initial Developers: Aizaz Ahmed
 *                     Vivek Lakshmanan
 *                     Andrew Overholt
 *                     Matthew Wringe
 *
 */

/*
 * AddressBean.java
 * 
 * Created on Aug 16, 2004
 *
 */
package olstore.entity;

import javax.ejb.EntityBean;

/**
 * @ejb.bean name="Address"
 *  description="This bean is used to store information about the user's address."
 *	type="CMP"
 *  schema="olstore_address"
 *  reentrant="false"
 *  cmp-version="2.x"
 *  view-type="local"
 *  local-jndi-name="AddressLocal_L"
 * 
 * @ejb.relation
 *  name="User-Address"
 *  role-name="Address-belongs-to-User"
 *  target-ejb="User"
 *  cascade-delete="yes"
 * 
 * @ejb.transaction
 *  type="Required"
 * 
 * @ejb:pk
 *  class="java.lang.Object"
 *  generate="false"
 * 
 *--
 * This is needed for JOnAS.
 * If you are not using JOnAS you can safely remove the tags below.
 * @jonas.bean ejb-name="Address"
 * jndi-name="AddressLocal"
 * @jonas.jdbc-mapping  jndi-name="jdbc_1" jdbc-table-name="olstore_address" 
 * --
 * 
 *  @ejb.persistence 
 * 
 * @ejb.finder 
 *    query="SELECT OBJECT(a) FROM olstore_address as a"  
 *    signature="java.util.Collection findAll()"  
 * 
 *--
 * This is needed for JOnAS.
 * If you are not using JOnAS you can safely remove the tags below.
 * @jonas.finder-method-jdbc-mapping  method-name="findAll"
 *	jdbc-where-clause=""
 * @jonas.jdbc-mapping  jndi-name="jdbc_1"
 *	jdbc-table-name="olstore_address"
 * 
 *--
 *  
 **/

public abstract class AddressBean implements EntityBean {
    
    /**
     * The  ejbCreate method.
     * 
     * @ejb.create-method 
     */
    public java.lang.String ejbCreate(String country, String city, String postCode, String street1, String street2, String province)
    throws javax.ejb.CreateException {
        setCountry (country);
        setCity (city);
        setPostalCode (postCode);
        setStreet1 (street1);
        setStreet2 (street2);
        setProvince (province);
        return null;
    }
    
    /**
     * The container invokes this method immediately after it calls ejbCreate.
     * 
     */
    public void ejbPostCreate(String country, String city, String postCode, String street1, String street2, String province) throws javax.ejb.CreateException {
    }
    
    /**
     * Returns the country
     * @return the country
     * 
     * @ejb.persistent-field 
     * @ejb.persistence
     *    column-name="country"
     *     sql-type="VARCHAR"
     *  
     * @ejb.interface-method
     * 
     * --
     * This is needed for JOnAS.
     * If you are not using JOnAS you can safely remove the tags below.
     * @jonas.cmp-field-jdbc-mapping  field-name="country"
     *	jdbc-field-name="country"
     * 
     --
     */
    public abstract java.lang.String getCountry();
    
    /**
     * Sets the country
     * 
     * @param java.lang.String the new country value
     * 
     * @ejb.interface-method
     */
    public abstract void setCountry(java.lang.String country);
    
    /**
     * Returns the province
     * @return the province
     * 
     * @ejb.persistent-field 
     * @ejb.persistence
     *    column-name="province"
     *     sql-type="VARCHAR"
     *  
     * @ejb.interface-method
     * 
     * --
     * This is needed for JOnAS.
     * If you are not using JOnAS you can safely remove the tags below.
     * @jonas.cmp-field-jdbc-mapping  field-name="province"
     *	jdbc-field-name="province"
     * 
     --
     */
    public abstract java.lang.String getProvince();
    
    /**
     * Sets the province
     * 
     * @param java.lang.String the new province value
     * 
     * @ejb.interface-method
     */
    public abstract void setProvince(java.lang.String province);
    
    
    /**
     * Returns the city
     * @return the city
     * 
     * @ejb.persistent-field 
     * @ejb.persistence
     *    column-name="city"
     *     sql-type="VARCHAR"
     *  
     * @ejb.interface-method
     * 
     * --
     * This is needed for JOnAS.
     * If you are not using JOnAS you can safely remove the tags below.
     * @jonas.cmp-field-jdbc-mapping  field-name="city"
     *	jdbc-field-name="city"
     * 
     --
     */
    public abstract java.lang.String getCity();
    
    /**
     * Sets the city
     * 
     * @param java.lang.String the new city value
     * 
     * @ejb.interface-method
     */
    public abstract void setCity(java.lang.String city);
    
    /**
     * Returns the postalCode
     * @return the postalCode
     * 
     * @ejb.persistent-field 
     * @ejb.persistence
     *    column-name="postalCode"
     *     sql-type="VARCHAR"
     *  
     * @ejb.interface-method
     * 
     * --
     * This is needed for JOnAS.
     * If you are not using JOnAS you can safely remove the tags below.
     * @jonas.cmp-field-jdbc-mapping  field-name="postalCode"
     *	jdbc-field-name="postalCode"
     * 
     --
     */
    public abstract java.lang.String getPostalCode();
    
    /**
     * Sets the postalCode
     * 
     * @param java.lang.String the new postalCode value
     * 
     * @ejb.interface-method
     */
    public abstract void setPostalCode(java.lang.String postalCode);
    
    /**
     * Returns the street1
     * @return the street1
     * 
     * @ejb.persistent-field 
     * @ejb.persistence
     *    column-name="street1"
     *     sql-type="VARCHAR"
     *  
     * @ejb.interface-method
     * 
     * --
     * This is needed for JOnAS.
     * If you are not using JOnAS you can safely remove the tags below.
     * @jonas.cmp-field-jdbc-mapping  field-name="street1"
     *	jdbc-field-name="street1"
     * 
     --
     */
    public abstract java.lang.String getStreet1();
    
    /**
     * Sets the street1
     * 
     * @param java.lang.String the new street1 value
     * 
     * @ejb.interface-method
     */
    public abstract void setStreet1(java.lang.String street1);
    
    /**
     * Returns the street2
     * @return the street2
     * 
     * @ejb.persistent-field 
     * @ejb.persistence
     *    column-name="street2"
     *     sql-type="VARCHAR"
     *  
     * @ejb.interface-method
     * 
     * --
     * This is needed for JOnAS.
     * If you are not using JOnAS you can safely remove the tags below.
     * @jonas.cmp-field-jdbc-mapping  field-name="street2"
     *	jdbc-field-name="street2"
     * 
     --
     */
    public abstract java.lang.String getStreet2();
    
    /**
     * Sets the street2
     * 
     * @param java.lang.String the new street2 value
     * 
     * @ejb.interface-method
     */
    public abstract void setStreet2(java.lang.String street2);
    
}
