From b044b17b7c455d6f23b0a4f8da7550d997036caa Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 14 Oct 2006 16:47:22 +0000 Subject: Moved tests to separate project. --- .../java/com/amazon/carbonado/stored/Address.java | 64 --------- .../java/com/amazon/carbonado/stored/Dummy.java | 145 --------------------- .../java/com/amazon/carbonado/stored/FileInfo.java | 100 -------------- .../com/amazon/carbonado/stored/ManyKeys2.java | 47 ------- .../java/com/amazon/carbonado/stored/Order.java | 68 ---------- .../com/amazon/carbonado/stored/OrderItem.java | 68 ---------- .../com/amazon/carbonado/stored/Promotion.java | 55 -------- .../java/com/amazon/carbonado/stored/Shipment.java | 69 ---------- .../java/com/amazon/carbonado/stored/Shipper.java | 52 -------- .../amazon/carbonado/stored/StorableDateIndex.java | 46 ------- .../amazon/carbonado/stored/StorableSequenced.java | 67 ---------- .../carbonado/stored/StorableTestAssymetric.java | 38 ------ .../amazon/carbonado/stored/StorableTestBasic.java | 114 ---------------- .../carbonado/stored/StorableTestBasicIndexed.java | 37 ------ .../carbonado/stored/StorableTestInvalid.java | 40 ------ .../carbonado/stored/StorableTestKeyValue.java | 43 ------ .../carbonado/stored/StorableTestMinimal.java | 32 ----- .../carbonado/stored/StorableTestMultiPK.java | 40 ------ .../carbonado/stored/StorableTimestamped.java | 38 ------ .../amazon/carbonado/stored/StorableVersioned.java | 50 ------- .../carbonado/stored/StorableVersionedIndexed.java | 36 ----- .../stored/StorableVersionedWithLong.java | 44 ------- .../stored/StorableVersionedWithLongObj.java | 46 ------- .../carbonado/stored/StorableVersionedWithObj.java | 46 ------- .../com/amazon/carbonado/stored/Timestamped.java | 34 ----- .../com/amazon/carbonado/stored/UserAddress.java | 66 ---------- .../java/com/amazon/carbonado/stored/UserInfo.java | 57 -------- 27 files changed, 1542 deletions(-) delete mode 100644 src/test/java/com/amazon/carbonado/stored/Address.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/Dummy.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/FileInfo.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/ManyKeys2.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/Order.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/OrderItem.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/Promotion.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/Shipment.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/Shipper.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableSequenced.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestAssymetric.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestBasic.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestBasicIndexed.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestKeyValue.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestMinimal.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableTimestamped.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableVersioned.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableVersionedIndexed.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLong.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLongObj.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/StorableVersionedWithObj.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/Timestamped.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/UserAddress.java delete mode 100644 src/test/java/com/amazon/carbonado/stored/UserInfo.java (limited to 'src/test/java/com/amazon/carbonado/stored') diff --git a/src/test/java/com/amazon/carbonado/stored/Address.java b/src/test/java/com/amazon/carbonado/stored/Address.java deleted file mode 100644 index 3043e54..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Address.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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.Alias; -import com.amazon.carbonado.Independent; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.Nullable; -import com.amazon.carbonado.PrimaryKey; -import com.amazon.carbonado.Sequence; - -/** - * - * - * @author Brian S O'Neill - */ -@Alias("TEST_ADDRESS") -@PrimaryKey("addressID") -public interface Address extends Storable { - @Sequence("TEST_ADDRESS_ID_SEQ") - long getAddressID(); - void setAddressID(long id); - - String getAddressLine1(); - void setAddressLine1(String value); - - @Nullable - String getAddressLine2(); - void setAddressLine2(String value); - - String getAddressCity(); - void setAddressCity(String value); - - @Nullable - String getAddressState(); - void setAddressState(String value); - - String getAddressZip(); - void setAddressZip(String value); - - String getAddressCountry(); - void setAddressCountry(String value); - - @Independent - String getCustomData(); - void setCustomData(String str); -} - diff --git a/src/test/java/com/amazon/carbonado/stored/Dummy.java b/src/test/java/com/amazon/carbonado/stored/Dummy.java deleted file mode 100644 index 980c718..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Dummy.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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.*; - -/** - * Implements all the Storable methods, but each throws - * UnsupportedOperationException. Methods defined in Object are left alone. - * - * @author Brian S O'Neill - */ -public class Dummy implements Storable { - public void load() throws FetchException { - throw error(); - } - - public boolean tryLoad() throws FetchException { - throw error(); - } - - public void insert() throws PersistException { - throw error(); - } - - public boolean tryInsert() throws PersistException { - throw error(); - } - - public void update() throws PersistException { - throw error(); - } - - public boolean tryUpdate() throws PersistException { - throw error(); - } - - public void delete() throws PersistException { - throw error(); - } - - public boolean tryDelete() throws PersistException { - throw error(); - } - - public Storage storage() { - throw error(); - } - - public Class storableType() { - throw error(); - } - - public void copyAllProperties(Storable target) { - throw error(); - } - - public void copyPrimaryKeyProperties(Storable target) { - throw error(); - } - - public void copyVersionProperty(Storable target) { - throw error(); - } - - public void copyUnequalProperties(Storable target) { - throw error(); - } - - public void copyDirtyProperties(Storable target) { - throw error(); - } - - public boolean hasDirtyProperties() { - throw error(); - } - - public void markPropertiesClean() { - throw error(); - } - - public void markAllPropertiesClean() { - throw error(); - } - - public void markPropertiesDirty() { - throw error(); - } - - public void markAllPropertiesDirty() { - throw error(); - } - - public boolean isPropertyUninitialized(String propertyName) { - throw error(); - } - - public boolean isPropertyDirty(String propertyName) { - throw error(); - } - - public boolean isPropertyClean(String propertyName) { - throw error(); - } - - public boolean isPropertySupported(String propertyName) { - throw error(); - } - - public Storable copy() { - throw error(); - } - - public boolean equalPrimaryKeys(Object obj) { - throw error(); - } - - public boolean equalProperties(Object obj) { - throw error(); - } - - public String toStringKeyOnly() { - throw error(); - } - - protected UnsupportedOperationException error() { - return new UnsupportedOperationException(); - } -} diff --git a/src/test/java/com/amazon/carbonado/stored/FileInfo.java b/src/test/java/com/amazon/carbonado/stored/FileInfo.java deleted file mode 100644 index c3245e3..0000000 --- a/src/test/java/com/amazon/carbonado/stored/FileInfo.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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 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 deleted file mode 100644 index 282ff02..0000000 --- a/src/test/java/com/amazon/carbonado/stored/ManyKeys2.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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/Order.java b/src/test/java/com/amazon/carbonado/stored/Order.java deleted file mode 100644 index 91804d9..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Order.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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.Alias; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.FetchException; -import com.amazon.carbonado.Join; -import com.amazon.carbonado.Nullable; -import com.amazon.carbonado.PrimaryKey; -import com.amazon.carbonado.Query; -import com.amazon.carbonado.Sequence; - -/** - * - * - * @author Brian S O'Neill - */ -@Alias("TEST_ORDER") -@PrimaryKey("orderID") -public interface Order extends Storable { - @Sequence("TEST_ORDER_ID_SEQ") - long getOrderID(); - void setOrderID(long id); - - String getOrderNumber(); - void setOrderNumber(String value); - - int getOrderTotal(); - void setOrderTotal(int value); - - @Nullable - String getOrderComments(); - void setOrderComments(String value); - - long getAddressID(); - void setAddressID(long value); - - @Join - @Nullable - Address getAddress() throws FetchException; - void setAddress(Address value); - - @Join - Query getOrderItems() throws FetchException; - - @Join - Query getShipments() throws FetchException; - - @Join - Query getPromotions() throws FetchException; -} diff --git a/src/test/java/com/amazon/carbonado/stored/OrderItem.java b/src/test/java/com/amazon/carbonado/stored/OrderItem.java deleted file mode 100644 index dba2477..0000000 --- a/src/test/java/com/amazon/carbonado/stored/OrderItem.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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.Alias; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.FetchException; -import com.amazon.carbonado.Index; -import com.amazon.carbonado.Indexes; -import com.amazon.carbonado.Join; -import com.amazon.carbonado.PrimaryKey; -import com.amazon.carbonado.Sequence; -import com.amazon.carbonado.constraint.IntegerConstraint; - -/** - * - * - * @author Brian S O'Neill - */ -@Alias("TEST_ORDER_ITEM") -@Indexes({@Index("+orderID"), @Index("+shipmentID")}) -@PrimaryKey("orderItemID") -public interface OrderItem extends Storable { - @Sequence("TEST_ORDER_ITEM_ID_SEQ") - long getOrderItemID(); - void setOrderItemID(long id); - - long getOrderID(); - void setOrderID(long value); - - @Join - Order getOrder() throws FetchException; - void setOrder(Order value); - - String getItemDescription(); - void setItemDescription(String value); - - int getItemQuantity(); - @IntegerConstraint(min=1, max=100) - void setItemQuantity(int value); - - int getItemPrice(); - void setItemPrice(int value); - - long getShipmentID(); - void setShipmentID(long value); - - @Join - Shipment getShipment() throws FetchException; - void setShipment(Shipment value); -} - diff --git a/src/test/java/com/amazon/carbonado/stored/Promotion.java b/src/test/java/com/amazon/carbonado/stored/Promotion.java deleted file mode 100644 index 18f4a2e..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Promotion.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.Alias; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.FetchException; -import com.amazon.carbonado.Join; -import com.amazon.carbonado.PrimaryKey; - -/** - * - * - * @author Brian S O'Neill - */ -@Alias("TEST_PROMOTION") -@PrimaryKey({"orderID", "promotionID"}) -public interface Promotion extends Storable { - long getOrderID(); - void setOrderID(long value); - - String getPromotionID(); - void setPromotionID(String value); - - @Join - Order getOrder() throws FetchException; - void setOrder(Order value); - - @Join - Promotion getPromotion() throws FetchException; - void setPromotion(Promotion value); - - String getPromotionTitle(); - void setPromotionTitle(String value); - - String getPromotionDetails(); - void setPromotionDetails(String value); -} - diff --git a/src/test/java/com/amazon/carbonado/stored/Shipment.java b/src/test/java/com/amazon/carbonado/stored/Shipment.java deleted file mode 100644 index 670806d..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Shipment.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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.Alias; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.FetchException; -import com.amazon.carbonado.Index; -import com.amazon.carbonado.Indexes; -import com.amazon.carbonado.Join; -import com.amazon.carbonado.PrimaryKey; -import com.amazon.carbonado.Query; -import com.amazon.carbonado.Sequence; - -/** - * - * - * @author Brian S O'Neill - */ -@Alias("TEST_SHIPMENT") -@Indexes(@Index("+orderID")) -@PrimaryKey("shipmentID") -public interface Shipment extends Storable { - @Sequence("TEST_SHIPMENT_ID_SEQ") - long getShipmentID(); - void setShipmentID(long id); - - String getShipmentNotes(); - void setShipmentNotes(String value); - - DateTime getShipmentDate(); - void setShipmentDate(DateTime value); - - long getOrderID(); - void setOrderID(long value); - - @Join - Order getOrder() throws FetchException; - void setOrder(Order value); - - long getShipperID(); - void setShipperID(long value); - - @Join - Shipper getShipper() throws FetchException; - void setShipper(Shipper value); - - @Join - Query getOrderItems() throws FetchException; -} - diff --git a/src/test/java/com/amazon/carbonado/stored/Shipper.java b/src/test/java/com/amazon/carbonado/stored/Shipper.java deleted file mode 100644 index 41e60f4..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Shipper.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.Alias; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.FetchException; -import com.amazon.carbonado.Join; -import com.amazon.carbonado.PrimaryKey; -import com.amazon.carbonado.Sequence; - -/** - * - * - * @author Brian S O'Neill - */ -@Alias("TEST_SHIPPER") -@PrimaryKey("shipperID") -public interface Shipper extends Storable { - @Sequence("TEST_SHIPPER_ID_SEQ") - long getShipperID(); - void setShipperID(long id); - - String getShipperName(); - void setShipperName(String value); - - String getShipperDetails(); - void setShipperDetails(String value); - - long getAddressID(); - void setAddressID(long value); - - @Join - Address getAddress() throws FetchException; - void setAddress(Address value); -} diff --git a/src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java b/src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java deleted file mode 100644 index 5e7d063..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableDateIndex.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 deleted file mode 100644 index 770d6f0..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableSequenced.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 { - @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 deleted file mode 100644 index 3808c1f..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestAssymetric.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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/StorableTestBasic.java b/src/test/java/com/amazon/carbonado/stored/StorableTestBasic.java deleted file mode 100644 index 0857518..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestBasic.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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.util.Random; - -import org.joda.time.DateTime; - -import com.amazon.carbonado.Nullable; -import com.amazon.carbonado.Storable; -import com.amazon.carbonado.PrimaryKey; -import com.amazon.carbonado.Storage; -import com.amazon.carbonado.Repository; -import com.amazon.carbonado.RepositoryException; - -/** - * StorableTestBasic - * - * @author Don Schneider - */ -@PrimaryKey("id") -public abstract class StorableTestBasic implements Storable { - public abstract int getId(); - public abstract void setId(int id); - - // Basic coverage of the primitives - public abstract String getStringProp(); - public abstract void setStringProp(String aStringThing); - - public abstract int getIntProp(); - public abstract void setIntProp(int anInt); - - public abstract long getLongProp(); - public abstract void setLongProp(long aLong); - - public abstract double getDoubleProp(); - public abstract void setDoubleProp(double aDouble); - - @Nullable - public abstract DateTime getDate(); - public abstract void setDate(DateTime aDate); - - public void initPrimaryKeyProperties() { - setId(10); - } - - public void initBasicProperties() { - setStringProp("foo"); - setIntProp(10); - setLongProp(120); - setDoubleProp(1.2); - } - - public void initPropertiesRandomly(int id) { - setId(id); - - Random random = new Random(1000); - - setIntProp(random.nextInt()); - setLongProp(random.nextLong()); - setDoubleProp(random.nextDouble()); - setStringProp("imaString_" + id % 10); - } - - public void initPropertiesPredictably(int id) { - setId(id); - - setIntProp(id*10); - setLongProp(id*10); - setDoubleProp(id/2.0); - setStringProp("string-" + id % 100); - } - - public static void insertBunches(Repository repository, int count) - throws RepositoryException - { - insertBunches(repository, count, 0, true); - } - - - public static void insertBunches(Repository repository, - int count, int startId, - boolean doRandom) - throws RepositoryException - { - Storage storage = repository.storageFor(StorableTestBasic.class); - StorableTestBasic s; - - for (int i = 0; i < count; i ++) { - s = storage.prepare(); - if (doRandom) { - s.initPropertiesRandomly(i); - } else { - s.initPropertiesPredictably(i+startId); - } - s.insert(); - } - } -} diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestBasicIndexed.java b/src/test/java/com/amazon/carbonado/stored/StorableTestBasicIndexed.java deleted file mode 100644 index c9de396..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestBasicIndexed.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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; - -/** - * StorableTestBasicIndexed - * - * @author Brian S O'Neill - */ -@Indexes({ - @Index("stringProp"), - @Index("intProp"), - @Index("longProp"), - @Index("doubleProp") -}) -@PrimaryKey("id") -public abstract class StorableTestBasicIndexed extends StorableTestBasic { -} diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java b/src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java deleted file mode 100644 index bd9fed2..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestInvalid.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 deleted file mode 100644 index 44ecc2f..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestKeyValue.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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/StorableTestMinimal.java b/src/test/java/com/amazon/carbonado/stored/StorableTestMinimal.java deleted file mode 100644 index a1aae70..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestMinimal.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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; - -/** - * StorableTestBasic - * - * @author Don Schneider - */ -@PrimaryKey("id") -public interface StorableTestMinimal extends Storable { - int getId(); - void setId(int id); -} diff --git a/src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java b/src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java deleted file mode 100644 index ace031b..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTestMultiPK.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 deleted file mode 100644 index d93ffeb..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableTimestamped.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 deleted file mode 100644 index 2de9640..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableVersioned.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 deleted file mode 100644 index 906e8be..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableVersionedIndexed.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 deleted file mode 100644 index 6d55d54..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLong.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 deleted file mode 100644 index 2acfdf8..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithLongObj.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 deleted file mode 100644 index 29f313c..0000000 --- a/src/test/java/com/amazon/carbonado/stored/StorableVersionedWithObj.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 deleted file mode 100644 index b38ee28..0000000 --- a/src/test/java/com/amazon/carbonado/stored/Timestamped.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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); -} diff --git a/src/test/java/com/amazon/carbonado/stored/UserAddress.java b/src/test/java/com/amazon/carbonado/stored/UserAddress.java deleted file mode 100644 index 466f6eb..0000000 --- a/src/test/java/com/amazon/carbonado/stored/UserAddress.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 (boneill) - */ -@Indexes({ - @Index({"country", "state", "city"}), - @Index({"state", "city"}), - @Index("city") -}) -@PrimaryKey("addressID") -public abstract class UserAddress implements Storable { - public abstract int getAddressID(); - public abstract void setAddressID(int id); - - public abstract String getLine1(); - public abstract void setLine1(String value); - - @Nullable - public abstract String getLine2(); - public abstract void setLine2(String value); - - public abstract String getCity(); - public abstract void setCity(String value); - - public abstract String getState(); - public abstract void setState(String value); - - public abstract String getCountry(); - public abstract void setCountry(String value); - - @Nullable - public abstract String getPostalCode(); - public abstract void setPostalCode(String value); - - @Nullable - public abstract Integer getNeighborAddressID(); - public abstract void setNeighborAddressID(Integer id); - - @Nullable - @Join(internal="neighborAddressID", external="addressID") - public abstract UserAddress getNeighbor() throws FetchException; - public abstract void setNeighbor(UserAddress address) throws FetchException; -} diff --git a/src/test/java/com/amazon/carbonado/stored/UserInfo.java b/src/test/java/com/amazon/carbonado/stored/UserInfo.java deleted file mode 100644 index e0bffa4..0000000 --- a/src/test/java/com/amazon/carbonado/stored/UserInfo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.*; -import com.amazon.carbonado.constraint.*; - -/** - * - * - * @author Brian S O'Neill (boneill) - */ -@Indexes({ - @Index("firstName"), - @Index("lastName"), - @Index("addressID") -}) -@PrimaryKey("userID") -public abstract class UserInfo implements Storable { - public abstract int getUserID(); - public abstract void setUserID(int id); - - public abstract int getStateID(); - @IntegerConstraint(allowed={1, 2, 3}) - public abstract void setStateID(int state); - - public abstract String getFirstName(); - @LengthConstraint(min=1, max=50) - public abstract void setFirstName(String value); - - public abstract String getLastName(); - @LengthConstraint(min=1, max=50) - public abstract void setLastName(String value); - - public abstract int getAddressID(); - public abstract void setAddressID(int id); - - @Join - public abstract UserAddress getAddress() throws FetchException; - public abstract void setAddress(UserAddress address); -} -- cgit v1.2.3