code: private RelationType getRelationType(int type)
     {
        RelationType result;
        if (type > 0 && type < RELATION_TYPES.length)
        {
           result = RELATION_TYPES[type];
        }
        else
        {
           result = RelationType.FINISH_START;
        }
        return result;
     }
docs: Convert an integer to a RelationType instance.
  
  @param type integer value
  @return RelationType instance