added interface override annotations.
This commit is contained in:
parent
fc4c568b18
commit
5bbd8e4ef3
189 changed files with 1458 additions and 319 deletions
|
|
@ -49,6 +49,7 @@ public class MongodbConnectionProviderImpl implements MongodbConnectionProvider
|
|||
protected static Mongo mongo = null;
|
||||
protected static DB db = null;
|
||||
|
||||
@Override
|
||||
public DB getMongodbConnection() {
|
||||
if (db!=null) {
|
||||
return db;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public class MongodbVascBackend extends AbstractVascBackend<BasicDBObject> {
|
|||
return query;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VascBackendResult<BasicDBObject> execute(VascBackendState state) throws VascBackendException {
|
||||
DBCollection coll = getDBCollection();
|
||||
DBObject query = createFilterQuery(state);
|
||||
|
|
@ -122,11 +123,13 @@ public class MongodbVascBackend extends AbstractVascBackend<BasicDBObject> {
|
|||
return new DefaultVascBackendResult<BasicDBObject>(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(BasicDBObject object) throws VascBackendException {
|
||||
DBCollection coll = getDBCollection();
|
||||
coll.insert(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BasicDBObject merge(BasicDBObject row) throws VascBackendException {
|
||||
DBCollection coll = getDBCollection();
|
||||
DBObject query = new BasicDBObject();
|
||||
|
|
@ -136,6 +139,7 @@ public class MongodbVascBackend extends AbstractVascBackend<BasicDBObject> {
|
|||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(BasicDBObject object) throws VascBackendException {
|
||||
DBCollection coll = getDBCollection();
|
||||
DBObject query = new BasicDBObject();
|
||||
|
|
@ -143,10 +147,12 @@ public class MongodbVascBackend extends AbstractVascBackend<BasicDBObject> {
|
|||
coll.remove(query); // remove by _id
|
||||
}
|
||||
|
||||
@Override
|
||||
public MongodbVascEntryFieldValue provideVascEntryFieldValue() {
|
||||
return new MongodbVascEntryFieldValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VascEntryRecordCreator<BasicDBObject> provideVascEntryRecordCreator() {
|
||||
return new MongodbVascEntryRecordCreator();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,15 +39,18 @@ public class MongodbVascEntryFieldValue implements VascEntryFieldValue<BasicDBOb
|
|||
|
||||
private static final long serialVersionUID = -7371273796529818557L;
|
||||
|
||||
@Override
|
||||
public Serializable getValue(String backendName, BasicDBObject row) throws VascBackendException {
|
||||
Serializable data = (Serializable) row.get(backendName);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayValue(String field, BasicDBObject row) throws VascBackendException {
|
||||
return ""+getValue(field,row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(String backendName, BasicDBObject row, Serializable value) throws VascBackendException {
|
||||
row.put(backendName, value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public class MongodbVascEntryRecordCreator implements VascEntryRecordCreator<Bas
|
|||
|
||||
private static final long serialVersionUID = -9213830731796787384L;
|
||||
|
||||
@Override
|
||||
public BasicDBObject newRecord() throws VascBackendException {
|
||||
return new BasicDBObject();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue