diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2008-04-18 20:23:47 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2008-04-18 20:23:47 +0000 |
commit | 5403ce66194832e9887cc0d0222ff449464e041f (patch) | |
tree | a43e942b2232d69cb14c0885b05a5a9602c4506e /src/main/java/com/amazon/carbonado/synthetic | |
parent | 80feb9546265d9c0feb9837e6cca041dbffc222d (diff) |
Support renamed properties in indexes and keys.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/synthetic')
-rw-r--r-- | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java index 98b7dad..2a58f93 100644 --- a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java +++ b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java @@ -34,6 +34,7 @@ import com.amazon.carbonado.AlternateKeys; import com.amazon.carbonado.Index;
import com.amazon.carbonado.Indexes;
import com.amazon.carbonado.Key;
+import com.amazon.carbonado.Name;
import com.amazon.carbonado.Nullable;
import com.amazon.carbonado.PrimaryKey;
import com.amazon.carbonado.Storable;
@@ -455,6 +456,13 @@ public class SyntheticStorableBuilder property.getReadMethodName(),
propertyType,
null);
+
+ if (property.getName() != null) {
+ // Define @Name
+ Annotation ann = mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Name.class));
+ ann.putMemberValue("value", property.getName());
+ }
+
if (property.isNullable()) {
mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Nullable.class));
}
|