summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/layout')
-rw-r--r--src/main/java/com/amazon/carbonado/layout/Layout.java4
-rw-r--r--src/main/java/com/amazon/carbonado/layout/StoredLayout.java9
-rw-r--r--src/main/java/com/amazon/carbonado/layout/StoredLayoutProperty.java8
3 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/com/amazon/carbonado/layout/Layout.java b/src/main/java/com/amazon/carbonado/layout/Layout.java
index b751fb1..8b8fc0b 100644
--- a/src/main/java/com/amazon/carbonado/layout/Layout.java
+++ b/src/main/java/com/amazon/carbonado/layout/Layout.java
@@ -220,7 +220,9 @@ public class Layout {
*/
public List<LayoutProperty> getAllProperties() throws FetchException {
if (mAllProperties == null) {
- Cursor <StoredLayoutProperty> cursor = mStoredLayout.getProperties()
+ Cursor <StoredLayoutProperty> cursor = mLayoutFactory.mPropertyStorage
+ .query("layoutID = ?")
+ .with(mStoredLayout.getLayoutID())
.orderBy("ordinal")
.fetch();
diff --git a/src/main/java/com/amazon/carbonado/layout/StoredLayout.java b/src/main/java/com/amazon/carbonado/layout/StoredLayout.java
index b7065d9..f7e250a 100644
--- a/src/main/java/com/amazon/carbonado/layout/StoredLayout.java
+++ b/src/main/java/com/amazon/carbonado/layout/StoredLayout.java
@@ -18,13 +18,13 @@
package com.amazon.carbonado.layout;
+import com.amazon.carbonado.Alias;
import com.amazon.carbonado.AlternateKeys;
+import com.amazon.carbonado.Independent;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.Join;
import com.amazon.carbonado.Key;
import com.amazon.carbonado.Nullable;
import com.amazon.carbonado.PrimaryKey;
-import com.amazon.carbonado.Query;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Version;
@@ -39,6 +39,8 @@ import com.amazon.carbonado.Version;
@Key({"storableTypeName", "generation"})
})
@PrimaryKey("layoutID")
+@Independent
+@Alias("CARBONADO_LAYOUT")
public interface StoredLayout extends Storable<StoredLayout>, Unevolvable {
long getLayoutID();
@@ -82,9 +84,6 @@ public interface StoredLayout extends Storable<StoredLayout>, Unevolvable {
void setCreationHost(String host);
- @Join
- Query<StoredLayoutProperty> getProperties() throws FetchException;
-
/**
* Record version number for this StoredTypeLayout instance. Some encoding
* strategies require a version number.
diff --git a/src/main/java/com/amazon/carbonado/layout/StoredLayoutProperty.java b/src/main/java/com/amazon/carbonado/layout/StoredLayoutProperty.java
index 96a990a..a6d25db 100644
--- a/src/main/java/com/amazon/carbonado/layout/StoredLayoutProperty.java
+++ b/src/main/java/com/amazon/carbonado/layout/StoredLayoutProperty.java
@@ -18,9 +18,10 @@
package com.amazon.carbonado.layout;
+import com.amazon.carbonado.Alias;
import com.amazon.carbonado.AlternateKeys;
import com.amazon.carbonado.FetchException;
-import com.amazon.carbonado.Join;
+import com.amazon.carbonado.Independent;
import com.amazon.carbonado.Key;
import com.amazon.carbonado.Nullable;
import com.amazon.carbonado.PrimaryKey;
@@ -38,6 +39,8 @@ import com.amazon.carbonado.Version;
@Key({"layoutID", "propertyName"})
})
@PrimaryKey({"layoutID", "ordinal"})
+@Independent
+@Alias("CARBONADO_LAYOUT_PROPERTY")
public interface StoredLayoutProperty extends Storable<StoredLayoutProperty>, Unevolvable {
long getLayoutID();
@@ -101,9 +104,6 @@ public interface StoredLayoutProperty extends Storable<StoredLayoutProperty>, Un
void setAdapterParams(String params);
- @Join
- StoredLayout getEnclosingLayout() throws FetchException;
-
/**
* Record version number for this StoredPropertyLayout instance. Some
* encoding strategies require a version number.