@Override
 public void delete(String systemCode) {
   PtBaseDAO dao = new PtBaseDAO();
   try {
     dao.deleteByClause(PtSsopropVO.class, " systemcode = '" + systemCode + "'");
   } catch (DAOException e) {
     LfwLogger.error(e.getMessage(), e);
   }
   PortalCacheManager.notify(
       CacheKeys.PORTAL_SSO_PROVIDER_CACHE, CacheKeys.PORTAL_SSO_PROVIDER_MAP_CACHE);
 }
 @Override
 public void update(PtSsopropVO ssoProp) {
   PtBaseDAO dao = new PtBaseDAO();
   try {
     dao.updateVO(ssoProp);
   } catch (DAOException e) {
     LfwLogger.error(e.getMessage(), e);
   }
   PortalCacheManager.notify(
       CacheKeys.PORTAL_SSO_PROVIDER_CACHE, CacheKeys.PORTAL_SSO_PROVIDER_MAP_CACHE);
 }
 @Override
 public void add(SSOProviderVO provider) {
   PtBaseDAO dao = new PtBaseDAO();
   PtSsopropVO vo = SSOUtil.provider2prop(provider);
   try {
     dao.insertVO(vo);
   } catch (DAOException e) {
     LfwLogger.error(e.getMessage(), e);
   }
   PortalCacheManager.notify(
       CacheKeys.PORTAL_SSO_PROVIDER_CACHE, CacheKeys.PORTAL_SSO_PROVIDER_MAP_CACHE);
 }
  @SuppressWarnings("unchecked")
  @Override
  public void update(SSOProviderVO provider) {
    PtBaseDAO dao = new PtBaseDAO();
    try {
      List<PtSsopropVO> vos =
          (List<PtSsopropVO>)
              dao.retrieveByClause(
                  PtSsopropVO.class, " systemcode = '" + provider.getSystemCode() + "'");
      if (vos == null || vos.isEmpty()) {
        add(provider);
      } else {
        PtSsopropVO vo = SSOUtil.provider2prop(provider);
        vo.setPk_ssoprop(vos.get(0).getPk_ssoprop());
        dao.updateVO(vo);
      }

    } catch (Exception e) {
      LfwLogger.error(e.getMessage(), e);
    }
    PortalCacheManager.notify(
        CacheKeys.PORTAL_SSO_PROVIDER_CACHE, CacheKeys.PORTAL_SSO_PROVIDER_MAP_CACHE);
  }