Commit 8cfa8b19 by Kunj Gupta

Changed Comments string.

parent c313256c
...@@ -105,7 +105,7 @@ public class CatalogueItemManager implements DBConstants { ...@@ -105,7 +105,7 @@ public class CatalogueItemManager implements DBConstants {
} }
} }
/*Check this catalogue is exist in local DB or not /*Check this catalogueItem is exist in local DB or not
* If doesn't exist in local, save it * If doesn't exist in local, save it
* If exist in local, update the local item with data from server item. * If exist in local, update the local item with data from server item.
* */ * */
...@@ -117,7 +117,7 @@ public class CatalogueItemManager implements DBConstants { ...@@ -117,7 +117,7 @@ public class CatalogueItemManager implements DBConstants {
catalogueItem.setCatalogueId(catalogueId); catalogueItem.setCatalogueId(catalogueId);
save(catalogueItem, DBConstants.SYNC_FLAG_NONE); save(catalogueItem, DBConstants.SYNC_FLAG_NONE);
} else { } else {
/*Update complete local Expense object with response Expense object*/ /*Update complete local CatalogueItem object with response CatalogueItem object*/
catalogueItem.setCatalogueId(catalogueId); catalogueItem.setCatalogueId(catalogueId);
catalogueItem.setId(localCatalogueItem.getId()); catalogueItem.setId(localCatalogueItem.getId());
update(catalogueItem, DBConstants.SYNC_FLAG_NONE); update(catalogueItem, DBConstants.SYNC_FLAG_NONE);
...@@ -125,7 +125,7 @@ public class CatalogueItemManager implements DBConstants { ...@@ -125,7 +125,7 @@ public class CatalogueItemManager implements DBConstants {
} }
} else { } else {
/*That means there is no CatalogueItem category in server response, then all local items should be deleted those are contain sys_id*/ /*That means there is no CatalogueItem category in server response, then all local items should be deleted those are contain sys_id*/
/*localCatalogueItemList is contain all local Catalogues */ /*localCatalogueItemList is contain all local CatalogueItems */
List<CatalogueItem> localCatalogueItemList = getAllCatalogueItems(catalogueId); List<CatalogueItem> localCatalogueItemList = getAllCatalogueItems(catalogueId);
if (localCatalogueItemList != null && !localCatalogueItemList.isEmpty()) { if (localCatalogueItemList != null && !localCatalogueItemList.isEmpty()) {
for (int i = 0; i < localCatalogueItemList.size(); i++) { for (int i = 0; i < localCatalogueItemList.size(); i++) {
......
...@@ -91,7 +91,7 @@ public class CatalogueVariableManager implements DBConstants { ...@@ -91,7 +91,7 @@ public class CatalogueVariableManager implements DBConstants {
public static void handleGetVariable(long catalogueItemId, List<CatalogueVariable> serverVariableList) { public static void handleGetVariable(long catalogueItemId, List<CatalogueVariable> serverVariableList) {
if(serverVariableList != null && !serverVariableList.isEmpty()) { if(serverVariableList != null && !serverVariableList.isEmpty()) {
/*variableSysIdMap contain all server response catalogues Sys Id*/ /*variableSysIdMap contain all server response catalogueVariable Sys Id*/
HashMap<String, Integer> variableSysIdMap = new HashMap<>(0); HashMap<String, Integer> variableSysIdMap = new HashMap<>(0);
Integer intObj = Integer.valueOf(1); Integer intObj = Integer.valueOf(1);
for (int i = 0; i < serverVariableList.size(); i++) { for (int i = 0; i < serverVariableList.size(); i++) {
...@@ -99,7 +99,7 @@ public class CatalogueVariableManager implements DBConstants { ...@@ -99,7 +99,7 @@ public class CatalogueVariableManager implements DBConstants {
variableSysIdMap.put(sysId, intObj); variableSysIdMap.put(sysId, intObj);
} }
/*localVariableList is contain all local Catalogues */ /*localVariableList is contain all local catalogueVariable */
List<CatalogueVariable> localVariableList = getAllVariable(catalogueItemId); List<CatalogueVariable> localVariableList = getAllVariable(catalogueItemId);
if (localVariableList != null && !localVariableList.isEmpty()) { if (localVariableList != null && !localVariableList.isEmpty()) {
for (int i = 0; i < localVariableList.size(); i++) { for (int i = 0; i < localVariableList.size(); i++) {
...@@ -136,7 +136,7 @@ public class CatalogueVariableManager implements DBConstants { ...@@ -136,7 +136,7 @@ public class CatalogueVariableManager implements DBConstants {
} }
} else { } else {
/*That means there is no CatalogueVariable in server response, then all local items should be deleted those are contain sys_id*/ /*That means there is no CatalogueVariable in server response, then all local items should be deleted those are contain sys_id*/
/*localVariableList is contain all local Catalogues */ /*localVariableList is contain all local catalogueVariables */
List<CatalogueVariable> localVariableList = getAllVariable(catalogueItemId); List<CatalogueVariable> localVariableList = getAllVariable(catalogueItemId);
if (localVariableList != null && !localVariableList.isEmpty()) { if (localVariableList != null && !localVariableList.isEmpty()) {
for (int i = 0; i < localVariableList.size(); i++) { for (int i = 0; i < localVariableList.size(); i++) {
......
...@@ -15,7 +15,7 @@ import java.util.List; ...@@ -15,7 +15,7 @@ import java.util.List;
/** /**
* *
* @author Kunj on 11-08-2016. * @author Kunj on 16-09-2016.
*/ */
public class MyIncidentsManager implements DBConstants { public class MyIncidentsManager implements DBConstants {
...@@ -77,7 +77,7 @@ public class MyIncidentsManager implements DBConstants { ...@@ -77,7 +77,7 @@ public class MyIncidentsManager implements DBConstants {
public static void handleGetIncident(List<Incident> serverIncidentList) { public static void handleGetIncident(List<Incident> serverIncidentList) {
if(serverIncidentList != null && !serverIncidentList.isEmpty()) { if(serverIncidentList != null && !serverIncidentList.isEmpty()) {
/*incidentSysIdMap contain all server response catalogues Sys Id*/ /*incidentSysIdMap contain all server response Incident Number*/
HashMap<String, Integer> incidentSysIdMap = new HashMap<>(0); HashMap<String, Integer> incidentSysIdMap = new HashMap<>(0);
Integer intObj = Integer.valueOf(1); Integer intObj = Integer.valueOf(1);
for (int i = 0; i < serverIncidentList.size(); i++) { for (int i = 0; i < serverIncidentList.size(); i++) {
...@@ -95,14 +95,14 @@ public class MyIncidentsManager implements DBConstants { ...@@ -95,14 +95,14 @@ public class MyIncidentsManager implements DBConstants {
if (localIncidentNumber != null if (localIncidentNumber != null
&& !localIncidentNumber.isEmpty() && !localIncidentNumber.isEmpty()
&& !incidentSysIdMap.containsKey(localIncidentNumber)) { && !incidentSysIdMap.containsKey(localIncidentNumber)) {
//Update sys_id with empty string because required to delete locally //Update number with empty string because required to delete locally
localIncident.setNumber(""); localIncident.setNumber("");
delete(localIncident); delete(localIncident);
} }
} }
} }
/*Check this catalogue is exist in local DB or not /*Check this Incident is exist in local DB or not
* If doesn't exist in local, save it * If doesn't exist in local, save it
* If exist in local, update the local item with data from server item. * If exist in local, update the local item with data from server item.
* */ * */
...@@ -113,14 +113,14 @@ public class MyIncidentsManager implements DBConstants { ...@@ -113,14 +113,14 @@ public class MyIncidentsManager implements DBConstants {
if (localIncident == null) { if (localIncident == null) {
save(incident, DBConstants.SYNC_FLAG_NONE); save(incident, DBConstants.SYNC_FLAG_NONE);
} else { } else {
/*Update complete local Catalogue object with response Catalogue object*/ /*Update complete local Incident object with response Incident object*/
incident.setId(localIncident.getId()); incident.setId(localIncident.getId());
update(incident, DBConstants.SYNC_FLAG_NONE); update(incident, DBConstants.SYNC_FLAG_NONE);
} }
} }
} else { } else {
/*That means there is no Incident in server response, then all local items should be deleted those are contain sys_id*/ /*That means there is no Incident in server response, then all local items should be deleted those are contain number*/
/*localIncidentList is contain all local Catalogues */ /*localIncidentList is contain all local Incident */
List<Incident> localIncidentList = getAllIncidents(); List<Incident> localIncidentList = getAllIncidents();
if (localIncidentList != null && !localIncidentList.isEmpty()) { if (localIncidentList != null && !localIncidentList.isEmpty()) {
for (int i = 0; i < localIncidentList.size(); i++) { for (int i = 0; i < localIncidentList.size(); i++) {
...@@ -129,7 +129,7 @@ public class MyIncidentsManager implements DBConstants { ...@@ -129,7 +129,7 @@ public class MyIncidentsManager implements DBConstants {
if (localIncidentNumber != null if (localIncidentNumber != null
&& !localIncidentNumber.isEmpty()) { && !localIncidentNumber.isEmpty()) {
//Update sys_id with empty string because required to delete locally //Update number with empty string because required to delete locally
localIncident.setNumber(""); localIncident.setNumber("");
delete(localIncident); delete(localIncident);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment