changed to source 1.5; removed overrides on interface methods
This commit is contained in:
@@ -212,8 +212,8 @@
|
|||||||
<artifactId>spring-data-commons-aspects</artifactId>
|
<artifactId>spring-data-commons-aspects</artifactId>
|
||||||
</aspectLibrary> -->
|
</aspectLibrary> -->
|
||||||
</aspectLibraries>
|
</aspectLibraries>
|
||||||
<source>1.6</source>
|
<source>1.5</source>
|
||||||
<target>1.6</target>
|
<target>1.5</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|||||||
@@ -23,14 +23,12 @@ public class DocumentBackedTransactionSynchronization implements TransactionSync
|
|||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterCommit() {
|
public void afterCommit() {
|
||||||
log.debug("After Commit called for " + entity);
|
log.debug("After Commit called for " + entity);
|
||||||
changeSetPersister.persistState(entity, entity.getChangeSet());
|
changeSetPersister.persistState(entity, entity.getChangeSet());
|
||||||
changeSetTxStatus = 0;
|
changeSetTxStatus = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterCompletion(int status) {
|
public void afterCompletion(int status) {
|
||||||
log.debug("After Completion called with status = " + status);
|
log.debug("After Completion called with status = " + status);
|
||||||
if (changeSetTxStatus == 0) {
|
if (changeSetTxStatus == 0) {
|
||||||
@@ -45,24 +43,19 @@ public class DocumentBackedTransactionSynchronization implements TransactionSync
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void beforeCommit(boolean readOnly) {
|
public void beforeCommit(boolean readOnly) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void beforeCompletion() {
|
public void beforeCompletion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void flush() {
|
public void flush() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resume() {
|
public void resume() {
|
||||||
throw new IllegalStateException("ChangedSetBackedTransactionSynchronization does not support transaction suspension currently.");
|
throw new IllegalStateException("ChangedSetBackedTransactionSynchronization does not support transaction suspension currently.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void suspend() {
|
public void suspend() {
|
||||||
throw new IllegalStateException("ChangedSetBackedTransactionSynchronization does not support transaction suspension currently.");
|
throw new IllegalStateException("ChangedSetBackedTransactionSynchronization does not support transaction suspension currently.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getPersistentState(Class<? extends ChangeSetBacked> entityClass,
|
public void getPersistentState(Class<? extends ChangeSetBacked> entityClass,
|
||||||
Object id, final ChangeSet changeSet)
|
Object id, final ChangeSet changeSet)
|
||||||
throws DataAccessException, NotFoundException {
|
throws DataAccessException, NotFoundException {
|
||||||
@@ -62,7 +61,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
log.debug("Loading MongoDB data for " + dbk);
|
log.debug("Loading MongoDB data for " + dbk);
|
||||||
}
|
}
|
||||||
mongoTemplate.execute(collName, new CollectionCallback<Object>() {
|
mongoTemplate.execute(collName, new CollectionCallback<Object>() {
|
||||||
@Override
|
|
||||||
public Object doInCollection(DBCollection collection)
|
public Object doInCollection(DBCollection collection)
|
||||||
throws MongoException, DataAccessException {
|
throws MongoException, DataAccessException {
|
||||||
for (DBObject dbo : collection.find(dbk)) {
|
for (DBObject dbo : collection.find(dbk)) {
|
||||||
@@ -90,7 +88,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getPersistentId(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
|
public Object getPersistentId(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
|
||||||
log.debug("getPersistentId called on " + entity);
|
log.debug("getPersistentId called on " + entity);
|
||||||
if (entityManagerFactory == null) {
|
if (entityManagerFactory == null) {
|
||||||
@@ -100,7 +97,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object persistState(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
|
public Object persistState(ChangeSetBacked entity, ChangeSet cs) throws DataAccessException {
|
||||||
if (cs == null) {
|
if (cs == null) {
|
||||||
log.debug("Flush: changeset was null, nothing to flush.");
|
log.debug("Flush: changeset was null, nothing to flush.");
|
||||||
@@ -125,7 +121,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
dbQuery.put(ENTITY_FIELD_NAME, key);
|
dbQuery.put(ENTITY_FIELD_NAME, key);
|
||||||
DBObject dbId = mongoTemplate.execute(collName,
|
DBObject dbId = mongoTemplate.execute(collName,
|
||||||
new CollectionCallback<DBObject>() {
|
new CollectionCallback<DBObject>() {
|
||||||
@Override
|
|
||||||
public DBObject doInCollection(DBCollection collection)
|
public DBObject doInCollection(DBCollection collection)
|
||||||
throws MongoException, DataAccessException {
|
throws MongoException, DataAccessException {
|
||||||
return collection.findOne(dbQuery);
|
return collection.findOne(dbQuery);
|
||||||
@@ -136,7 +131,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
log.debug("Flush: removing: " + dbQuery);
|
log.debug("Flush: removing: " + dbQuery);
|
||||||
}
|
}
|
||||||
mongoTemplate.execute(collName, new CollectionCallback<Object>() {
|
mongoTemplate.execute(collName, new CollectionCallback<Object>() {
|
||||||
@Override
|
|
||||||
public Object doInCollection(DBCollection collection)
|
public Object doInCollection(DBCollection collection)
|
||||||
throws MongoException, DataAccessException {
|
throws MongoException, DataAccessException {
|
||||||
collection.remove(dbQuery);
|
collection.remove(dbQuery);
|
||||||
@@ -156,7 +150,6 @@ public class MongoChangeSetPersister implements ChangeSetPersister<Object> {
|
|||||||
dbDoc.put("_id", dbId.get("_id"));
|
dbDoc.put("_id", dbId.get("_id"));
|
||||||
}
|
}
|
||||||
mongoTemplate.execute(collName, new CollectionCallback<Object>() {
|
mongoTemplate.execute(collName, new CollectionCallback<Object>() {
|
||||||
@Override
|
|
||||||
public Object doInCollection(DBCollection collection)
|
public Object doInCollection(DBCollection collection)
|
||||||
throws MongoException, DataAccessException {
|
throws MongoException, DataAccessException {
|
||||||
collection.save(dbDoc);
|
collection.save(dbDoc);
|
||||||
|
|||||||
Reference in New Issue
Block a user