code: protected <T> String getGroupType(T obj, String type, String name, Connection c) throws CpoException {
      String retType = type;
      long objCount;
  
      if (JdbcCpoAdapter.PERSIST_GROUP.equals(retType)) {
        objCount = existsObject(name, obj, c, null);
  
        if (objCount == 0) {
          retType = JdbcCpoAdapter.CREATE_GROUP;
        } else if (objCount == 1) {
          retType = JdbcCpoAdapter.UPDATE_GROUP;
        } else {
          throw new CpoException("Persist can only UPDATE one record. Your EXISTS function returned 2 or more.");
        }
      }
  
      return retType;
    }
docs: DOCUMENT ME!
  
  @param obj  DOCUMENT ME!
  @param type DOCUMENT ME!
  @param name DOCUMENT ME!
  @param c    DOCUMENT ME!
  @return DOCUMENT ME!
  @throws CpoException DOCUMENT ME!