code: public String getContactTypeFromID(String strContactTypeID)
      {
          if (Utility.isNumeric(strContactTypeID))
          {
              int iOldKeyArea = this.getDefaultOrder();
              this.setKeyArea(ContactType.ID_KEY);
              this.getCounterField().setString(strContactTypeID);
              try   {
                  if (this.seek(null))
                      strContactTypeID = this.getField(ContactType.CODE).toString();
              } catch (DBException ex)    {
                  ex.printStackTrace();
              } finally {
                  this.setKeyArea(iOldKeyArea);
              }
          }  
          return strContactTypeID;
      }
docs: GetContactTypeFromID Method.