Anonymous avatar Anonymous committed 29edb6d

Added unit tests for CachingPropertySet, PropertiesFilePropertySet, and OFBizPropertySet. Added required jars and entity engine config files. Jalopy reformatted some files as well.

git-svn-id: http://svn.opensymphony.com/svn/propertyset/trunk@146 bf3cbcdd-1c1a-0410-9a68-d6f521e3fa7b

Comments (0)

Files changed (38)

Add a comment to this file

lib/optional/hsqldb-1.7.1.jar

Binary file added.

Add a comment to this file

lib/optional/log4j-1.2.8.jar

Binary file added.

Add a comment to this file

lib/optional/tyrex-1.0.1.jar

Binary file added.

src/java/com/opensymphony/ejb/ExceptionlessEntityAdapter.java

 
 import javax.ejb.*;
 
+
 /**
  * <p>
  *   Abstract base adapter class to be extended by EJB EntityBeans. <br>

src/java/com/opensymphony/module/propertyset/DuplicatePropertyKeyException.java

  */
 package com.opensymphony.module.propertyset;
 
+
 /**
  * Thrown if a property is set who's key matches a key of an
  * existing property with different type.

src/java/com/opensymphony/module/propertyset/IllegalPropertyException.java

  */
 package com.opensymphony.module.propertyset;
 
+
 /**
  * Thrown if a property is set which is not allowed.
  *

src/java/com/opensymphony/module/propertyset/InvalidPropertyTypeException.java

  */
 package com.opensymphony.module.propertyset;
 
+
 /**
  * Thrown if a property is attempted to be retrieved that
  * does exist but is of different type.

src/java/com/opensymphony/module/propertyset/PropertyException.java

  */
 package com.opensymphony.module.propertyset;
 
+
 /**
  * Parent class of all exceptions thrown by PropertySet.
  *

src/java/com/opensymphony/module/propertyset/PropertyImplementationException.java

  */
 package com.opensymphony.module.propertyset;
 
+
 /**
  * Thrown if a specific implementation exception is thrown
  * (such as EJBException, RemoteException, NamingException, IOException, etc).

src/java/com/opensymphony/module/propertyset/cached/CachingPropertySet.java

         } else if (value instanceof Double) {
             setDouble(key, DataUtil.getDouble((Double) value));
         } else if (value instanceof String) {
-            setString(key, (String) value);
+            if (value.toString().length() > 255) {
+                setText(key, (String) value);
+            } else {
+                setString(key, (String) value);
+            }
         } else if (value instanceof Date) {
             setDate(key, (Date) value);
         } else if (value instanceof Document) {
 
             break;
 
+        case TEXT:
+            value = getText(key);
+
+            break;
+
         case DATE:
             value = getDate(key);
 

src/java/com/opensymphony/module/propertyset/database/JDBCPropertySet.java

         }
     }
 
+    public boolean supportsType(int type) {
+        switch (type) {
+        case PropertySet.PROPERTIES:
+        case PropertySet.TEXT:
+        case PropertySet.XML:
+            return false;
+        }
+
+        return true;
+    }
+
     protected void setImpl(int type, String key, Object value) throws PropertyException {
         if (value == null) {
             throw new PropertyException("JDBCPropertySet does not allow for null values to be stored");
             break;
 
         case PropertySet.DATA:
-                if (value instanceof Data) {
-                    Data data = (Data) value;
-                    ps.setBytes(3, data.getBytes());
-                }
 
-                if (value instanceof byte[]) {
-                    ps.setBytes(3, (byte[]) value);
-                }
+            if (value instanceof Data) {
+                Data data = (Data) value;
+                ps.setBytes(3, data.getBytes());
+            }
+
+            if (value instanceof byte[]) {
+                ps.setBytes(3, (byte[]) value);
+            }
 
             break;
 
             throw e;
         }
     }
-
-    public boolean supportsType(int type) {
-        switch(type) {
-            case PropertySet.PROPERTIES:
-            case PropertySet.TEXT:
-            case PropertySet.XML:
-                return false;
-        }
-        return true;
-    }
-
 }

src/java/com/opensymphony/module/propertyset/file/PropertiesFilePropertySet.java

 import com.opensymphony.util.Data;
 import com.opensymphony.util.XMLUtils;
 
-import org.w3c.dom.Document;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.w3c.dom.Document;
+
 import java.io.*;
 
 import java.text.DateFormat;
  * @author hani
  */
 public class PropertiesFilePropertySet extends MemoryPropertySet {
-    //~ Instance fields ////////////////////////////////////////////////////////
+    //~ Static fields/initializers /////////////////////////////////////////////
 
     protected static Log log = LogFactory.getLog(PropertiesFilePropertySet.class);
+
+    //~ Instance fields ////////////////////////////////////////////////////////
+
     private File file;
 
     //~ Methods ////////////////////////////////////////////////////////////////
             int dot = key.lastIndexOf('.');
             int type = Integer.parseInt(key.substring(dot + 1));
             String name = key.substring(0, dot);
+
             if (log.isDebugEnabled()) {
                 log.debug("key=" + key + " type=" + type + " name=" + name);
             }

src/java/com/opensymphony/module/propertyset/hibernate/HibernatePropertySet.java

         configProvider.getPropertySetDAO().remove(entityName, entityId);
     }
 
+    public boolean supportsType(int type) {
+        switch (type) {
+        case PropertySet.DATA:
+        case PropertySet.OBJECT:
+        case PropertySet.PROPERTIES:
+        case PropertySet.XML:
+            return false;
+        }
+
+        return true;
+    }
+
     protected void setImpl(int type, String key, Object value) throws PropertyException {
         PropertySetItem item = null;
 
     private PropertySetItem findByKey(String key) throws PropertyException {
         return configProvider.getPropertySetDAO().findByKey(entityName, entityId, key);
     }
-
-    public boolean supportsType(int type) {
-        switch(type) {
-            case PropertySet.DATA:
-            case PropertySet.OBJECT:
-            case PropertySet.PROPERTIES:
-            case PropertySet.XML:
-                return false;
-        }
-        return true;
-    }
-
 }

src/java/com/opensymphony/module/propertyset/ofbiz/DataPropertyHandler.java

                 return (writeXML((Document) input));
 
             case PropertySet.DATA:
-                return (((Data) input).getBytes());
+
+                if (input instanceof Data) {
+                    return (((Data) input).getBytes());
+                } else if (input instanceof byte[]) {
+                    return (byte[]) input;
+                } else {
+                    throw new IllegalPropertyException("DATA is not an instance of Data or byte[].");
+                }
 
             case PropertySet.PROPERTIES:
                 return (writeProperties((Properties) input));

src/java/com/opensymphony/module/propertyset/ofbiz/OFBizPropertySet.java

 
     //~ Methods ////////////////////////////////////////////////////////////////
 
-    public Collection getKeys(String prefix, int type) throws PropertyException {
+    public Collection getKeys() throws PropertyException {
+        List results = new ArrayList();
+
+        try {
+            Collection c = getDelegator().findByAnd("OSPropertyEntry", UtilMisc.toMap("entityId", entityId, "entityName", entityName));
+
+            for (Iterator iterator = c.iterator(); iterator.hasNext();) {
+                GenericValue value = (GenericValue) iterator.next();
+                String propertyKey = value.getString("propertyKey");
+
+                if (propertyKey != null) {
+                    results.add(propertyKey);
+                }
+            }
+
+            Collections.sort(results);
+        } catch (GenericEntityException e) {
+            throw new PropertyImplementationException(e);
+        }
+
+        return results;
+    }
+
+    public Collection getKeys(String prefix) throws PropertyException {
         List results = new ArrayList();
 
         try {
         return results;
     }
 
+    public Collection getKeys(String prefix, int type) throws PropertyException {
+        List results = new ArrayList();
+
+        try {
+            // chowda hack
+            if (prefix == null) {
+                prefix = "";
+            }
+
+            Collection c = getDelegator().findByAnd("OSPropertyEntry", UtilMisc.toMap("entityId", entityId, "entityName", entityName));
+
+            for (Iterator iterator = c.iterator(); iterator.hasNext();) {
+                GenericValue value = (GenericValue) iterator.next();
+                String propertyKey = value.getString("propertyKey");
+                Integer entryType = value.getInteger("type");
+
+                if (((propertyKey != null) && propertyKey.startsWith(prefix)) && (entryType.intValue() == type)) {
+                    results.add(propertyKey);
+                }
+            }
+
+            Collections.sort(results);
+        } catch (GenericEntityException e) {
+            throw new PropertyImplementationException(e);
+        }
+
+        return results;
+    }
+
     public int getType(String key) throws PropertyException {
         GenericValue v = findPropertyEntry(key);
 
         }
     }
 
+    public boolean supportsType(int type) {
+        switch (type) {
+        case DATA:
+        case OBJECT:
+        case PROPERTIES:
+        case XML:
+            return false;
+        }
+
+        return true;
+    }
+
     protected void setImpl(int type, String key, Object obj) throws PropertyException {
         try {
             Long id;

src/java/com/opensymphony/module/propertyset/verifiers/NumberVerifier.java

  */
 package com.opensymphony.module.propertyset.verifiers;
 
+
 /**
  * Handles verification of numbers.
  * Can be configured to only accept specific numeric types (int, float, etc)

src/java/com/opensymphony/module/propertyset/verifiers/VerifyException.java

  */
 package com.opensymphony.module.propertyset.verifiers;
 
+
 /**
  *
  * @author <a href="mailto:hani@fate.demon.co.uk">Hani Suleiman</a>

src/test/cache.properties

+default.maxSize=0
+default.expireTime=0
+UtilPropertiesCache.maxSize=0
+UtilPropertiesCache.expireTime=0

src/test/com/opensymphony/module/propertyset/AbstractPropertySetTest.java

 package com.opensymphony.module.propertyset;
 
 import com.opensymphony.util.XMLUtils;
+
 import junit.framework.TestCase;
+
 import org.w3c.dom.Document;
 
-import javax.xml.parsers.ParserConfigurationException;
 import java.text.DateFormat;
+
 import java.util.Date;
 import java.util.Properties;
 
+import javax.xml.parsers.ParserConfigurationException;
+
 
 /**
  * User: bbulger
             assertEquals(doc, ps.getXML("testXml"));
         }
     }
-
 }

src/test/com/opensymphony/module/propertyset/TestObject.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.module.propertyset;
 
 import java.io.Serializable;
 
+
 /**
  * User: bbulger
  * Date: May 22, 2004
  */
 public class TestObject implements Serializable {
+    //~ Instance fields ////////////////////////////////////////////////////////
 
     private long id;
 
+    //~ Constructors ///////////////////////////////////////////////////////////
+
     public TestObject(long id) {
         this.id = id;
     }
 
+    //~ Methods ////////////////////////////////////////////////////////////////
+
     public long getId() {
         return id;
     }
         if (this == obj) {
             return true;
         }
+
         if (this.getClass() != obj.getClass()) {
             return false;
         }
+
         TestObject testObject = (TestObject) obj;
+
         return id == testObject.getId();
     }
 
     public int hashCode() {
         return (int) (id ^ id >>> 32);
     }
-
 }

src/test/com/opensymphony/module/propertyset/cached/CachingPropertySetTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.cached;
+
+import com.opensymphony.module.propertyset.PropertySet;
+import com.opensymphony.module.propertyset.memory.MemoryPropertySet;
+import com.opensymphony.module.propertyset.memory.SerializablePropertySetTest;
+
+import java.util.HashMap;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class CachingPropertySetTest extends SerializablePropertySetTest {
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    protected void setUp() throws Exception {
+        PropertySet memoryPropertySet = new MemoryPropertySet();
+        memoryPropertySet.init(null, null);
+
+        HashMap args = new HashMap();
+        args.put("PropertySet", memoryPropertySet);
+        ps = new CachingPropertySet();
+        ps.init(new HashMap(), args);
+    }
+}

src/test/com/opensymphony/module/propertyset/database/JDBCPropertySetTest.java

  * @author Eric Pugh (epugh@upstate.com)
  */
 public class JDBCPropertySetTest extends AbstractPropertySetTest {
+    //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setUp() throws Exception {
         super.setUp();
         DatabaseHelper.createDatabase(getClass().getResource("/mckoi.sql"));
+
         HashMap args = new HashMap();
         args.put("globalKey", "test");
         ps = PropertySetManager.getInstance("jdbc", args);

src/test/com/opensymphony/module/propertyset/file/PropertiesFilePropertySetTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.file;
+
+import com.opensymphony.module.propertyset.PropertySet;
+import com.opensymphony.module.propertyset.TestObject;
+
+import com.opensymphony.util.XMLUtils;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+
+import java.io.File;
+import java.io.IOException;
+
+import java.text.DateFormat;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Properties;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class PropertiesFilePropertySetTest extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    protected final String PROPERTIES_FILE = "build/filePropertySet.properties";
+    protected PropertySet ps;
+    protected final String TEXT_VALUE = "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890";
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testFlushAndLoad() throws IOException, ParserConfigurationException {
+        // populate the propertyset
+        Date now = new Date();
+        DateFormat df = DateFormat.getInstance();
+        Document doc = XMLUtils.newDocument("test-propertiesfile");
+        Properties embeddedProps = new Properties();
+        embeddedProps.put("prop1", "value1");
+
+        ps.setBoolean("testBoolean", true);
+        ps.setData("testData", "value1".getBytes());
+        ps.setDate("testDate", now);
+        ps.setDouble("testDouble", 10.245);
+        ps.setInt("testInt", 7);
+        ps.setLong("testLong", 100000);
+        ps.setObject("testObject", new TestObject(1));
+        ps.setProperties("testProperties", embeddedProps);
+        ps.setString("testString", "value1");
+        ps.setText("testText", TEXT_VALUE);
+        ps.setXML("testXml", doc);
+
+        ((PropertiesFilePropertySet) ps).flush();
+
+        // reload and test
+        HashMap args = new HashMap();
+        args.put("file", PROPERTIES_FILE);
+        ps = new PropertiesFilePropertySet();
+        ps.init(null, args);
+
+        assertEquals(true, ps.getBoolean("testBoolean"));
+        assertEquals(new String("value1".getBytes()), new String(ps.getData("testData")));
+        assertEquals(df.format(now), df.format(ps.getDate("testDate")));
+        assertEquals(10.245, ps.getDouble("testDouble"), 0);
+        assertEquals(7, ps.getInt("testInt"));
+        assertEquals(100000, ps.getLong("testLong"));
+        assertEquals(new TestObject(1), ps.getObject("testObject"));
+        assertEquals(embeddedProps, ps.getProperties("testProperties"));
+        assertEquals("value1", ps.getString("testString"));
+        assertEquals(TEXT_VALUE, ps.getText("testText"));
+        assertNotNull(ps.getXML("testXml"));
+    }
+
+    protected void setUp() throws Exception {
+        HashMap args = new HashMap();
+        args.put("file", PROPERTIES_FILE);
+        ps = new PropertiesFilePropertySet();
+        ps.init(null, args);
+    }
+
+    protected void tearDown() throws Exception {
+        File file = new File(PROPERTIES_FILE);
+
+        if (file.exists()) {
+            file.delete();
+        }
+    }
+}

src/test/com/opensymphony/module/propertyset/hibernate/HibernatePropertySetTest.java

 import com.opensymphony.module.propertyset.AbstractPropertySetTest;
 import com.opensymphony.module.propertyset.DatabaseHelper;
 import com.opensymphony.module.propertyset.PropertySetManager;
+
 import net.sf.hibernate.cfg.Configuration;
 
 import java.util.HashMap;
 
+
 /**
  * This test case tests a propertyset backed by Hibernate
  *
  * @author Eric Pugh (epugh@upstate.com)
  */
 public class HibernatePropertySetTest extends AbstractPropertySetTest {
-
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setUp() throws Exception {

src/test/com/opensymphony/module/propertyset/map/MapPropertySetTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.module.propertyset.map;
 
 import com.opensymphony.module.propertyset.AbstractPropertySetTest;
 
 import java.util.HashMap;
 
+
 /**
  * User: bbulger
  * Date: May 22, 2004
  */
 public class MapPropertySetTest extends AbstractPropertySetTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        HashMap args = new HashMap();
-        ps = new MapPropertySet();
-        ps.init(null, args);
-    }
+    //~ Methods ////////////////////////////////////////////////////////////////
 
     public void testGetMapSetMap() {
         HashMap map = new HashMap();
         assertEquals(map, ((MapPropertySet) ps).getMap());
     }
 
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        HashMap args = new HashMap();
+        ps = new MapPropertySet();
+        ps.init(null, args);
+    }
 }

src/test/com/opensymphony/module/propertyset/ofbiz/DatePropertyHandlerTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.ofbiz;
+
+import com.opensymphony.module.propertyset.PropertyException;
+import com.opensymphony.module.propertyset.PropertySet;
+
+import junit.framework.TestCase;
+
+import java.sql.Timestamp;
+
+import java.text.DateFormat;
+
+import java.util.Date;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class DatePropertyHandlerTest extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    protected Date now;
+    protected DateFormat df;
+    protected PropertyHandler handler;
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testProcessGetWithDateType() {
+        assertEquals(df.format(now), df.format(handler.processGet(PropertySet.DATE, now)));
+    }
+
+    public void testProcessSetWithDateTypeAndSqlDate() {
+        java.sql.Date sqlDate = new java.sql.Date(now.getTime());
+        assertEquals(df.format(sqlDate), df.format(handler.processSet(PropertySet.DATE, sqlDate)));
+    }
+
+    public void testProcessSetWithDateTypeAndSqlTimestamp() {
+        Timestamp timestamp = new Timestamp(now.getTime());
+        assertEquals(df.format(timestamp), df.format(handler.processSet(PropertySet.DATE, timestamp)));
+    }
+
+    public void testProcessSetWithDateTypeAndUtilDate() {
+        assertEquals(df.format(now), df.format(handler.processSet(PropertySet.DATE, now)));
+    }
+
+    public void testProcessSetWithInvalidType() {
+        try {
+            handler.processSet(PropertySet.STRING, "");
+            fail("Shouldn't be able to processSet with String type");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        handler = new DatePropertyHandler();
+        df = DateFormat.getInstance();
+        now = new Date();
+    }
+}

src/test/com/opensymphony/module/propertyset/ofbiz/DecimalPropertyHandlerTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.ofbiz;
+
+import com.opensymphony.module.propertyset.PropertyException;
+import com.opensymphony.module.propertyset.PropertySet;
+
+import junit.framework.TestCase;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class DecimalPropertyHandlerTest extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    protected PropertyHandler handler;
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testProcessGetWithDoubleType() {
+        assertEquals(new Double(10.245), handler.processGet(PropertySet.DOUBLE, new Double(10.245)));
+    }
+
+    public void testProcessGetWithInvalidType() {
+        try {
+            handler.processGet(PropertySet.STRING, new Double(10.245));
+            fail("Shouldn't be able to processGet with String type");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    public void testProcessSetWithDoubleType() {
+        assertEquals(new Double(10.245), handler.processSet(PropertySet.DOUBLE, new Double(10.245)));
+    }
+
+    public void testProcessSetWithInvalidType() {
+        try {
+            handler.processSet(PropertySet.STRING, new Double(10.245));
+            fail("Shouldn't be able to processSet with String type");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        handler = new DecimalPropertyHandler();
+    }
+}

src/test/com/opensymphony/module/propertyset/ofbiz/NumberPropertyHandlerTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.ofbiz;
+
+import com.opensymphony.module.propertyset.PropertyException;
+import com.opensymphony.module.propertyset.PropertySet;
+
+import junit.framework.TestCase;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class NumberPropertyHandlerTest extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    protected PropertyHandler handler;
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testProcessGetWithBooleanTypeAndLongInput() {
+        assertNotNull(handler.processGet(PropertySet.BOOLEAN, new Long(1)));
+    }
+
+    public void testProcessGetWithIntTypeAndLongInput() {
+        assertNotNull(handler.processGet(PropertySet.INT, new Long(1)));
+    }
+
+    public void testProcessGetWithInvalidInput() {
+        try {
+            handler.processGet(PropertySet.INT, new Integer(1));
+            fail("NumberPropertyHandler can only process Long inputs");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    public void testProcessGetWithInvalidTypeAndLongInput() {
+        try {
+            handler.processGet(PropertySet.STRING, new Long(1));
+            fail("Shouldn't be able to processGet with String type.");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    public void testProcessGetWithLongTypeAndLongInput() {
+        assertNotNull(handler.processGet(PropertySet.LONG, new Long(1)));
+    }
+
+    public void testProcessSetWithBooleanTypeAndBooleanInput() {
+        assertEquals(new Long(1), handler.processSet(PropertySet.BOOLEAN, new Boolean(true)));
+        assertEquals(new Long(0), handler.processSet(PropertySet.BOOLEAN, new Boolean(false)));
+    }
+
+    public void testProcessSetWithIntTypeAndIntInput() {
+        assertEquals(new Long(11), handler.processSet(PropertySet.INT, new Integer(11)));
+    }
+
+    public void testProcessSetWithLongTypeAndLongInput() {
+        assertEquals(new Long(100000), handler.processSet(PropertySet.LONG, new Long(100000)));
+    }
+
+    public void testProcessSetWithNullInput() {
+        assertEquals(new Long(0), handler.processSet(PropertySet.LONG, null));
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        handler = new NumberPropertyHandler();
+    }
+}

src/test/com/opensymphony/module/propertyset/ofbiz/OFBizPropertySetTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.ofbiz;
+
+import com.opensymphony.module.propertyset.AbstractPropertySetTest;
+
+import java.util.HashMap;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class OFBizPropertySetTest extends AbstractPropertySetTest {
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        ps = new OFBizPropertySet();
+
+        HashMap args = new HashMap();
+        args.put("entityId", new Long(1));
+        args.put("entityName", "test");
+        ps.init(new HashMap(), args);
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        ((OFBizPropertySet) ps).remove();
+    }
+}

src/test/com/opensymphony/module/propertyset/ofbiz/StringPropertyHandlerTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.module.propertyset.ofbiz;
+
+import com.opensymphony.module.propertyset.PropertyException;
+import com.opensymphony.module.propertyset.PropertySet;
+
+import junit.framework.TestCase;
+
+
+/**
+ * User: bbulger
+ * Date: May 24, 2004
+ */
+public class StringPropertyHandlerTest extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    protected PropertyHandler handler;
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testProcessGetWithInvalidType() {
+        try {
+            handler.processGet(PropertySet.INT, "1");
+            fail("Shouldn't be able to call processGet with an Int");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    public void testProcessGetWithString() {
+        assertNotNull(handler.processGet(PropertySet.STRING, "value1"));
+    }
+
+    public void testProcessGetWithText() {
+        assertNotNull(handler.processGet(PropertySet.TEXT, "value1"));
+    }
+
+    public void testProcessSetWithInvalidType() {
+        try {
+            handler.processSet(PropertySet.INT, "1");
+            fail("Shouldn't be able to call processSet with an Int");
+        } catch (PropertyException e) {
+            // success
+        }
+    }
+
+    public void testProcessSetWithString() {
+        assertNotNull(handler.processSet(PropertySet.STRING, "value1"));
+    }
+
+    public void testProcessSetWithText() {
+        assertNotNull(handler.processSet(PropertySet.TEXT, "value1"));
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        handler = new StringPropertyHandler();
+    }
+}

src/test/com/opensymphony/module/propertyset/verifiers/NumberVerifierTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.module.propertyset.verifiers;
 
 import junit.framework.TestCase;
 
+
 /**
  * User: bbulger
  * Date: May 22, 2004
  */
 public class NumberVerifierTest extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
 
     protected NumberVerifier verifier;
 
-    protected void setUp() throws Exception {
-        super.setUp();
-        verifier = new NumberVerifier();
-        verifier.setMin(new Integer(7));
-        verifier.setMax(new Integer(11));
-        verifier.setType(Integer.class);
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testVerifyNumberBetweenMaxAndMin() {
+        assertEquals(new Integer(7), verifier.getMin());
+        assertEquals(new Integer(11), verifier.getMax());
+        verifier.verify(new Integer(10));
     }
 
     public void testVerifyNumberGreaterThanMax() {
         }
     }
 
-    public void testVerifyNumberBetweenMaxAndMin() {
-        assertEquals(new Integer(7), verifier.getMin());
-        assertEquals(new Integer(11), verifier.getMax());
-        verifier.verify(new Integer(10));
-    }
-
     public void testVerifyNumberWithDifferentTypes() {
         assertEquals(Integer.class, verifier.getType());
+
         try {
             verifier.verify(new Long(100000));
             fail("Should not be able to verify a type of number other than the type specified.");
         }
     }
 
+    protected void setUp() throws Exception {
+        super.setUp();
+        verifier = new NumberVerifier();
+        verifier.setMin(new Integer(7));
+        verifier.setMax(new Integer(11));
+        verifier.setType(Integer.class);
+    }
 }

src/test/com/opensymphony/module/propertyset/verifiers/StringVerifierTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.module.propertyset.verifiers;
 
 import junit.framework.TestCase;
 
+
 /**
  * User: bbulger
  * Date: May 22, 2004
  */
 public class StringVerifierTest extends TestCase {
+    //~ Methods ////////////////////////////////////////////////////////////////
 
-    public void testVerifyStringLengthShorterThanMin() {
+    public void testVerifyStringContainsInValidString() {
         StringVerifier verifier = new StringVerifier();
-        verifier.setMinLength(10);
-        assertEquals(10, verifier.getMinLength());
+        verifier.setContains("thing");
+
         try {
-            verifier.verify("value1");
-            fail("Should not be able to verify a string shorter than the min.");
+            verifier.verify("tryagain");
+            fail("Should not be able to verify a string contains an invalid string.");
         } catch (VerifyException e) {
             // success
         }
     }
 
+    public void testVerifyStringContainsValidString() {
+        StringVerifier verifier = new StringVerifier();
+        verifier.setContains("thing");
+        assertEquals("thing", verifier.getContains());
+        verifier.verify("somethingelse");
+    }
+
+    public void testVerifyStringInAllowableValues() {
+        String[] allowed = {"value1", "value2"};
+        StringVerifier verifier = new StringVerifier(allowed);
+        verifier.verify("value2");
+    }
+
     public void testVerifyStringLengthLongerThanMax() {
         StringVerifier verifier = new StringVerifier();
         verifier.setMaxLength(10);
         assertEquals(10, verifier.getMaxLength());
+
         try {
             verifier.verify("123456789012");
             fail("Should not be able to verify a string longer than the max.");
         }
     }
 
-    public void testVerifyStringWithLengthBetweenMinAndMax() {
-        StringVerifier verifier = new StringVerifier(0, 100);
-        verifier.verify("this should work!");
+    public void testVerifyStringLengthShorterThanMin() {
+        StringVerifier verifier = new StringVerifier();
+        verifier.setMinLength(10);
+        assertEquals(10, verifier.getMinLength());
+
+        try {
+            verifier.verify("value1");
+            fail("Should not be able to verify a string shorter than the min.");
+        } catch (VerifyException e) {
+            // success
+        }
     }
 
-    public void testVerifyStringWithInvalidPrefix() {
+    public void testVerifyStringNotInAllowableValues() {
+        String[] allowed = {"value1", "value2"};
         StringVerifier verifier = new StringVerifier();
-        verifier.setPrefix("test");
+        verifier.setAllowableValues(allowed);
+
         try {
-            verifier.verify("username");
-            fail("Should not be able to verify a string with an invalid prefix.");
+            verifier.verify("not there");
+            fail("Should not be able to verify a String that isn't in the allowed values.");
         } catch (VerifyException e) {
             // success
         }
     }
 
-    public void testVerifyStringWithValidPrefix() {
+    public void testVerifyStringWithInvalidPrefix() {
         StringVerifier verifier = new StringVerifier();
         verifier.setPrefix("test");
-        assertEquals("test", verifier.getPrefix());
-        verifier.verify("testInt");
-    }
 
-    public void testVerifyStringWithInvalidSuffix() {
-        StringVerifier verifier = new StringVerifier();
-        verifier.setSuffix("Int");
         try {
-            verifier.verify("testDouble");
-            fail("Should not be able to verify string with an invalid suffix.");
+            verifier.verify("username");
+            fail("Should not be able to verify a string with an invalid prefix.");
         } catch (VerifyException e) {
             // success
         }
     }
 
-    public void testVerifyStringWithValidSuffix() {
+    public void testVerifyStringWithInvalidSuffix() {
         StringVerifier verifier = new StringVerifier();
         verifier.setSuffix("Int");
-        assertEquals("Int", verifier.getSuffix());
-        verifier.verify("testInt");
-    }
 
-    public void testVerifyStringContainsValidString() {
-        StringVerifier verifier = new StringVerifier();
-        verifier.setContains("thing");
-        assertEquals("thing", verifier.getContains());
-        verifier.verify("somethingelse");
-    }
-
-    public void testVerifyStringContainsInValidString() {
-        StringVerifier verifier = new StringVerifier();
-        verifier.setContains("thing");
         try {
-            verifier.verify("tryagain");
-            fail("Should not be able to verify a string contains an invalid string.");
+            verifier.verify("testDouble");
+            fail("Should not be able to verify string with an invalid suffix.");
         } catch (VerifyException e) {
             // success
         }
     }
 
-    public void testVerifyStringInAllowableValues() {
-        String allowed[] = { "value1", "value2" };
-        StringVerifier verifier = new StringVerifier(allowed);
-        verifier.verify("value2");
+    public void testVerifyStringWithLengthBetweenMinAndMax() {
+        StringVerifier verifier = new StringVerifier(0, 100);
+        verifier.verify("this should work!");
     }
 
-    public void testVerifyStringNotInAllowableValues() {
-        String allowed[] = { "value1", "value2" };
+    public void testVerifyStringWithValidPrefix() {
         StringVerifier verifier = new StringVerifier();
-        verifier.setAllowableValues(allowed);
-        try {
-            verifier.verify("not there");
-            fail("Should not be able to verify a String that isn't in the allowed values.");
-        } catch (VerifyException e) {
-            // success
-        }
+        verifier.setPrefix("test");
+        assertEquals("test", verifier.getPrefix());
+        verifier.verify("testInt");
     }
 
+    public void testVerifyStringWithValidSuffix() {
+        StringVerifier verifier = new StringVerifier();
+        verifier.setSuffix("Int");
+        assertEquals("Int", verifier.getSuffix());
+        verifier.verify("testInt");
+    }
 }

src/test/com/opensymphony/module/propertyset/xml/XMLPropertySetTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.module.propertyset.xml;
 
-import com.opensymphony.module.propertyset.memory.SerializablePropertySetTest;
 import com.opensymphony.module.propertyset.TestObject;
+import com.opensymphony.module.propertyset.memory.SerializablePropertySetTest;
+
 import org.xml.sax.SAXException;
 
-import javax.xml.parsers.ParserConfigurationException;
 import java.io.IOException;
 import java.io.StringReader;
 import java.io.StringWriter;
+
 import java.util.Date;
 import java.util.Properties;
 
+import javax.xml.parsers.ParserConfigurationException;
+
+
 /**
  * User: bbulger
  * Date: May 23, 2004
  */
 public class XMLPropertySetTest extends SerializablePropertySetTest {
+    //~ Instance fields ////////////////////////////////////////////////////////
 
-    protected final String XML_STRING = "<property-set>" +
-            "<property key=\"testBoolean\" type=\"boolean\">true</property>" +
-            "<property key=\"testData\" type=\"data\">dmFsdWUx</property>" +
-            "<property key=\"testDate\" type=\"date\">2004-05-23 10:06:00</property>" +
-            "<property key=\"testDouble\" type=\"double\">10.245</property>" +
-            "<property key=\"testInt\" type=\"int\">7</property>" +
-            "<property key=\"testLong\" type=\"long\">100000</property>" +
-            "<property key=\"testObject\" type=\"object\">rO0ABXNyAC5jb20ub3BlbnN5bXBob255Lm1vZHVsZS5wcm9wZXJ0eXNldC5UZXN0T2JqZWN0A6KYOgP1WoYCAAFKAAJpZHhwAAAAAAAAAAE=</property>" +
-            "<property key=\"testString\" type=\"string\">value1</property>" +
-            "<property key=\"testProperties\" type=\"properties\">" +
-            "<properties><property key=\"prop1\" type=\"string\">value1</property></properties>" +
-            "</property>" +
-            "<property key=\"testText\" type=\"text\"><![CDATA[" + TEXT_VALUE + "]]></property>" +
-            "<property key=\"testUnknown\" type=\"unknown\">unknown</property>" +
-            "</property-set>";
+    protected final String XML_STRING = "<property-set>" + "<property key=\"testBoolean\" type=\"boolean\">true</property>" + "<property key=\"testData\" type=\"data\">dmFsdWUx</property>" + "<property key=\"testDate\" type=\"date\">2004-05-23 10:06:00</property>" + "<property key=\"testDouble\" type=\"double\">10.245</property>" + "<property key=\"testInt\" type=\"int\">7</property>" + "<property key=\"testLong\" type=\"long\">100000</property>" + "<property key=\"testObject\" type=\"object\">rO0ABXNyAC5jb20ub3BlbnN5bXBob255Lm1vZHVsZS5wcm9wZXJ0eXNldC5UZXN0T2JqZWN0A6KYOgP1WoYCAAFKAAJpZHhwAAAAAAAAAAE=</property>" + "<property key=\"testString\" type=\"string\">value1</property>" + "<property key=\"testProperties\" type=\"properties\">" + "<properties><property key=\"prop1\" type=\"string\">value1</property></properties>" + "</property>" + "<property key=\"testText\" type=\"text\"><![CDATA[" + TEXT_VALUE + "]]></property>" + "<property key=\"testUnknown\" type=\"unknown\">unknown</property>" + "</property-set>";
 
-    protected void setUp() throws Exception {
-        ps = new XMLPropertySet();
-        ps.init(null, null);
-    }
+    //~ Methods ////////////////////////////////////////////////////////////////
 
     public void testLoadWithReader() throws IOException, ParserConfigurationException, SAXException {
         StringReader reader = new StringReader(XML_STRING);
         assertEquals(100000, ps.getLong("testLong"));
         assertEquals(new TestObject(1), ps.getObject("testObject"));
         assertEquals("value1", ps.getString("testString"));
+
         Properties props = new Properties();
         props.setProperty("prop1", "value1");
         assertEquals(props, ps.getProperties("testProperties"));
         assertEquals(TEXT_VALUE, ps.getText("testText"));
     }
 
-    public void test() throws IOException, ParserConfigurationException {
+    public void testSaveWithWriter() throws IOException, ParserConfigurationException {
         ps.setBoolean("testBoolean", true);
         ps.setData("testData", "value1".getBytes());
         ps.setDate("testDate", new Date());
         ps.setInt("testInt", 7);
         ps.setLong("testLong", 100000);
         ps.setObject("testObject", new TestObject(1));
+
         Properties props = new Properties();
         props.setProperty("prop1", "value1");
         ps.setProperties("testProperties", props);
         assertNotNull(writer.toString());
     }
 
+    protected void setUp() throws Exception {
+        ps = new XMLPropertySet();
+        ps.init(null, null);
+    }
 }

src/test/debug.properties

+print.verbose=false
+print.timing=false
+print.info=false
+print.warning=false
+print.error=true
+print.fatal=true

src/test/entityengine.xml

+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE entity-config PUBLIC "-//OFBiz//DTD Entity Engine Config//EN" "http://www.ofbiz.org/dtds/entity-config.dtd">
+
+<entity-config>
+
+    <resource-loader name="maincp" class="org.ofbiz.core.config.ClasspathLoader"/>
+
+    <transaction-factory class="org.ofbiz.core.entity.transaction.DumbFactory" />
+
+    <delegator name="default" entity-model-reader="main" entity-group-reader="main">
+        <group-map group-name="default" datasource-name="defaultDS"/>
+    </delegator>
+
+    <entity-model-reader name="main">
+        <resource loader="maincp" location="entitymodel.xml"/>
+    </entity-model-reader>
+
+    <entity-group-reader name="main" loader="maincp" location="entitygroup.xml"/>
+
+    <field-type name="hsql" loader="maincp" location="fieldtype-hsql.xml"/>
+
+    <datasource name="defaultDS" field-type-name="hsql"
+      helper-class="org.ofbiz.core.entity.GenericHelperDAO"
+      check-on-start="true"
+      use-foreign-keys="false"
+      use-foreign-key-indices="false"
+      check-fks-on-start="false"
+      check-fk-indices-on-start="false"
+      add-missing-on-start="true">
+        <inline-jdbc
+            jdbc-driver="org.hsqldb.jdbcDriver"
+            jdbc-uri="jdbc:hsqldb:build/ofbiz-propertyset"
+            jdbc-username="sa"
+            jdbc-password="" />
+    </datasource>
+
+</entity-config>

src/test/entitygroup.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE entitygroup PUBLIC "-//OFBiz//DTD Entity Group//EN" "http://www.ofbiz.org/dtds/entitygroup.dtd">
+
+<entitygroup>
+    <!-- sequence entity -->
+    <entity-group group="default" entity="SequenceValueItem"/>
+    
+    <entity-group group="default" entity="OSPropertyEntry"/>
+    <entity-group group="default" entity="OSPropertyString"/>
+    <entity-group group="default" entity="OSPropertyText"/>
+    <entity-group group="default" entity="OSPropertyData"/>
+    <entity-group group="default" entity="OSPropertyDate"/>
+    <entity-group group="default" entity="OSPropertyDecimal"/>
+    <entity-group group="default" entity="OSPropertyNumber"/>
+</entitygroup>

src/test/entitymodel.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE entitymodel PUBLIC "-//OFBiz//DTD Entity Model//EN" "http://www.ofbiz.org/dtds/entitymodel.dtd">
+
+<entitymodel>
+    <title>Entity model for PropertySet</title>
+    <description>Entity model for PropertySet</description>
+    <copyright>Copyright 2004 OpenSymphony</copyright>
+    <author>OpenSymphony</author>
+    <version>1.0</version>
+
+    <!-- sequence generator table -->
+    <entity entity-name="SequenceValueItem" package-name="">
+        <field name="seqName" type="id-long-ne"></field>
+        <field name="seqId" type="numeric"></field>
+        <prim-key field="seqName"/>
+    </entity>
+
+    <!-- PropertySet implementation -->
+    <entity entity-name="OSPropertyEntry" table-name="propertyentry" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="entityName" type="long-varchar"/>
+        <field name="entityId" type="numeric"/>
+        <field name="propertyKey" type="long-varchar"/>
+        <field name="type" col-name="propertytype" type="integer"/>
+        <prim-key field="id"/>
+    </entity>
+
+    <entity entity-name="OSPropertyString" table-name="propertystring" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="value" col-name="propertyvalue" type="very-long"/>
+        <prim-key field="id"/>
+    </entity>
+
+    <entity entity-name="OSPropertyText" table-name="propertytext" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="value" col-name="propertyvalue" type="very-long"/>
+        <prim-key field="id"/>
+    </entity>
+
+    <entity entity-name="OSPropertyDate" table-name="propertydate" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="value" col-name="propertyvalue" type="date-time"/>
+        <prim-key field="id"/>
+    </entity>
+
+    <entity entity-name="OSPropertyData" table-name="propertydata" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="value" col-name="propertyvalue" type="blob"/>
+        <prim-key field="id"/>
+    </entity>
+
+    <entity entity-name="OSPropertyDecimal" table-name="propertydecimal" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="value" col-name="propertyvalue" type="floating-point"/>
+        <prim-key field="id"/>
+    </entity>
+
+    <entity entity-name="OSPropertyNumber" table-name="propertynumber" package-name="">
+        <field name="id" type="numeric"/>
+        <field name="value" col-name="propertyvalue" type="numeric"/>
+        <prim-key field="id"/>
+    </entity>
+
+</entitymodel>

src/test/fieldtype-hsql.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fieldtypemodel PUBLIC "-//OFBiz//DTD Field Type Model//EN" "http://www.ofbiz.org/dtds/fieldtypemodel.dtd">
+
+<!--
+/**
+ *  $Id$
+ *  Title: Entity Generator Definitions for the General Data Model
+ *  Description: None
+ *  Copyright (c) 2002 The Open For Business Project - www.ofbiz.org
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of this software and associated documentation files (the "Software"),
+ *  to deal in the Software without restriction, including without limitation
+ *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ *  and/or sell copies of the Software, and to permit persons to whom the
+ *  Software is furnished to do so, subject to the following conditions:
+ *
+ *  The above copyright notice and this permission notice shall be included
+ *  in all copies or substantial portions of the Software.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *@author     Andy Zeneski (jaz@ofbiz.org)
+ *@created    Augest 26, 2001
+ *@version    1.0
+ */
+-->
+
+<fieldtypemodel>
+  <!-- ===================== field-type-def ==================== -->
+   <!-- General Types -->
+    <field-type-def type="blob" sql-type="OBJECT" java-type="java.lang.Object"></field-type-def>
+
+    <field-type-def type="date-time" sql-type="TIMESTAMP" java-type="java.sql.Timestamp"></field-type-def>
+    <field-type-def type="date" sql-type="DATE" java-type="java.sql.Date"></field-type-def>
+    <field-type-def type="time" sql-type="TIME" java-type="java.sql.Time"></field-type-def>
+
+    <field-type-def type="currency-amount" sql-type="DOUBLE" java-type="Double"><validate name="isSignedDouble" /></field-type-def>
+    <field-type-def type="floating-point" sql-type="DOUBLE" java-type="Double"><validate name="isSignedDouble" /></field-type-def>
+    <field-type-def type="numeric" sql-type="BIGINT" java-type="Long"><validate name="isSignedLong" /></field-type-def>
+    <field-type-def type="integer" sql-type="INTEGER" java-type="Integer"><validate name="isSignedLong" /></field-type-def>
+
+    <field-type-def type="id" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="id-long" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="id-vlong" sql-type="VARCHAR" java-type="String"></field-type-def>
+
+    <field-type-def type="indicator" sql-type="CHAR" java-type="String"></field-type-def>
+    <field-type-def type="very-short" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="short-varchar" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="long-varchar" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="very-long" sql-type="VARCHAR" java-type="String"></field-type-def>
+
+    <field-type-def type="comment" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="description" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="name" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="value" sql-type="VARCHAR" java-type="String"></field-type-def>
+
+   <!-- Specialized Types -->
+    <field-type-def type="credit-card-number" sql-type="VARCHAR" java-type="String"><validate name="isAnyCard" /></field-type-def>
+    <field-type-def type="credit-card-date" sql-type="VARCHAR" java-type="String"><validate name="isDateAfterToday" /></field-type-def>
+    <field-type-def type="email" sql-type="VARCHAR" java-type="String"><validate name="isEmail" /></field-type-def>
+    <field-type-def type="url" sql-type="VARCHAR" java-type="String"></field-type-def>
+    <field-type-def type="id-ne" sql-type="VARCHAR" java-type="String"><validate name="isNotEmpty" /></field-type-def>
+    <field-type-def type="id-long-ne" sql-type="VARCHAR" java-type="String"><validate name="isNotEmpty" /></field-type-def>
+    <field-type-def type="id-vlong-ne" sql-type="VARCHAR" java-type="String"><validate name="isNotEmpty" /></field-type-def>
+    <field-type-def type="tel-number" sql-type="VARCHAR" java-type="String"><validate name="isInternationalPhoneNumber" /></field-type-def>
+
+</fieldtypemodel>
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.