com.ibm.commerce.taxation.objects
Class StateProvinceAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
              |
              +--com.ibm.commerce.taxation.objects.StateProvinceAccessBean
All Implemented Interfaces:
java.io.Serializable, StateProvinceAccessBeanData

public class StateProvinceAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements StateProvinceAccessBeanData

This bean provides access to the STATEPROV table.

The following is a description of this table:

This table lists State and Province names (by country or region) in each of the supported Languages identified by LANGUAGE_ID.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
StateProvinceAccessBean()
          Default constructor.
StateProvinceAccessBean(javax.ejb.EJBObject ejbObject)
          Maps to a corresponding ejbCreate method in the home interface of the EJB
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 java.util.Enumeration findByCountryNameAndLanguageId(java.lang.String countryName, java.lang.Integer languageId)
          Retrieves all the states or provinces for the indicated country and language.
 java.util.Enumeration findByLanguageIdAndState(java.lang.Integer languageId, java.lang.String stateName)
          Retrieves all the states or provinces for the indicated country and language.
 java.util.Enumeration findByLanguageIdAndStateName(java.lang.Integer languageId, java.lang.String stateName)
          Retrieves all the states or provinces for the indicated country and language.
 java.util.Enumeration findByLanguageIdStateAbbrAndCountryAbbr(java.lang.Integer languageId, java.lang.String stateAbbr, java.lang.String countryAbbr)
          Retrieves all the states or provinces for the indicated country and language.
 java.util.Enumeration findByLanguageIdStateAndCountryAbbr(java.lang.Integer languageId, java.lang.String stateName, java.lang.String countryAbbr)
          Retrieves all the states or provinces for the indicated state, country abbreviation and language.
 java.util.Enumeration findByLanguageIdStateNameAndCountryAbbr(java.lang.Integer languageId, java.lang.String stateName, java.lang.String countryAbbr)
          Retrieves all the states or provinces for the indicated country and language.
 java.util.Enumeration findByNameAndCountryAbbreviationCode(java.lang.String stateName, java.lang.String countryAbbr)
          Retrieves all the states or provinces for the indicated country and language.
 java.lang.String getCountryAbbr()
          This method provides access to the STATEPROV.COUNTRYABBR column of DB2 type CHAR(5) NULL.
 java.lang.String getLanguageId()
          This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.
 java.lang.Integer getLanguageIdInEJBType()
          This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.
 java.lang.String getName()
          This method provides access to the STATEPROV.NAME column of DB2 type VARCHAR(254) NULL.
 java.lang.String getStateAbbr()
          This method provides access to the STATEPROV.STATEPROVABBR column of DB2 type CHAR(20) NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setCountryAbbr(java.lang.String aCountryAbbr)
          This method provides access to the STATEPROV.COUNTRYABBR column of DB2 type CHAR(5) NULL.
 void setInitKey_nLanguageId(java.lang.String aInitKey_nLanguageId)
          Set the primary key for this object
 void setInitKey_strStateAbbr(java.lang.String aInitKey_strStateAbbr)
          Set the primary key for this object
 void setLanguageId(java.lang.Integer aLanguageId)
          This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.
 void setLanguageId(java.lang.String aLanguageId)
          This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.
 void setName(java.lang.String aName)
          This method provides access to the STATEPROV.NAME column of DB2 type VARCHAR(254) NULL.
 void setStateAbbr(java.lang.String aStateAbbr)
          This method provides access to the STATEPROV.STATEPROVABBR column of DB2 type CHAR(20) NOT NULL.
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
__getCache, __getCache, __getKey, __setCache, __setCache, __setKey, commitCopyHelper, createAccessBeans, createAccessBeans, instantiateEJBByPrimaryKey, refreshCopyHelper, setEJBRef
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
defaultJNDIName, defaultNameServiceType, defaultNameServiceURL, getEJBRef, getGlobalHome, getHome, getInit_GlobalNameServiceTypeName, getInit_GlobalNameServiceURLName, getInit_JNDIName, getInit_NameServiceTypeName, getInit_NameServiceURLName, getInitContext, getInitContext, instantiateEJB, resetEJBRef, resetHomeCache, setInit_GlobalNameServiceTypeName, setInit_GlobalNameServiceURLName, setInit_JNDIName, setInit_NameServiceTypeName, setInit_NameServiceURLName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateProvinceAccessBean

public StateProvinceAccessBean()

Default constructor. Maps to findByPrimaryKey.


StateProvinceAccessBean

public StateProvinceAccessBean(javax.ejb.EJBObject ejbObject)
                        throws java.rmi.RemoteException

Maps to a corresponding ejbCreate method in the home interface of the EJB

Parameters:
ejbObject - javax.ejb.EJBObject
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
Method Detail

commitCopyHelper

public void commitCopyHelper()
                      throws java.rmi.RemoteException,
                             javax.ejb.CreateException,
                             javax.ejb.FinderException,
                             javax.naming.NamingException

Update(flush) data to the EJBObject (persistent storage).

Overrides:
commitCopyHelper in class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
Returns:
void
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByCountryNameAndLanguageId

public java.util.Enumeration findByCountryNameAndLanguageId(java.lang.String countryName,
                                                            java.lang.Integer languageId)
                                                     throws java.rmi.RemoteException,
                                                            javax.ejb.FinderException,
                                                            javax.naming.NamingException

Retrieves all the states or provinces for the indicated country and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV T1 WHERE T1.COUNTRYABBR = ANY (SELECT COUNTRY.COUNTRYABBR FROM COUNTRY WHERE COUNTRY.NAME = ? AND COUNTRY.LANGUAGE_ID = T1.LANGUAGE_ID) AND T1.LANGUAGE_ID = ?

Parameters:
countryName - java.lang.String
languageId - java.lang.Integer
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByLanguageIdAndState

public java.util.Enumeration findByLanguageIdAndState(java.lang.Integer languageId,
                                                      java.lang.String stateName)
                                               throws java.rmi.RemoteException,
                                                      javax.ejb.FinderException,
                                                      javax.naming.NamingException

Retrieves all the states or provinces for the indicated country and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV T1 WHERE T1.LANGUAGE_ID=? AND ((T1.NAME=?) OR (T1.STATEPROVABBR=?))

Parameters:
languageId - java.lang.Integer
stateName - java.lang.String
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByLanguageIdAndStateName

public java.util.Enumeration findByLanguageIdAndStateName(java.lang.Integer languageId,
                                                          java.lang.String stateName)
                                                   throws java.rmi.RemoteException,
                                                          javax.ejb.FinderException,
                                                          javax.naming.NamingException

Retrieves all the states or provinces for the indicated country and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV T1 WHERE T1.LANGUAGE_ID=? AND T1.NAME=?

Parameters:
languageId - java.lang.Integer
stateName - java.lang.String
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByLanguageIdStateAbbrAndCountryAbbr

public java.util.Enumeration findByLanguageIdStateAbbrAndCountryAbbr(java.lang.Integer languageId,
                                                                     java.lang.String stateAbbr,
                                                                     java.lang.String countryAbbr)
                                                              throws java.rmi.RemoteException,
                                                                     javax.ejb.FinderException,
                                                                     javax.naming.NamingException

Retrieves all the states or provinces for the indicated country and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV T1 WHERE T1.LANGUAGE_ID=? AND T1.STATEPROVABBR=? AND T1.COUNTRYABBR=?

Parameters:
languageId - java.lang.Integer
stateAbbr - java.lang.String
countryAbbr - java.lang.String
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByLanguageIdStateAndCountryAbbr

public java.util.Enumeration findByLanguageIdStateAndCountryAbbr(java.lang.Integer languageId,
                                                                 java.lang.String stateName,
                                                                 java.lang.String countryAbbr)
                                                          throws java.rmi.RemoteException,
                                                                 javax.ejb.FinderException,
                                                                 javax.naming.NamingException

Retrieves all the states or provinces for the indicated state, country abbreviation and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV WHERE T1.LANGUAGE_ID=? AND ((T1.NAME=?) OR (T1.STATEPROVABBR=?)) AND (T1.COUNTRYABBR=?)

Parameters:
languageId - java.lang.Integer
stateName - java.lang.String
countryAbbr - java.lang.String
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByLanguageIdStateNameAndCountryAbbr

public java.util.Enumeration findByLanguageIdStateNameAndCountryAbbr(java.lang.Integer languageId,
                                                                     java.lang.String stateName,
                                                                     java.lang.String countryAbbr)
                                                              throws java.rmi.RemoteException,
                                                                     javax.ejb.FinderException,
                                                                     javax.naming.NamingException

Retrieves all the states or provinces for the indicated country and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV T1 WHERE T1.LANGUAGE_ID=? AND T1.NAME=? AND T1.COUNTRYABBR=?

Parameters:
languageId - java.lang.Integer
stateName - java.lang.String
countryAbbr - java.lang.String
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findByNameAndCountryAbbreviationCode

public java.util.Enumeration findByNameAndCountryAbbreviationCode(java.lang.String stateName,
                                                                  java.lang.String countryAbbr)
                                                           throws java.rmi.RemoteException,
                                                                  javax.ejb.FinderException,
                                                                  javax.naming.NamingException

Retrieves all the states or provinces for the indicated country and language.

The SQL query used to fetch all the required rows from the STATEPROV table is:

SELECT * FROM STATEPROV T1 T1.NAME=? AND T1.COUNTRYABBR=?

Parameters:
stateName - java.lang.String
countryAbbr - java.lang.String
Returns:
java.util.Enumeration of all the StateProvinceAccessBeans representing rows that match the search criteria.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getCountryAbbr

public java.lang.String getCountryAbbr()
                                throws java.rmi.RemoteException,
                                       javax.ejb.CreateException,
                                       javax.ejb.FinderException,
                                       javax.naming.NamingException

This method provides access to the STATEPROV.COUNTRYABBR column of DB2 type CHAR(5) NULL.

The following is a description of this column:

Country or region abbreviation code for the country or region. The country or region name is stored in the COUNTRY table.

Specified by:
getCountryAbbr in interface StateProvinceAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getLanguageId

public java.lang.String getLanguageId()
                               throws java.rmi.RemoteException,
                                      javax.ejb.CreateException,
                                      javax.ejb.FinderException,
                                      javax.naming.NamingException

This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

The Language ID that identifies the Language. Foreign key that references the LANGUAGE_ID column in the LANGUAGE table.

Specified by:
getLanguageId in interface StateProvinceAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getLanguageIdInEJBType

public java.lang.Integer getLanguageIdInEJBType()
                                         throws java.rmi.RemoteException,
                                                javax.ejb.CreateException,
                                                javax.ejb.FinderException,
                                                javax.naming.NamingException

This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

The Language ID that identifies the Language. Foreign key that references the LANGUAGE_ID column in the LANGUAGE table.

Returns:
java.lang.Integer
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException,
                                javax.ejb.CreateException,
                                javax.ejb.FinderException,
                                javax.naming.NamingException

This method provides access to the STATEPROV.NAME column of DB2 type VARCHAR(254) NULL.

The following is a description of this column:

Name of the State or Province.

Specified by:
getName in interface StateProvinceAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getStateAbbr

public java.lang.String getStateAbbr()
                              throws java.rmi.RemoteException,
                                     javax.ejb.CreateException,
                                     javax.ejb.FinderException,
                                     javax.naming.NamingException

This method provides access to the STATEPROV.STATEPROVABBR column of DB2 type CHAR(20) NOT NULL.

The following is a description of this column:

State Abbreviation code for the state or province.

Specified by:
getStateAbbr in interface StateProvinceAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

refreshCopyHelper

public void refreshCopyHelper()
                       throws java.rmi.RemoteException,
                              javax.ejb.CreateException,
                              javax.ejb.FinderException,
                              javax.naming.NamingException

Load data from the EJBObject.

Overrides:
refreshCopyHelper in class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
Returns:
void
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

setCountryAbbr

public void setCountryAbbr(java.lang.String aCountryAbbr)

This method provides access to the STATEPROV.COUNTRYABBR column of DB2 type CHAR(5) NULL.

The following is a description of this column:

Country or region abbreviation code for the country or region. The country or region name is stored in the COUNTRY table.

Specified by:
setCountryAbbr in interface StateProvinceAccessBeanData
Parameters:
aCountryAbbr - java.lang.String
Returns:
void

setInitKey_nLanguageId

public void setInitKey_nLanguageId(java.lang.String aInitKey_nLanguageId)

Set the primary key for this object

Parameters:
aInitKey_nLanguageId - java.lang.String
Returns:
void

setInitKey_strStateAbbr

public void setInitKey_strStateAbbr(java.lang.String aInitKey_strStateAbbr)

Set the primary key for this object

Parameters:
aInitKey_strStateAbbr - java.lang.String
Returns:
void

setLanguageId

public void setLanguageId(java.lang.Integer aLanguageId)

This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

The Language ID that identifies the Language. Foreign key that references the LANGUAGE_ID column in the LANGUAGE table.

Parameters:
aLanguageId - java.lang.Integer
Returns:
void

setLanguageId

public void setLanguageId(java.lang.String aLanguageId)

This method provides access to the STATEPROV.LANGUAGE_ID column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

The Language ID that identifies the Language. Foreign key that references the LANGUAGE_ID column in the LANGUAGE table.

Specified by:
setLanguageId in interface StateProvinceAccessBeanData
Parameters:
aLanguageId - java.lang.String
Returns:
void

setName

public void setName(java.lang.String aName)

This method provides access to the STATEPROV.NAME column of DB2 type VARCHAR(254) NULL.

The following is a description of this column:

The Name of the State or Province in the Language identified by the LANGUAGE_ID.

Specified by:
setName in interface StateProvinceAccessBeanData
Parameters:
aName - java.lang.String
Returns:
void

setStateAbbr

public void setStateAbbr(java.lang.String aStateAbbr)

This method provides access to the STATEPROV.STATEPROVABBR column of DB2 type CHAR(20) NOT NULL.

The following is a description of this column:

State Abbreviation code for the state or province.

Specified by:
setStateAbbr in interface StateProvinceAccessBeanData
Parameters:
aStateAbbr - java.lang.String
Returns:
void