Commit 5e3e7a2a authored by pchavan's avatar pchavan

add guid validation for maintain unique.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195911 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1279aa97
......@@ -228,6 +228,47 @@ conn = getConnection();
}
}
//Added By PriyankaC on 18JAN2019.
if (childNodeName.equalsIgnoreCase("guid"))
{
guid =this.genericUtility.getColumnValue("guid", dom);
System.out.println("GUID number : " +guid);
if (guid != null || guid.trim().length() >= 0)
{
System.out.println("GUID : " +guid);
sql = "select count(*) from receipt where guid = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, guid);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt(1);
}
if (cnt > 0)
{
System.out.println("GUID ERROR MSG : " );
errCode = "VMDUPL1 ";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
else
{
}
}
//Added By PriyankaC on 18JAN2019.
else if (childNodeName.equalsIgnoreCase("tran_type"))
{
tranType=this.genericUtility.getColumnValue("tran_type", dom);
......
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