/**
   * @param le
   * @param sequence
   * @return
   * @throws LdapException
   */
  private Group unloadLdapEntry(Entry le, long sequence) throws LdapInvalidAttributeValueException {
    Group entity = new ObjectFactory().createGroup();
    entity.setName(getAttribute(le, SchemaConstants.CN_AT));
    entity.setDescription(getAttribute(le, SchemaConstants.DESCRIPTION_AT));
    String typeAsString = getAttribute(le, GlobalIds.TYPE);
    if (StringUtils.isNotEmpty(typeAsString)) {
      entity.setType(Group.Type.valueOf(typeAsString.toUpperCase()));
    }
    entity.setProtocol(getAttribute(le, GROUP_PROTOCOL_ATTR_IMPL));
    entity.setMembers(getAttributes(le, SchemaConstants.MEMBER_AT));
    entity.setMemberDn(true);
    entity.setProperties(PropUtil.getProperties(getAttributes(le, GROUP_PROPERTY_ATTR_IMPL), '='));
    entity.setSequenceId(sequence);

    return entity;
  }