Note on writing another DAO - aegif/NemakiWare GitHub Wiki
You can add easily another database as a background for NemakiWare.
-
Replace
jp.aegif.nemaki.service.dao.impl.CouchContentDaoServiceImpl/CouchPrincipalDaoServiceImpl.
ContentDaoServiceImpl/PrincipalDaoServiceImplimplement the caching mechanism and callCouchContentDaoServiceImpl/CouchPrincipalDaoServiceImplasnonCachedContentDaoService/nonCachedPrincipalDaoService. -
DAO service classes should implement
ContentDaoService/PrincipalDaoServiceinterface. -
Spring configuration
context.backendin property files: Overwrite it by the new Spring context file you defined.
Your new Spring context file: Define the classes as couchContext.xml. -
Methods in you DAO should return null(or empty list) when they have any error or no result.
In the higher layer, the result is checked by CollectionUtils.isEmpty.