private Url getNewUrl(int i) { String targetUrl = "http://sdfsdfsd.sdfdsf/" + String.valueOf(i % 33); List<?> l = find(UrlDb.FINDBY_URL, new String[] { UrlDb.PARAM_URL }, new Object[] { targetUrl }); if (l.isEmpty()) { Url url = new UrlDb(); url.setValue(targetUrl); url.setLinkText("LinkText"); url.setType("URL"); return url; } else { return (Url) l.get(0); } }
public void setProfileUrl(String profileUrl) { Url url = getListFieldWithType(PROFILE_URL_TYPE, getUrls()); if (url != null) { url.setValue(profileUrl); } else { if (profileUrl != null) setUrls(addListField(new UrlImpl(profileUrl, null, PROFILE_URL_TYPE), getUrls())); } }
public void setProfileUrl(String profileUrl) { Url url = getListFieldWithType(PROFILE_URL_TYPE, getUrls()); if (url != null) { url.setValue(profileUrl); } else { if (profileUrl != null) setUrls(addListField(new UrlImpl(profileUrl, null, PROFILE_URL_TYPE), getUrls())); } }
public void setProfileUrl(String profileUrl) { Url url = getListFieldWithType(PROFILE_URL_TYPE, getUrls()); if (url != null) { url.setValue(profileUrl); } else { if (profileUrl != null) setUrls(addListField(new UrlImpl(profileUrl, null, PROFILE_URL_TYPE), getUrls())); } }
private Url buildUrl(String targetUrl, String linkTest, String type) { Url url = new UrlDb(); url.setValue(targetUrl); url.setLinkText(linkTest); url.setType(type); return url; }