diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/synthetic')
-rw-r--r-- | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java | 13 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java index 778b4ac..f83be02 100644 --- a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java +++ b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java @@ -24,6 +24,7 @@ import java.lang.reflect.UndeclaredThrowableException; import java.util.Comparator;
import java.util.Iterator;
+import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.cursor.SortedCursor;
@@ -109,11 +110,11 @@ public class SyntheticStorableReferenceAccess<S extends Storable> { * @param reference source of property values
* @param master master whose primary key properties will be set
*/
- public void copyToMasterPrimaryKey(Storable reference, S master) {
+ public void copyToMasterPrimaryKey(Storable reference, S master) throws FetchException {
try {
mCopyToMasterPkMethod.invoke(reference, master);
} catch (Exception e) {
- ThrowUnchecked.fireFirstDeclaredCause(e);
+ ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
}
}
@@ -124,11 +125,11 @@ public class SyntheticStorableReferenceAccess<S extends Storable> { * @param reference reference whose properties will be set
* @param master source of property values
*/
- public void copyFromMaster(Storable reference, S master) {
+ public void copyFromMaster(Storable reference, S master) throws FetchException {
try {
mCopyFromMasterMethod.invoke(reference, master);
} catch (Exception e) {
- ThrowUnchecked.fireFirstDeclaredCause(e);
+ ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
}
}
@@ -140,11 +141,11 @@ public class SyntheticStorableReferenceAccess<S extends Storable> { * @param reference reference whose properties will be tested
* @param master source of property values
*/
- public boolean isConsistent(Storable reference, S master) {
+ public boolean isConsistent(Storable reference, S master) throws FetchException {
try {
return (Boolean) mIsConsistentMethod.invoke(reference, master);
} catch (Exception e) {
- ThrowUnchecked.fireFirstDeclaredCause(e);
+ ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
// Not reached.
return false;
}
diff --git a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java index a06c557..75f1701 100644 --- a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java +++ b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java @@ -26,6 +26,7 @@ import java.util.LinkedHashSet; import java.util.List;
import java.util.Set;
+import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.SupportException;
import com.amazon.carbonado.info.Direction;
@@ -350,7 +351,7 @@ public class SyntheticStorableReferenceBuilder<S extends Storable> * @deprecated call getReferenceAccess
*/
@Deprecated
- public void copyToMasterPrimaryKey(Storable indexEntry, S master) {
+ public void copyToMasterPrimaryKey(Storable indexEntry, S master) throws FetchException {
getReferenceAccess().copyToMasterPrimaryKey(indexEntry, master);
}
@@ -363,7 +364,7 @@ public class SyntheticStorableReferenceBuilder<S extends Storable> * @deprecated call getReferenceAccess
*/
@Deprecated
- public void copyFromMaster(Storable indexEntry, S master) {
+ public void copyFromMaster(Storable indexEntry, S master) throws FetchException {
getReferenceAccess().copyFromMaster(indexEntry, master);
}
@@ -379,7 +380,7 @@ public class SyntheticStorableReferenceBuilder<S extends Storable> * @deprecated call getReferenceAccess
*/
@Deprecated
- public boolean isConsistent(Storable indexEntry, S master) {
+ public boolean isConsistent(Storable indexEntry, S master) throws FetchException {
return getReferenceAccess().isConsistent(indexEntry, master);
}
|