summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-10-23 18:14:09 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-10-23 18:14:09 +0000
commit7c6eb95a14d5467c8396524645a1b2d9273a7300 (patch)
tree80f7e7f372c1979c2bd10c2ee6031bc1b99acf54
parent1faf119a884e3dd2388aea39fed3f4eb3699999a (diff)
Examples make consistent use of get/set pair.
-rw-r--r--src/main/java/com/amazon/carbonado/Alias.java1
-rw-r--r--src/main/java/com/amazon/carbonado/AlternateKeys.java4
-rw-r--r--src/main/java/com/amazon/carbonado/Independent.java1
-rw-r--r--src/main/java/com/amazon/carbonado/Indexes.java4
-rw-r--r--src/main/java/com/amazon/carbonado/Join.java6
-rw-r--r--src/main/java/com/amazon/carbonado/Nullable.java1
-rw-r--r--src/main/java/com/amazon/carbonado/PrimaryKey.java1
-rw-r--r--src/main/java/com/amazon/carbonado/Sequence.java1
-rw-r--r--src/main/java/com/amazon/carbonado/Version.java1
-rw-r--r--src/main/java/com/amazon/carbonado/adapter/AdapterDefinition.java1
-rw-r--r--src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java1
-rw-r--r--src/main/java/com/amazon/carbonado/adapter/TextAdapter.java1
-rw-r--r--src/main/java/com/amazon/carbonado/adapter/TrueFalseAdapter.java1
-rw-r--r--src/main/java/com/amazon/carbonado/adapter/YesNoAdapter.java1
-rw-r--r--src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java1
-rw-r--r--src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java1
-rw-r--r--src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java2
-rw-r--r--src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java3
-rw-r--r--src/main/java/com/amazon/carbonado/constraint/TextConstraint.java1
19 files changed, 23 insertions, 10 deletions
diff --git a/src/main/java/com/amazon/carbonado/Alias.java b/src/main/java/com/amazon/carbonado/Alias.java
index b2e122c..76caade 100644
--- a/src/main/java/com/amazon/carbonado/Alias.java
+++ b/src/main/java/com/amazon/carbonado/Alias.java
@@ -35,6 +35,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable&lt;UserInfo&gt; {
* <b>&#64;Alias("USER_ID")</b>
* long getUserInfoID();
+ * void setUserInfoID(long id);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/AlternateKeys.java b/src/main/java/com/amazon/carbonado/AlternateKeys.java
index 9d27f12..ef73088 100644
--- a/src/main/java/com/amazon/carbonado/AlternateKeys.java
+++ b/src/main/java/com/amazon/carbonado/AlternateKeys.java
@@ -31,12 +31,16 @@ import java.lang.annotation.*;
* &#64;PrimaryKey("ID")
* public interface FileInfo extends Storable&lt;FileInfo&gt; {
* long getID();
+ * void setID(long id);
*
* String getFullPath();
+ * void setFullPath(String path);
*
* String getName();
+ * void setName(String name);
*
* long getParentID();
+ * void setParentID(long id);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/Independent.java b/src/main/java/com/amazon/carbonado/Independent.java
index f240fe5..ab4b50b 100644
--- a/src/main/java/com/amazon/carbonado/Independent.java
+++ b/src/main/java/com/amazon/carbonado/Independent.java
@@ -45,6 +45,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable&lt;UserInfo&gt; {
* <b>&#64;Independent</b>
* String getName();
+ * void setName(String name);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/Indexes.java b/src/main/java/com/amazon/carbonado/Indexes.java
index 482f955..ad14f5d 100644
--- a/src/main/java/com/amazon/carbonado/Indexes.java
+++ b/src/main/java/com/amazon/carbonado/Indexes.java
@@ -33,12 +33,16 @@ import java.lang.annotation.*;
* &#64;PrimaryKey("ID")
* public interface FileInfo extends Storable&lt;FileInfo&gt; {
* long getID();
+ * void setID(long id);
*
* String getName();
+ * void setName(String name);
*
* long getLength();
+ * void setLength(long length);
*
* long getLastModified();
+ * void getLastModified(long datetime);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/Join.java b/src/main/java/com/amazon/carbonado/Join.java
index eb21e58..d388769 100644
--- a/src/main/java/com/amazon/carbonado/Join.java
+++ b/src/main/java/com/amazon/carbonado/Join.java
@@ -66,29 +66,31 @@ import java.lang.annotation.*;
* &#64;PrimaryKey("userID")
* public interface UserInfo extends Storable {
* int getUserID();
+ * void setUserID(int id);
*
* int getAddressID();
- *
* void setAddressID(int value);
*
* // Natural join, which works because Address has a primary key
* // property of addressID which matches a property in this type.
* <b>&#64;Join</b>
* Address getAddress() throws FetchException;
+ * void setAddress(Address address);
*
* // Explicit join, equivalent to getAddress.
* <b>&#64;Join(internal="addressID", external="addressID")</b>
* Address getCurrentAddress() throws FetchException;
+ * void setCurrentAddress(Address address);
*
* &#64;Nullable
* Integer getParentID();
- *
* void setParentID(Integer value);
*
* // Many-to-one relationship
* &#64;Nullable
* <b>&#64;Join(internal="parentID", external="userID")</b>
* UserInfo getParent() throws FetchException;
+ * void setParent(UserInfo parent);
*
* // One-to-many relationship
* <b>&#64;Join(internal="userID", external="parentID")</b>
diff --git a/src/main/java/com/amazon/carbonado/Nullable.java b/src/main/java/com/amazon/carbonado/Nullable.java
index c8ac923..4ce63ec 100644
--- a/src/main/java/com/amazon/carbonado/Nullable.java
+++ b/src/main/java/com/amazon/carbonado/Nullable.java
@@ -30,6 +30,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable&lt;UserInfo&gt; {
* <b>&#64;Nullable</b>
* String getName();
+ * void setName(String name);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/PrimaryKey.java b/src/main/java/com/amazon/carbonado/PrimaryKey.java
index ffea9be..8473938 100644
--- a/src/main/java/com/amazon/carbonado/PrimaryKey.java
+++ b/src/main/java/com/amazon/carbonado/PrimaryKey.java
@@ -29,6 +29,7 @@ import java.lang.annotation.*;
* <b>&#64;PrimaryKey</b>("userInfoID")
* public interface UserInfo extends Storable&lt;UserInfo&gt; {
* long getUserInfoID();
+ * void setUserInfoID(long id);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/Sequence.java b/src/main/java/com/amazon/carbonado/Sequence.java
index ea38493..a810e39 100644
--- a/src/main/java/com/amazon/carbonado/Sequence.java
+++ b/src/main/java/com/amazon/carbonado/Sequence.java
@@ -31,6 +31,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable&lt;UserInfo&gt; {
* <b>&#64;Sequence("USER_ID_SEQ")</b>
* long getUserInfoID();
+ * void setUserInfoID(long id);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/Version.java b/src/main/java/com/amazon/carbonado/Version.java
index 9bb326a..7c3c2b4 100644
--- a/src/main/java/com/amazon/carbonado/Version.java
+++ b/src/main/java/com/amazon/carbonado/Version.java
@@ -62,6 +62,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable {
* <b>&#64;Version</b>
* int getRecordVersionNumber();
+ * void setRecordVersionNumber(int version);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/adapter/AdapterDefinition.java b/src/main/java/com/amazon/carbonado/adapter/AdapterDefinition.java
index 0787010..f6292b9 100644
--- a/src/main/java/com/amazon/carbonado/adapter/AdapterDefinition.java
+++ b/src/main/java/com/amazon/carbonado/adapter/AdapterDefinition.java
@@ -87,6 +87,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable {
* <b>&#64;TrueFalseAdapter</b>
* boolean isAdministrator();
+ * void setAdministrator(boolean admin);
* }
* </pre>
*
diff --git a/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java b/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java
index 5102b70..af715ac 100644
--- a/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java
+++ b/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java
@@ -48,6 +48,7 @@ import com.amazon.carbonado.adapter.AdapterDefinition;
* public interface UserInfo extends Storable {
* <b>&#64;DateTimeAdapter(timeZone="UTC")</b>
* DateTime getModifyDateTime();
+ * void setModifyDateTime(DateTime dt);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java b/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java
index e07ed50..8a51c3f 100644
--- a/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java
+++ b/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java
@@ -52,6 +52,7 @@ import com.amazon.carbonado.adapter.AdapterDefinition;
* public interface UserInfo extends Storable {
* <b>&#64;TextAdapter(charset="UTF-8")</b>
* String getWelcomeMessage();
+ * void setWelcomeMessage(String message);
*
* ...
* }
diff --git a/src/main/java/com/amazon/carbonado/adapter/TrueFalseAdapter.java b/src/main/java/com/amazon/carbonado/adapter/TrueFalseAdapter.java
index 886b994..74dcd09 100644
--- a/src/main/java/com/amazon/carbonado/adapter/TrueFalseAdapter.java
+++ b/src/main/java/com/amazon/carbonado/adapter/TrueFalseAdapter.java
@@ -31,7 +31,6 @@ import java.lang.annotation.Target;
* public interface UserInfo extends Storable {
* <b>&#64;TrueFalseAdapter</b>
* boolean isAdministrator();
- *
* void setAdministrator(boolean admin);
*
* ...
diff --git a/src/main/java/com/amazon/carbonado/adapter/YesNoAdapter.java b/src/main/java/com/amazon/carbonado/adapter/YesNoAdapter.java
index 4d9c979..f28b4af 100644
--- a/src/main/java/com/amazon/carbonado/adapter/YesNoAdapter.java
+++ b/src/main/java/com/amazon/carbonado/adapter/YesNoAdapter.java
@@ -31,7 +31,6 @@ import java.lang.annotation.Target;
* public interface UserInfo extends Storable {
* <b>&#64;YesNoAdapter</b>
* boolean isAdministrator();
- *
* void setAdministrator(boolean admin);
*
* ...
diff --git a/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java b/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java
index 22514fc..73db4ef 100644
--- a/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java
+++ b/src/main/java/com/amazon/carbonado/constraint/ConstraintDefinition.java
@@ -83,6 +83,7 @@ import java.lang.annotation.*;
* public interface UserInfo extends Storable {
* ...
*
+ * int getAge();
* // Constraint is called before setting age.
* <b>&#64;IntegerConstraint(min=0, max=120)</b>
* void setAge(int value);
diff --git a/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java b/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java
index 31b6503..29c5c83 100644
--- a/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/FloatConstraint.java
@@ -32,7 +32,6 @@ import com.amazon.carbonado.MalformedTypeException;
* <p>Example:<pre>
* public interface PolarCoordinate extends Storable {
* double getTheta();
- *
* <b>&#64;FloatConstraint(min=0, max=Math.PI * 2, disallowed=Double.NaN)</b>
* void setTheta(double radians);
*
diff --git a/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java b/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java
index 69fa5cc..56171fd 100644
--- a/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/IntegerConstraint.java
@@ -32,12 +32,10 @@ import com.amazon.carbonado.MalformedTypeException;
* <p>Example:<pre>
* public interface UserInfo extends Storable {
* int getAge();
- *
* <b>&#64;IntegerConstraint(min=0, max=120)</b>
* void setAge(int value);
*
* int getRoleID();
- *
* <b>&#64;IntegerConstraint(allowed={ROLE_REGULAR, ROLE_ADMIN})</b>
* void setRoleID(int role);
*
diff --git a/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java b/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java
index 7e17a1f..1ffb4b5 100644
--- a/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/LengthConstraint.java
@@ -30,8 +30,7 @@ import com.amazon.carbonado.MalformedTypeException;
*
* <p>Example:<pre>
* public interface UserInfo extends Storable {
- * int getFirstName();
- *
+ * String getFirstName();
* <b>&#64;LengthConstraint(min=1, max=50)</b>
* void setFirstName(String name);
*
diff --git a/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java b/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java
index 08574e8..a9e90db 100644
--- a/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java
+++ b/src/main/java/com/amazon/carbonado/constraint/TextConstraint.java
@@ -32,7 +32,6 @@ import com.amazon.carbonado.MalformedTypeException;
* <p>Example:<pre>
* public interface UserInfo extends Storable {
* char isActive();
- *
* <b>&#64;TextConstraint(allowed={"Y", "N"})</b>
* void setActive(char value);
*