Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAO and UpdateTable #7

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

DAO and UpdateTable #7

wants to merge 24 commits into from

Conversation

curb47
Copy link
Contributor

@curb47 curb47 commented Sep 17, 2015

Added DAODataProvider and UpdateTable functionality

curb47 and others added 24 commits August 21, 2015 09:01
Conflicts:
	.gitignore
	pom.xml
	src/main/java/com/percero/agents/sync/access/RedisAccessManager.java
	src/main/java/com/percero/agents/sync/jobs/UpdateTablePoller.java
	src/main/java/com/percero/agents/sync/services/IDataProvider.java
	src/main/java/com/percero/agents/sync/services/RedisDataProvider.java
	src/main/java/com/percero/agents/sync/services/SyncAgentDataProvider.java
Conflicts:
	pom.xml
	src/main/java/com/convergys/pulse/service/PulseHttpAuthProvider.java
@curb47
Copy link
Contributor Author

curb47 commented Sep 17, 2015

@jonnysamps Can you code review this? It has both the DAODataProvider AND the UpdateTable stuff. I had to merge the two together since changes to the SyncAgentDataProvider I was doing for DAODataProvider had an impact on UpdateTable.

// from the class access journal set
for(String caj : clientAccessJournals){
if(cacheDataStore.getSetIsEmpty(RedisKeyUtils.ACCESS_JOURNAL_PREFIX+caj)){
String[] parts = caj.split(":");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do this kind of thing a lot, you should probably refactor that into a helper method. Add it to the ClassIDPair class like

public static ClassIDPair fromCacheKey(String cacheKey){
  String[] parts = cacheKey.split(":");
  className = parts[0];
  ID = parts[1];
}

}

@SuppressWarnings({ "unchecked" })
private static Map<String, IDataAccessObject<? extends IPerceroObject>> dataAccessObjects = Collections.synchronizedMap(new HashMap<String, IDataAccessObject<? extends IPerceroObject>>());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this class is singleton you shouldn't use static members. It's redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turning this into a spring component

@jonnysamps jonnysamps assigned curb47 and unassigned jonnysamps Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants