summaryrefslogtreecommitdiff
path: root/src/test/java/com/amazon/carbonado/stored
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-09-20 04:01:56 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-09-20 04:01:56 +0000
commitbdb79fe169b556de85d690c088b7f0fbf075778a (patch)
tree0310ed7a52a07ee848e5a0ed992d3bb016ec7473 /src/test/java/com/amazon/carbonado/stored
parentc16716f2d8e15f6539995c656ad05e4e8f799a21 (diff)
Integrated more tests.
Diffstat (limited to 'src/test/java/com/amazon/carbonado/stored')
-rw-r--r--src/test/java/com/amazon/carbonado/stored/FileInfo.java109
-rw-r--r--src/test/java/com/amazon/carbonado/stored/ManyKeys2.java47
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java46
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableSequenced.java67
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableTestAssymetric.java38
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java40
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableTestKeyValue.java43
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java40
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableTimestamped.java38
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableVersioned.java50
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableVersionedIndexed.java36
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLong.java44
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLongObj.java46
-rw-r--r--src/test/java/com/amazon/carbonado/stored/StorableVersionedWithObj.java46
-rw-r--r--src/test/java/com/amazon/carbonado/stored/Timestamped.java34
15 files changed, 724 insertions, 0 deletions
diff --git a/src/test/java/com/amazon/carbonado/stored/FileInfo.java b/src/test/java/com/amazon/carbonado/stored/FileInfo.java
new file mode 100644
index 0000000..7d35faf
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/FileInfo.java
@@ -0,0 +1,109 @@
+/*
+ * 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 java.io.*;
+
+import org.joda.time.DateTime;
+
+import com.amazon.carbonado.*;
+import com.amazon.carbonado.lob.*;
+import com.amazon.carbonado.adapter.*;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@Indexes({
+ @Index("name"),
+ @Index({"length", "lastModified"}),
+ @Index("lastModified"),
+ @Index("parentID")
+})
+@Alias("CBN_TEST_FILE_INFO")
+@AlternateKeys({
+ @Key({"parentID", "name"})
+})
+@PrimaryKey("ID")
+public abstract class FileInfo implements Storable {
+ @Sequence("com.amazon.carbonado.storables.FileInfo")
+ public abstract int getID();
+
+ public abstract void setID(int value);
+
+ @Nullable
+ public abstract Integer getParentID();
+
+ public abstract void setParentID(Integer id);
+
+ @Nullable
+ @Join(internal="parentID", external="ID")
+ public abstract FileInfo getParent() throws FetchException;
+
+ public abstract void setParent(FileInfo value);
+
+ @Join(internal="ID", external="parentID")
+ public abstract Query<FileInfo> getChildren() throws FetchException;
+
+ @Alias("FILE_NAME")
+ public abstract String getName();
+
+ public abstract void setName(String value);
+
+ @YesNoAdapter
+ public abstract boolean isDirectory();
+
+ public abstract void setDirectory(boolean value);
+
+ @Alias("FILE_LENGTH")
+ public abstract long getLength();
+
+ public abstract void setLength(long value);
+
+ @Nullable
+ public abstract DateTime getLastModified();
+
+ public abstract void setLastModified(DateTime value);
+
+ @Version
+ @Alias("RECORD_VERSION_NUMBER")
+ public abstract int getVersionNumber();
+
+ public abstract void setVersionNumber(int version);
+
+ @Nullable
+ public abstract Blob getFileData();
+
+ public abstract void setFileData(Blob data);
+
+ public String getFullPath() throws FetchException {
+ FileInfo parent;
+ try {
+ parent = getParent();
+ } catch (FetchNoneException e) {
+ parent = null;
+ }
+ if (parent == null) {
+ return getName();
+ } else {
+ return parent.getFullPath() + '/' + getName();
+ }
+ }
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/ManyKeys2.java b/src/test/java/com/amazon/carbonado/stored/ManyKeys2.java
new file mode 100644
index 0000000..282ff02
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/ManyKeys2.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.*;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey({"a", "b", "c", "d", "e", "f"})
+public interface ManyKeys2 extends Storable {
+ int getA();
+ void setA(int value);
+
+ int getB();
+ void setB(int value);
+
+ int getC();
+ void setC(int value);
+
+ int getD();
+ void setD(int value);
+
+ int getE();
+ void setE(int value);
+
+ int getF();
+ void setF(int value);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java b/src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java
new file mode 100644
index 0000000..5e7d063
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java
@@ -0,0 +1,46 @@
+/*
+ * 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 org.joda.time.DateTime;
+
+
+import com.amazon.carbonado.Index;
+import com.amazon.carbonado.Indexes;
+import com.amazon.carbonado.PrimaryKey;
+import com.amazon.carbonado.Storable;
+import com.amazon.carbonado.adapter.DateTimeAdapter;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@Indexes(@Index("orderDate"))
+@PrimaryKey("ID")
+public interface StorableDateIndex extends Storable {
+ int getID();
+
+ void setID(int id);
+
+ @DateTimeAdapter(timeZone="America/New_York")
+ DateTime getOrderDate();
+
+ void setOrderDate(DateTime date);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableSequenced.java b/src/test/java/com/amazon/carbonado/stored/StorableSequenced.java
new file mode 100644
index 0000000..770d6f0
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableSequenced.java
@@ -0,0 +1,67 @@
+/*
+ * 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.PrimaryKey;
+import com.amazon.carbonado.Sequence;
+import com.amazon.carbonado.Storable;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("ID")
+public interface StorableSequenced extends Storable<StorableSequenced> {
+ @Sequence("pk")
+ long getID();
+
+ void setID(long id);
+
+ @Sequence("some_int")
+ int getSomeInt();
+
+ void setSomeInt(int i);
+
+ @Sequence("some_IntegerObj")
+ Integer getSomeIntegerObj();
+
+ void setSomeIntegerObj(Integer i);
+
+ @Sequence("some_long")
+ long getSomeLong();
+
+ void setSomeLong(long i);
+
+ @Sequence("some_LongObj")
+ @Nullable
+ Long getSomeLongObj();
+
+ void setSomeLongObj(Long i);
+
+ @Sequence("some_String")
+ String getSomeString();
+
+ void setSomeString(String str);
+
+ String getData();
+
+ void setData(String data);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestAssymetric.java b/src/test/java/com/amazon/carbonado/stored/StorableTestAssymetric.java
new file mode 100644
index 0000000..3808c1f
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableTestAssymetric.java
@@ -0,0 +1,38 @@
+/*
+ * 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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+
+/*
+ * StorableTestAssymetric
+ *
+ * @author Don Schneider
+ */
+@PrimaryKey("id")
+public abstract class StorableTestAssymetric implements Storable {
+ public abstract int getId();
+ public abstract void setId(int id);
+
+ public int getAssymetricGet()
+ {
+ return getId()*3;
+ };
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java b/src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java
new file mode 100644
index 0000000..bd9fed2
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java
@@ -0,0 +1,40 @@
+/*
+ * 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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+
+/**
+ * StorableTestInvalid
+ *
+ * @author Don Schneider
+ */
+@PrimaryKey("pk")
+public interface StorableTestInvalid extends Storable {
+ int getPk();
+ void setPk(int id);
+
+ Custom getCustom();
+ void setCustom(Custom aCustom);
+
+
+ // Probably more than is needed
+ class Custom { }
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestKeyValue.java b/src/test/java/com/amazon/carbonado/stored/StorableTestKeyValue.java
new file mode 100644
index 0000000..44ecc2f
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableTestKeyValue.java
@@ -0,0 +1,43 @@
+/*
+ * 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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+
+/**
+ * StorableTestKeyValue
+ *
+ * @author Don Schneider
+ */
+@PrimaryKey({"key1", "key2"})
+public interface StorableTestKeyValue extends Storable {
+ int getKey1();
+ void setKey1(int id);
+
+ int getKey2();
+ void setKey2(int id);
+
+ int getValue1();
+ void setValue1(int value);
+
+ int getValue2();
+ void setValue2(int value);
+
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java b/src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java
new file mode 100644
index 0000000..ace031b
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java
@@ -0,0 +1,40 @@
+/*
+ * 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.PrimaryKey;
+import com.amazon.carbonado.Storable;
+
+/**
+ * StorableTestMultiPK
+ *
+ * @author Don Schneider
+ */
+@PrimaryKey({"idPK", "stringPK"})
+public interface StorableTestMultiPK extends Storable {
+ int getIdPK();
+ void setIdPK(int id);
+
+ // Basic coverage of the primitives
+ String getStringPK();
+ void setStringPK(String aString);
+
+ String getStringData();
+ void setStringData(String aData);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTimestamped.java b/src/test/java/com/amazon/carbonado/stored/StorableTimestamped.java
new file mode 100644
index 0000000..d93ffeb
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableTimestamped.java
@@ -0,0 +1,38 @@
+/*
+ * 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 org.joda.time.DateTime;
+
+import com.amazon.carbonado.Storable;
+import com.amazon.carbonado.PrimaryKey;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("id")
+public interface StorableTimestamped extends Storable, Timestamped {
+ int getId();
+ void setId(int id);
+
+ String getValue();
+ void setValue(String str);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableVersioned.java b/src/test/java/com/amazon/carbonado/stored/StorableVersioned.java
new file mode 100644
index 0000000..2de9640
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableVersioned.java
@@ -0,0 +1,50 @@
+/*
+ * 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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+import com.amazon.carbonado.Version;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("ID")
+public interface StorableVersioned extends Storable {
+ int getID();
+
+ void setID(int id);
+
+ String getValue();
+
+ void setValue(String value);
+
+ @Nullable
+ String getName();
+
+ void setName(String name);
+
+ @Version
+ int getVersion();
+
+ void setVersion(int version);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableVersionedIndexed.java b/src/test/java/com/amazon/carbonado/stored/StorableVersionedIndexed.java
new file mode 100644
index 0000000..906e8be
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableVersionedIndexed.java
@@ -0,0 +1,36 @@
+/*
+ * 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.Index;
+import com.amazon.carbonado.Indexes;
+import com.amazon.carbonado.PrimaryKey;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@Indexes({
+ @Index("value"),
+ @Index("name")
+})
+@PrimaryKey("ID")
+public interface StorableVersionedIndexed extends StorableVersioned {
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLong.java b/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLong.java
new file mode 100644
index 0000000..6d55d54
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLong.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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+import com.amazon.carbonado.Version;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("ID")
+public interface StorableVersionedWithLong extends Storable {
+ int getID();
+
+ void setID(int id);
+
+ String getValue();
+
+ void setValue(String value);
+
+ @Version
+ long getVersion();
+
+ void setVersion(long version);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLongObj.java b/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLongObj.java
new file mode 100644
index 0000000..2acfdf8
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLongObj.java
@@ -0,0 +1,46 @@
+/*
+ * 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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+import com.amazon.carbonado.Version;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("ID")
+public interface StorableVersionedWithLongObj extends Storable {
+ int getID();
+
+ void setID(int id);
+
+ String getValue();
+
+ void setValue(String value);
+
+ @Version
+ @Nullable
+ Long getVersion();
+
+ void setVersion(Long version);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithObj.java b/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithObj.java
new file mode 100644
index 0000000..29f313c
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithObj.java
@@ -0,0 +1,46 @@
+/*
+ * 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.Storable;
+import com.amazon.carbonado.PrimaryKey;
+import com.amazon.carbonado.Version;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+@PrimaryKey("ID")
+public interface StorableVersionedWithObj extends Storable {
+ int getID();
+
+ void setID(int id);
+
+ String getValue();
+
+ void setValue(String value);
+
+ @Version
+ @Nullable
+ Integer getVersion();
+
+ void setVersion(Integer version);
+}
diff --git a/src/test/java/com/amazon/carbonado/stored/Timestamped.java b/src/test/java/com/amazon/carbonado/stored/Timestamped.java
new file mode 100644
index 0000000..b38ee28
--- /dev/null
+++ b/src/test/java/com/amazon/carbonado/stored/Timestamped.java
@@ -0,0 +1,34 @@
+/*
+ * 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 org.joda.time.DateTime;
+
+/**
+ *
+ *
+ * @author Brian S O'Neill
+ */
+public interface Timestamped {
+ DateTime getSubmitDateTime();
+ void setSubmitDateTime(DateTime dt);
+
+ DateTime getModifyDateTime();
+ void setModifyDateTime(DateTime dt);
+}