[cvs] expresso commit by lhamel: use constants for field size

JCorporate Ltd jcorp at jcorporate.com
Thu Feb 17 05:32:39 UTC 2005


Log Message:
-----------
use constants for field size

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj:
        ISOCountryCodes.java

Revision Data
-------------
Index: ISOCountryCodes.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj/ISOCountryCodes.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj/ISOCountryCodes.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj/ISOCountryCodes.java -u -r1.19 -r1.20
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj/ISOCountryCodes.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/dbobj/ISOCountryCodes.java
@@ -117,6 +117,9 @@
      * Used to match compiled patterns against strings
      */
     protected static PatternMatcher matcher = new Perl5Matcher();
+    public static final int CODE_FIELD_SIZE = 10;
+    public static final int NAME_FIELD_SIZE = 128;
+    public static final int REGEXP_FIELD_SIZE = 128;
 
     /**
      * Constructor
@@ -266,9 +269,9 @@
         setTargetTable(TABLE);
         setDescription("ISO Country Codes");
         setCharset("ISO-8859-1");
-        addField(FLD_ISOCODE, DBField.VARCHAR_TYPE, 10, false, "ISO Country Code");
-        addField(FLD_COUNTRY, DBField.VARCHAR_TYPE, 128, false, "Country Name");
-        addField(FLD_POSTALREGEXP, DBField.VARCHAR_TYPE, 128, true,
+        addField(FLD_ISOCODE, DBField.VARCHAR_TYPE, CODE_FIELD_SIZE, false, "ISO Country Code");
+        addField(FLD_COUNTRY, DBField.VARCHAR_TYPE, NAME_FIELD_SIZE, false, "Country Name");
+        addField(FLD_POSTALREGEXP, DBField.VARCHAR_TYPE, REGEXP_FIELD_SIZE, true,
                 "Postal Code Valid Regular Expression");
         setStringFilter(FLD_ISOCODE, "stripFilter");
         setStringFilter(FLD_COUNTRY, "rawFilter");


More information about the cvs mailing list