private void deleteAds() { if (_ads != null && _ads.getId() > 0) { AdsIntf adsBc = AdsImpl.getInstance(); adsBc.deleteAds(_ads); } setAdsNameList(); }
private Ads persistAds(String valueAdsId) { AdsIntf adsBc = AdsImpl.getInstance(); Ads ads = null; ads = adsBc.getAdsById(Integer.parseInt(valueAdsId)); if (ads != null) { this._ads = ads; } return _ads; }
private List<Ads> loadAds() { List<Ads> adsList; AdsIntf adsBc = AdsImpl.getInstance(); adsList = new ArrayList<Ads>(); adsList = adsBc.getAdsList(); if (adsList != null && !adsList.isEmpty()) { return adsList; } return null; }
private void saveUpdateAds(Ads ads) { setAllFildsToAds(); AdsIntf adsBc = AdsImpl.getInstance(); if (ads != null && ads.getId() <= 0) { adsBc.saveAds(_ads); } else { adsBc.updateAds(_ads); } setAdsNameList(); }