From b2ca98bf9e2e4c2f68cbda32155a29ebd798bd9d Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 7 Nov 2007 19:47:07 +0000 Subject: Comments for new Name annotation. --- src/main/java/com/amazon/carbonado/Alias.java | 1 + src/main/java/com/amazon/carbonado/Name.java | 22 +++++++++++++--------- .../carbonado/info/StorableIntrospector.java | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amazon/carbonado/Alias.java b/src/main/java/com/amazon/carbonado/Alias.java index 76caade..07e93bc 100644 --- a/src/main/java/com/amazon/carbonado/Alias.java +++ b/src/main/java/com/amazon/carbonado/Alias.java @@ -42,6 +42,7 @@ import java.lang.annotation.*; * * * @author Brian S O'Neill + * @see Name */ @Documented @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/com/amazon/carbonado/Name.java b/src/main/java/com/amazon/carbonado/Name.java index 7fae973..bc3da42 100644 --- a/src/main/java/com/amazon/carbonado/Name.java +++ b/src/main/java/com/amazon/carbonado/Name.java @@ -1,5 +1,5 @@ /* - * Copyright 2006 Amazon Technologies, Inc. or its affiliates. + * Copyright 2007 Amazon Technologies, Inc. or its affiliates. * Amazon, Amazon.com and Carbonado are trademarks or registered trademarks * of Amazon Technologies, Inc. or its affiliates. All rights reserved. * @@ -25,21 +25,25 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Identifies prefered name for a {@link Storable} or a Storable property. By default the - * property name is following the convention of a java Bean. Use this annotation when - * you want to use a prefered name for a storable property. . + * Overrides the primary name of a Storable property. By default, the primary + * name of a property is determined by JavaBeans conventions. When overridden, + * all references to the named property must use the new name. * *

Example:

+ * @PrimaryKey("userId")
  * public interface UserInfo extends Storable<UserInfo> {
- *     @Name("MyName")
- *     String getName();
- *     void setName(String name);
+ *     @Name("userId")
+ *     long getUserInfoID();
+ *     void setUserInfoID(long id);
  *
  *     ...
  * }
  * 
* + * @since 1.2 * @author Fang Chen + * @author Brian S O'Neill + * @see Alias */ @Documented @Retention(RetentionPolicy.RUNTIME) @@ -47,8 +51,8 @@ import java.lang.annotation.Target; public @interface Name { /** - * The prefered name of the property + * Name assigned to the property. */ String value(); -} \ No newline at end of file +} diff --git a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java index c62e3ce..7e8fbf8 100644 --- a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java +++ b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java @@ -77,6 +77,7 @@ import com.amazon.carbonado.lob.Lob; * examination failed. * * @author Brian S O'Neill + * @author Fang Chen */ public class StorableIntrospector { // Weakly maps Class objects to softly referenced StorableInfo objects. -- cgit v1.2.3