code: public String getIdentifier(String propertyId, int orderNum) throws VCASException
     {
        try
        {
           Connection con = dataSource.getConnection();
           ResultSet rs = null;
           PreparedStatement ps = null;
           try
           {
              ps = con.prepareStatement(sqlSelectRecord);
              ps.setString(1, propertyId);
              ps.setInt(2, orderNum);
              rs = ps.executeQuery();
  
              if (rs.next())
              {
                 return rs.getString("CAS_ID");
              }
              else
              {
                 throw new RecordNotFoundException("No record found with propertyId=" + propertyId + " orderNum="
                    + orderNum);
              }
           }
           finally
           {
              if (rs != null)
              {
                 try
                 {
                    rs.close();
                 }
                 catch (SQLException e)
                 {
                    LOG.error("Can't close the ResultSet: " + e.getMessage());
                 }
              }
  
              if (ps != null)
              {
                 try
                 {
                    ps.close();
                 }
                 catch (SQLException e)
                 {
                    LOG.error("Can't close the Statement: " + e.getMessage());
                 }
              }
  
              con.close();
           }
        }
        catch (SQLException e)
        {
           throw new VCASException("VCAS GET ID database error: " + e, e);
        }
     }
docs: {@inheritDoc}