forked from Archives/Athou_commafeed
removed unused urlHash field
This commit is contained in:
@@ -72,15 +72,10 @@ public class FeedDAO extends GenericDAO<Feed> {
|
||||
}
|
||||
|
||||
public Feed findByUrl(String url) {
|
||||
List<Feed> feeds = findByField(Feed_.urlHash, DigestUtils.sha1Hex(url));
|
||||
Feed feed = Iterables.getFirst(feeds, null);
|
||||
if (feed != null && StringUtils.equals(url, feed.getUrl())) {
|
||||
return feed;
|
||||
}
|
||||
|
||||
String normalized = FeedUtils.normalizeURL(url);
|
||||
feeds = findByField(Feed_.normalizedUrlHash, DigestUtils.sha1Hex(normalized));
|
||||
feed = Iterables.getFirst(feeds, null);
|
||||
List<Feed> feeds = findByField(Feed_.normalizedUrlHash, DigestUtils.sha1Hex(normalized));
|
||||
Feed feed = Iterables.getFirst(feeds, null);
|
||||
if (feed != null && StringUtils.equals(normalized, feed.getNormalizedUrl())) {
|
||||
return feed;
|
||||
}
|
||||
|
||||
@@ -29,9 +29,6 @@ public class Feed extends AbstractModel {
|
||||
@Column(length = 2048, nullable = false)
|
||||
private String url;
|
||||
|
||||
@Column(length = 40, nullable = false)
|
||||
private String urlHash;
|
||||
|
||||
@Column(length = 2048, nullable = false)
|
||||
private String normalizedUrl;
|
||||
|
||||
@@ -199,14 +196,6 @@ public class Feed extends AbstractModel {
|
||||
this.disabledUntil = disabledUntil;
|
||||
}
|
||||
|
||||
public String getUrlHash() {
|
||||
return urlHash;
|
||||
}
|
||||
|
||||
public void setUrlHash(String urlHash) {
|
||||
this.urlHash = urlHash;
|
||||
}
|
||||
|
||||
public String getLastModifiedHeader() {
|
||||
return lastModifiedHeader;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public class FeedService {
|
||||
String normalized = FeedUtils.normalizeURL(url);
|
||||
feed = new Feed();
|
||||
feed.setUrl(url);
|
||||
feed.setUrlHash(DigestUtils.sha1Hex(url));
|
||||
feed.setNormalizedUrl(normalized);
|
||||
feed.setNormalizedUrlHash(DigestUtils.sha1Hex(normalized));
|
||||
feed.setDisabledUntil(new Date(0));
|
||||
|
||||
@@ -103,7 +103,13 @@
|
||||
|
||||
<changeSet author="athou" id="drop-last-update-success">
|
||||
<dropIndex tableName="FEEDS" indexName="disabled_lastupdated_index" />
|
||||
<dropIndex tableName="FEEDS" indexName="lastupdated_index" />
|
||||
<dropColumn tableName="FEEDS" columnName="lastUpdateSuccess" />
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="athou" id="drop-url-hash">
|
||||
<dropIndex tableName="FEEDS" indexName="urlHash_index" />
|
||||
<dropColumn tableName="FEEDS" columnName="urlHash" />
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
||||
Reference in New Issue
Block a user