| |
|
| com.jcorporate.expresso.core.dbobj.SecuredDBObject com.jcorporate.expresso.ext.dbobj.ISOCountryCodes
All known Subclasses: com.jcorporate.expresso.ext.dbobj.ReverseLookupDomains,
ISOCountryCodes | public class ISOCountryCodes extends SecuredDBObject (Code) | | This database table contains a list of all known ISO 3166-1 country codes.
See www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html
for the source of this data.
This is highly useful for registration data. Allow a person to choose from a
dropdown box. Also can check postal code against known regular expressions
depending on the iso country code associated with the registration.
author: Michael Rimov since: Expresso 5.0 |
FLD_POSTALREGEXP | final public static String FLD_POSTALREGEXP(Code) | | |
compiler | protected static PatternCompiler compiler(Code) | | Used for regular expression compilation
|
countryCodeLock | protected static Object countryCodeLock(Code) | | |
matcher | protected static PatternMatcher matcher(Code) | | Used to match compiled patterns against strings
|
regExpCache | protected static Cache regExpCache(Code) | | Used to hold compiled regular expressions in an attempt to speed
up pattern matching.
|
ISOCountryCodes | public ISOCountryCodes(DBConnection myConnection) throws DBException(Code) | | Constructor
Parameters: myConnection - The DBConnection to use Locally |
ISOCountryCodes | public ISOCountryCodes(int uid) throws DBException(Code) | | Use over (String) constructor. Initializes the object in the context
of the user who's uid belongs to the parameter.
Parameters: uid - the Uid of the user context throws: DBException - if there's an initialization problem |
ISOCountryCodes | public ISOCountryCodes(RequestContext request) throws DBException(Code) | | For using DBObjects within Controllers. Initializes based upon the current
user and the requested db. [Of course this can be modified later]
Parameters: request - - The controller request handed to you by the framework. throws: DBException - if there's an initialization problem |
checkPostalCode | public boolean checkPostalCode(String testPostalCode) throws DBException(Code) | | Checks a postal code for proper formatting The iso country definition
should already have been retrieved.
Parameters: testPostalCode - the postalCode to check true if the postal code existed for this country throws: DBException - if the test code didn't match the regular expressionstored in the database OR if the regular expression in the databaseis syntactically invalid |
getCountryCodes | protected static synchronized String[][] getCountryCodes()(Code) | | |
getExpectedDefaultPopulation | public int getExpectedDefaultPopulation()(Code) | | Useful method for unit testing to make sure that everything got added during
setup as expected.
the length of what's expected to be in the table |
getValues | public Vector getValues() throws DBException(Code) | | Vector of ValidValue Value/Description pairs for ISO Country Codes throws: DBException - If the values cannot be retrieved |
Methods inherited from com.jcorporate.expresso.core.dbobj.SecuredDBObject | public void add() throws DBException(Code)(Java Doc) public boolean canRequesterAdd() throws DBException(Code)(Java Doc) public boolean canRequesterDelete() throws DBException(Code)(Java Doc) public boolean canRequesterRead() throws DBException(Code)(Java Doc) public boolean canRequesterUpdate() throws DBException(Code)(Java Doc) public boolean checkAllowed(String requestedFunction) throws DBException(Code)(Java Doc) public void copyAttributes(DBObject returnObj) throws DBException(Code)(Java Doc) public synchronized int count() throws com.jcorporate.expresso.core.db.DBException(Code)(Java Doc) protected synchronized void createSecurityCache() throws CacheException(Code)(Java Doc) public void delete() throws DBException(Code)(Java Doc) public synchronized void deleteAll() throws com.jcorporate.expresso.core.db.DBException(Code)(Java Doc) public boolean find() throws DBException(Code)(Java Doc) public int getRequestingUid()(Code)(Java Doc) protected String getString(String stringCode, Object[] args) throws DBException(Code)(Java Doc) protected String getString(String stringCode) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1, String arg2) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1, String arg2, String arg3) throws DBException(Code)(Java Doc) protected String getString(String stringCode, String arg1, String arg2, String arg3, String arg4) throws DBException(Code)(Java Doc) public int getSystemUid()(Code)(Java Doc) public static SecuredDBObject instantiate(String className) throws DBException(Code)(Java Doc) public void isAllowed(String requestedFunction) throws SecurityException, DBException(Code)(Java Doc) public void retrieve() throws DBException(Code)(Java Doc) public synchronized void search() throws DBException(Code)(Java Doc) public synchronized ArrayList searchAndRetrieveList() throws DBException(Code)(Java Doc) public synchronized ArrayList searchAndRetrieveList(String sortKeys) throws DBException(Code)(Java Doc) public void setRequestingUid(int newUid)(Code)(Java Doc) public void update() throws DBException(Code)(Java Doc)
|
|
|
|