class MongoDbOAuthTokenInfoRepository implements OAuthTokenInfoRepository {

    @Override
    public OAuthTokenInfo findOAuthTokenInfo(String userId, String appUrl, String moduleId, String tokenName, String serviceName) {
        return template.findOne(
                query(where("userId").is(userId)
                .andOperator(where("appUrl").is(appUrl))
                .andOperator(where("moduleId").is(moduleId))
                .andOperator(where("tokenName").is(tokenName))
                .andOperator(where("serviceName").is(serviceName))
        ), CLASS, OAUTH_TOKEN_COLLECTION);
    }

}