/** Check that a transaction is a valid GAE transaction this DAO can use. */
protected static GaeDaoTransaction checkTransactionType(IDaoTransaction transaction) {
if (transaction == null) {
throw new NullPointerException("transaction");
} else if (!(transaction instanceof GaeDaoTransaction)) {
throw new DaoException("A transaction of type GaeDaoTransaction is required, got " + transaction.getClass().getName());
} else {
return (GaeDaoTransaction) transaction;
}
}