Permalink
Browse files

add extensions for 3rd parties to add meta info in an extendable way

  • Loading branch information...
1 parent 39986fb commit 133e5249fb5f4c98de821f6bda030c7e7f7319a6 Dean Hiller committed Sep 4, 2013
@@ -3,9 +3,11 @@
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import com.alvazan.orm.api.base.anno.NoSqlEmbedded;
import com.alvazan.orm.api.base.anno.NoSqlEntity;
import com.alvazan.orm.api.base.anno.NoSqlId;
import com.alvazan.orm.api.base.anno.NoSqlIndexed;
@@ -46,6 +48,13 @@
protected transient BaseConverter converter;
+ /**
+ * Specifically not for playorm but for clients of playorm that want to add meta data
+ * to the DboTableMeta object
+ */
+ @NoSqlEmbedded
+ private Map<String, String> extensions = new HashMap<String, String>();
+
public String getId() {
return id;
}
@@ -366,4 +375,7 @@ public boolean isJodaType() {
return false;
}
+ public Map<String, String> getExtensions() {
+ return extensions;
+ }
}
@@ -15,6 +15,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.alvazan.orm.api.base.anno.NoSqlEmbedded;
import com.alvazan.orm.api.base.anno.NoSqlEntity;
import com.alvazan.orm.api.base.anno.NoSqlId;
import com.alvazan.orm.api.base.anno.NoSqlIndexed;
@@ -68,6 +69,13 @@
private String foreignKeyToExtensions;
+ /**
+ * Specifically not for playorm but for clients of playorm that want to add meta data
+ * to the DboTableMeta object
+ */
+ @NoSqlEmbedded
+ private Map<String, String> extensions = new HashMap<String, String>();
+
private transient List<DboColumnMeta> indexedColumnsCache;
private transient List<DboColumnMeta> cacheOfPartitionedBy;
@@ -502,5 +510,8 @@ public Long getTimeSeriesPartionSize() {
public void setTimeSeriesPartionSize(Long timeSeriesPartionSize) {
this.timeSeriesPartionSize = timeSeriesPartionSize;
}
-
+
+ public Map<String, String> getExtensions() {
+ return extensions;
+ }
}

0 comments on commit 133e524

Please sign in to comment.