Commit 5e54d0f4 authored by smestry's avatar smestry

Update class file for checknull and trim method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102913 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ab76ebe0
......@@ -291,7 +291,7 @@ public class ItmAttribValIC extends ValidatorEJB implements ItmAttribValICRemote
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
E12GenericUtility genericUtility = new E12GenericUtility();
descr = checkNull(genericUtility.getColumnValue("descr", dom));
descr = checkNull(genericUtility.getColumnValue("descr", dom)); // Sneha
//Changed by Jagruti on 24/12/2015 for short descr[Start].
shortDescr = checkNull(genericUtility.getColumnValue("sh_descr", dom));
//Changed by Jagruti on 24/12/2015 for short descr[End].
......@@ -324,7 +324,10 @@ public class ItmAttribValIC extends ValidatorEJB implements ItmAttribValICRemote
}
else
{
String itemCode = checkNull(genericUtility.getColumnValue("attrib_code", dom));
//String itemCode = checkNull(genericUtility.getColumnValue("attrib_code", dom));
String itemCode = checkNullAndTrim(genericUtility.getColumnValue("attrib_code", dom)); // Changed by Sneha on 09-08-2016
//System.out.println("itemCode===>>["+itemCode+"]");
query =" SELECT count(1) FROM item_attribute WHERE attrib_code=? " ;
pstmt = conn.prepareStatement(query);
pstmt.setString(1, itemCode);
......@@ -352,8 +355,13 @@ public class ItmAttribValIC extends ValidatorEJB implements ItmAttribValICRemote
}
else
{
attribCode = checkNull(genericUtility.getColumnValue("attrib_code", dom));
attribId = checkNull(genericUtility.getColumnValue("attrib_id", dom));
// Changed by Sneha on 09-08-2016, to trim the value [Start]
//attribCode = checkNull(genericUtility.getColumnValue("attrib_code", dom));
//attribId = checkNull(genericUtility.getColumnValue("attrib_id", dom));
attribCode = checkNullAndTrim(genericUtility.getColumnValue("attrib_code", dom));
attribId = checkNullAndTrim(genericUtility.getColumnValue("attrib_id", dom));
//System.out.println("attribCode inside attrib_id ===>["+attribCode+"] attribId===>>"+attribId+"]");
// Changed by Sneha on 09-08-2016, to trim the value [End]
query = "select attrib_id from itm_attrib_val where attrib_id = ? and attrib_code='SIZE_TYPE' ";
pstmt= conn.prepareStatement(query);
......@@ -419,9 +427,14 @@ public class ItmAttribValIC extends ValidatorEJB implements ItmAttribValICRemote
}
break;
}
attribCode = checkNull(genericUtility.getColumnValue("attrib_code", dom));
attribId = checkNull(genericUtility.getColumnValue("attrib_id", dom));
// Changed by Sneha on 09-08-2016, to trim the value [Start]
//attribCode = checkNull(genericUtility.getColumnValue("attrib_code", dom));
//attribId = checkNull(genericUtility.getColumnValue("attrib_id", dom));
attribCode = checkNullAndTrim(genericUtility.getColumnValue("attrib_code", dom));
attribId = checkNullAndTrim(genericUtility.getColumnValue("attrib_id", dom));
//System.out.println("attribCode outside ===>["+attribCode+"] attribId===>>"+attribId+"]");
// Changed by Sneha on 09-08-2016, to trim the value [End]
if(editFlag.equalsIgnoreCase("A"))
{
......@@ -582,4 +595,19 @@ public class ItmAttribValIC extends ValidatorEJB implements ItmAttribValICRemote
return null;
}
// Changed by Sneha on 09-08-2016 [Start]
private String checkNullAndTrim( String inputVal )
{
if ( inputVal == null )
{
inputVal = "";
}
else
{
inputVal = inputVal.trim();
}
return inputVal;
}
// Changed by Sneha on 09-08-2016 [End]
}
......@@ -149,9 +149,16 @@ public class ObjAttributeIC extends ValidatorEJB implements ObjAttributeICLocal,
}//END SWITCH
if(!"E".equalsIgnoreCase(editFlag))
{
objCode = checkNull(genericUtility.getColumnValue("obj_name", dom));
// Changed by Sneha on 09-08-2016, for trim [Start]
/*objCode = checkNull(genericUtility.getColumnValue("obj_name", dom));
itemVal = checkNull(genericUtility.getColumnValue("item_attr_val", dom));
languageVal = checkNull(genericUtility.getColumnValue("languages", dom));
languageVal = checkNull(genericUtility.getColumnValue("languages", dom));*/
objCode = checkNullAndTrim(genericUtility.getColumnValue("obj_name", dom));
itemVal = checkNullAndTrim(genericUtility.getColumnValue("item_attr_val", dom));
languageVal = checkNullAndTrim(genericUtility.getColumnValue("languages", dom));
//System.out.println("objCode==>>["+objCode+"] itemVal===>>["+itemVal+"] languageVal===>>["+languageVal+"]");
// Changed by Sneha on 09-08-2016, for trim [End]
sql =" SELECT count(1) FROM OBJ_ATTRIBUTE WHERE obj_name=? AND item_attr_val=? AND languages=?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, objCode);
......@@ -204,4 +211,19 @@ public class ObjAttributeIC extends ValidatorEJB implements ObjAttributeICLocal,
}
return input;
}
// Changed by Sneha on 09-08-2016 [Start]
private String checkNullAndTrim( String inputVal )
{
if ( inputVal == null )
{
inputVal = "";
}
else
{
inputVal = inputVal.trim();
}
return inputVal;
}
// Changed by Sneha on 09-08-2016 [End]
}
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 to comment