diff options
| author | Brian S. O'Neill <bronee@gmail.com> | 2007-05-14 03:02:14 +0000 |
|---|---|---|
| committer | Brian S. O'Neill <bronee@gmail.com> | 2007-05-14 03:02:14 +0000 |
| commit | 5862bc69997a2c0bb26a90aabf766fdfa7192804 (patch) | |
| tree | 66570c19d90aaa52200ff5bf019c5ee77ba58275 /src/test/java/com/amazon/carbonado/stored | |
| parent | d65f58eeaf555232cca7af814bcd8e073cc55499 (diff) | |
More lob and sequence tests; LobEngine fixes.
Diffstat (limited to 'src/test/java/com/amazon/carbonado/stored')
| -rw-r--r-- | src/test/java/com/amazon/carbonado/stored/SequenceAndAltKey.java | 44 | ||||
| -rw-r--r-- | src/test/java/com/amazon/carbonado/stored/StorableWithLobs.java | 47 |
2 files changed, 91 insertions, 0 deletions
diff --git a/src/test/java/com/amazon/carbonado/stored/SequenceAndAltKey.java b/src/test/java/com/amazon/carbonado/stored/SequenceAndAltKey.java new file mode 100644 index 0000000..564a501 --- /dev/null +++ b/src/test/java/com/amazon/carbonado/stored/SequenceAndAltKey.java @@ -0,0 +1,44 @@ +/*
+ * Copyright 2006 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.amazon.carbonado.stored;
+
+import com.amazon.carbonado.AlternateKeys;
+import com.amazon.carbonado.Key;
+import com.amazon.carbonado.PrimaryKey;
+import com.amazon.carbonado.Sequence;
+import com.amazon.carbonado.Storable;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("ID")
+@AlternateKeys(@Key("name"))
+public interface SequenceAndAltKey extends Storable {
+ @Sequence("SEQ_ID")
+ int getID();
+ void setID(int id);
+
+ String getName();
+ void setName(String name);
+
+ String getData();
+ void setData(String data);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableWithLobs.java b/src/test/java/com/amazon/carbonado/stored/StorableWithLobs.java new file mode 100644 index 0000000..5f3b0bc --- /dev/null +++ b/src/test/java/com/amazon/carbonado/stored/StorableWithLobs.java @@ -0,0 +1,47 @@ +/*
+ * Copyright 2006 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.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.amazon.carbonado.stored;
+
+import com.amazon.carbonado.Nullable;
+import com.amazon.carbonado.Sequence;
+import com.amazon.carbonado.Storable;
+import com.amazon.carbonado.PrimaryKey;
+
+import com.amazon.carbonado.lob.Blob;
+import com.amazon.carbonado.lob.Clob;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("id")
+public interface StorableWithLobs extends Storable {
+ @Sequence("foo")
+ int getId();
+ void setId(int id);
+
+ @Nullable
+ Blob getBlobValue();
+ void setBlobValue(Blob value);
+
+ @Nullable
+ Clob getClobValue();
+ void setClobValue(Clob value);
+}
|
