summaryrefslogtreecommitdiffstats
path: root/docs/01_model_classes.mkd
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2011-08-04 17:58:22 -0400
committerJames Moger <james.moger@gmail.com>2011-08-04 17:58:22 -0400
commitb055a2a49335c78fdc754e38a7e8ab863b2a5515 (patch)
tree50c1e4bec870701e81e3bbcdde7c90d9a9119f52 /docs/01_model_classes.mkd
parent3d1e36c31e2a8354e03cdfe12565503190c2e957 (diff)
downloadiciql-b055a2a49335c78fdc754e38a7e8ab863b2a5515.tar.gz
iciql-b055a2a49335c78fdc754e38a7e8ab863b2a5515.zip
BLOB support (issue 1) and Enum support (issue 2). Documentation.
Diffstat (limited to 'docs/01_model_classes.mkd')
-rw-r--r--docs/01_model_classes.mkd17
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/01_model_classes.mkd b/docs/01_model_classes.mkd
index a0db6a1..8afcfa8 100644
--- a/docs/01_model_classes.mkd
+++ b/docs/01_model_classes.mkd
@@ -47,6 +47,12 @@ Alternatively, model classes can be automatically generated by iciql using the m
<tr><td>java.util.Date</td>
<td>TIMESTAMP</td></tr>
+<tr><td>byte []</td>
+<td>BLOB</td></tr>
+
+<tr><td>java.lang.Enum</td>
+<td>VARCHAR/TEXT *@IQEnum(STRING)* or INT *@IQEnum(ORDINAL)*</td></tr>
+
</table>
**NOTE:**<br/>
@@ -55,7 +61,6 @@ Please consult the `com.iciql.ModelUtils` class for details.
### Unsupported Types
- Java primitives (use their object counterparts instead)
-- binary types (BLOB, etc)
- array types
- custom types
@@ -83,7 +88,9 @@ The recommended approach to setup a model class is to annotate the class and fie
### Example Annotated Model
%BEGINCODE%
+import com.iciql.Iciql.EnumType;
import com.iciql.Iciql.IQColumn;
+import com.iciql.Iciql.IQEnum;
import com.iciql.Iciql.IQIndex;
import com.iciql.Iciql.IQTable;
@@ -94,6 +101,11 @@ import com.iciql.Iciql.IQTable;
})
public class Product {
+ @IQEnum(EnumType.ORDINAL)
+ public enum Availability {
+ ACTIVE, DISCONTINUED;
+ }
+
@IQColumn(primaryKey = true)
public Integer productId;
@@ -111,6 +123,9 @@ public class Product {
@IQColumn
private Integer reorderQuantity;
+
+ @IQColumn
+ private Availability availability;
public Product() {
// default constructor