parameters: (self, search_type, code, project_code=None,
                           column='code')
return_statement: return search_key
docstring: API Function: build_search_key(search_type, code, project_code=None, column='code')
          Convenience method to build a search key from its components.  A
          search_key uniquely indentifies a specific sobject.  This string
          that is returned is heavily used as an argument in the API to
          identify an sobject to operate one
          
          A search key has the form: "prod/shot?project=bar&code=XG001"
          where search_type = "prod/shot", project_code = "bar" and code = "XG001"
  
          @param:
          search_type - the unique identifier of a search type: ie prod/asset
          code - the unique code of the sobject
  
          @keyparam:
          project_code - an optional project code.  If this is not
              included, the project from get_ticket() is added.
  
          @return:
          string - search key 
  
          @example:
          [code]
          search_type = "prod/asset"
          code = "chr001"
          search_key = server.build_search_key(search_type, code)
          e.g. search_key = prod/asset?project=code=chr001
          [/code]
  
          [code]
          search_type = "sthpw/login"
          code = "admin"
          search_key = server.build_search_key(search_type, code, column='code')
          e.g. search_key = sthpw/login?code=admin
          [/code]
docstring_summary: API Function: build_search_key(search_type, code, project_code=None, column='code')
          Convenience method to build a search key from its components.  A
          search_key uniquely indentifies a specific sobject.  This string
          that is returned is heavily used as an argument in the API to
          identify an sobject to operate one
          
          A search key has the form: "prod/shot?project=bar&code=XG001"
          where search_type = "prod/shot", project_code = "bar" and code = "XG001"
docstring_tokens: API Function : build_search_key ( search_type code project_code = None column = code ) Convenience method to build a search key from its components . A search_key uniquely indentifies a specific sobject . This string that is returned is heavily used as an argument in the API to identify an sobject to operate one A search key has the form : prod / shot?project = bar&code = XG001 where search_type = prod / shot project_code = bar and code = XG001
function: def build_search_key(self, search_type, code, project_code=None,
                           column='code'):
          '''API Function: build_search_key(search_type, code, project_code=None, column='code')
          Convenience method to build a search key from its components.  A
          search_key uniquely indentifies a specific sobject.  This string
          that is returned is heavily used as an argument in the API to
          identify an sobject to operate one
          
          A search key has the form: "prod/shot?project=bar&code=XG001"
          where search_type = "prod/shot", project_code = "bar" and code = "XG001"
  
          @param:
          search_type - the unique identifier of a search type: ie prod/asset
          code - the unique code of the sobject
  
          @keyparam:
          project_code - an optional project code.  If this is not
              included, the project from get_ticket() is added.
  
          @return:
          string - search key 
  
          @example:
          [code]
          search_type = "prod/asset"
          code = "chr001"
          search_key = server.build_search_key(search_type, code)
          e.g. search_key = prod/asset?project=code=chr001
          [/code]
  
          [code]
          search_type = "sthpw/login"
          code = "admin"
          search_key = server.build_search_key(search_type, code, column='code')
          e.g. search_key = sthpw/login?code=admin
          [/code]
  
          '''
          if not project_code:
              if not search_type.startswith("sthpw/"):
                  project_code = self.project_code
                  assert project_code
          
          if search_type.find('?') == -1:
              if search_type.startswith('sthpw/'):
                  search_key = "%s?%s=%s" %(search_type, column, code)
              else:
                  search_key = "%s?project=%s&%s=%s" % (search_type, project_code,
                                                        column, code)
          else:
              search_key = "%s&%s=%s" %(search_type, column, code)
  
          return search_key
function_tokens: def build_search_key ( self , search_type , code , project_code = None , column = 'code' ) : if not project_code : if not search_type . startswith ( "sthpw/" ) : project_code = self . project_code assert project_code if search_type . find ( '?' ) == - 1 : if search_type . startswith ( 'sthpw/' ) : search_key = "%s?%s=%s" % ( search_type , column , code ) else : search_key = "%s?project=%s&%s=%s" % ( search_type , project_code , column , code ) else : search_key = "%s&%s=%s" % ( search_type , column , code ) return search_key