Skip to content

Commit

Permalink
Added @OverRide
Browse files Browse the repository at this point in the history
  • Loading branch information
Gray Watson committed May 31, 2016
1 parent c22c4d7 commit ded9c2d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/com/j256/ormlite/examples/spring/SomeClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class SomeClass implements InitializingBean {
* After this class is configured by Spring, this method is called by Spring after configuration. It is just here as
* an example.
*/
@Override
public void afterPropertiesSet() throws Exception {

// create an instance of Account
Expand All @@ -52,6 +53,7 @@ public void afterPropertiesSet() throws Exception {
try {
// try something in a transaction
transactionManager.callInTransaction(new Callable<Void>() {
@Override
public Void call() throws Exception {
// we do the delete
assertEquals(1, accountDao.delete(account));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void testTransactionWithinTransaction() throws Exception {
final TransactionManager mgr = new TransactionManager(connectionSource);
final Dao<Foo, Integer> fooDao = createDao(Foo.class, true);
mgr.callInTransaction(new Callable<Void>() {
@Override
public Void call() throws Exception {
testTransactionManager(mgr, null, fooDao, true);
return null;
Expand All @@ -94,6 +95,7 @@ public void testTransactionWithinTransactionThrows() throws Exception {
assertNotNull(fooDao.queryForId(outerFoo.id));
assertEquals(1, fooDao.queryForAll().size());
mgr.callInTransaction(new Callable<Void>() {
@Override
public Void call() throws Exception {
assertEquals(1, fooDao.delete(outerFoo));
assertNull(fooDao.queryForId(outerFoo.id));
Expand Down Expand Up @@ -124,6 +126,7 @@ public void testNestedTransactionsNotSupported() throws Exception {
assertNotNull(fooDao.queryForId(outerFoo.id));
assertEquals(1, fooDao.queryForAll().size());
mgr.callInTransaction(new Callable<Void>() {
@Override
public Void call() throws Exception {
assertEquals(1, fooDao.delete(outerFoo));
assertNull(fooDao.queryForId(outerFoo.id));
Expand All @@ -150,6 +153,7 @@ public void testAutoCommitOff() throws Exception {
try {
dao.setAutoCommit(conn, false);
TransactionManager.callInTransaction(connectionSource, new Callable<Void>() {
@Override
public Void call() throws Exception {
assertEquals(1, dao.create(foo));
return null;
Expand All @@ -176,6 +180,7 @@ protected void testTransactionManager(TransactionManager mgr, final Exception ex
try {
final int val = 13431231;
int returned = mgr.callInTransaction(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
// we delete it inside a transaction
assertEquals(1, fooDao.delete(foo1));
Expand Down
1 change: 1 addition & 0 deletions src/test/java/com/j256/ormlite/perf/BatchOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public void testMassCreates() throws Exception {
final Dao<GenIdFoo, Integer> fooDao = createDao(GenIdFoo.class, true);
final List<Integer> fooIdList = new ArrayList<Integer>();
fooDao.callBatchTasks(new Callable<Void>() {
@Override
public Void call() throws Exception {
for (int i = 0; i < 10000; i++) {
GenIdFoo foo = new GenIdFoo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ private void doTest(ConnectionSource cs) throws Exception {
for (int i = 0; i < numThreads; i++) {
final int num = i;
futures[i] = pool.submit(new Runnable() {
@Override
public void run() {
arg.setValue(num);
// try N queries each looking for this thread's val field
Expand Down

0 comments on commit ded9c2d

Please sign in to comment.