diff options
author | James Moger <james.moger@gmail.com> | 2011-08-08 11:12:50 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2011-08-08 11:12:50 -0400 |
commit | 35973f16d6e408fff3e9eeeda4dac4ab3f7cb048 (patch) | |
tree | bd266925e65837ecbfe18ac3b734a05d6bf49bdc /tests/com/iciql/test/models | |
parent | f7485f5f18e49cef057782c0c3137e64a5af542c (diff) | |
download | iciql-35973f16d6e408fff3e9eeeda4dac4ab3f7cb048.tar.gz iciql-35973f16d6e408fff3e9eeeda4dac4ab3f7cb048.zip |
Documentation. EnumType default is NAME.
Diffstat (limited to 'tests/com/iciql/test/models')
-rw-r--r-- | tests/com/iciql/test/models/EnumModels.java | 2 | ||||
-rw-r--r-- | tests/com/iciql/test/models/SupportedTypes.java | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/com/iciql/test/models/EnumModels.java b/tests/com/iciql/test/models/EnumModels.java index bd9d88a..e5f6f39 100644 --- a/tests/com/iciql/test/models/EnumModels.java +++ b/tests/com/iciql/test/models/EnumModels.java @@ -127,7 +127,7 @@ public abstract class EnumModels { // override the enumtype to string
// ensure that we specify a length so that the column is VARCHAR
- @IQEnum(EnumType.STRING)
+ @IQEnum(EnumType.NAME)
@IQColumn(length = 25)
private Tree tree;
diff --git a/tests/com/iciql/test/models/SupportedTypes.java b/tests/com/iciql/test/models/SupportedTypes.java index b8abf2d..49dd951 100644 --- a/tests/com/iciql/test/models/SupportedTypes.java +++ b/tests/com/iciql/test/models/SupportedTypes.java @@ -96,7 +96,11 @@ public class SupportedTypes { @IQColumn private byte[] myBlob; - @IQEnum(EnumType.STRING) + // test default enum type NAME + @IQColumn(trim = true, length = 25) + private Flower myDefaultFlower; + + @IQEnum(EnumType.NAME) @IQColumn(trim = true, length = 25) private Flower myFavoriteFlower; @@ -139,6 +143,7 @@ public class SupportedTypes { s.mySqlTime = new java.sql.Time(rand.nextLong()); s.mySqlTimestamp = new java.sql.Timestamp(rand.nextLong()); s.myBlob = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + s.myDefaultFlower = Flower.DAFFODIL; s.myFavoriteFlower = Flower.MUM; s.myOtherFavoriteFlower = Flower.MARIGOLD; s.myFavoriteTree = Tree.BIRCH; @@ -162,6 +167,7 @@ public class SupportedTypes { same &= mySqlTime.toString().equals(s.mySqlTime.toString()); same &= myString.equals(s.myString); same &= compare(myBlob, s.myBlob); + same &= myDefaultFlower.equals(s.myDefaultFlower); same &= myFavoriteFlower.equals(s.myFavoriteFlower); same &= myOtherFavoriteFlower.equals(s.myOtherFavoriteFlower); same &= myFavoriteTree.equals(s.myFavoriteTree); |