[orblogs commit] r119 - in trunk/src/main: java/net/bigbark/item resources

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 7, 2009, 7:46:06 PM3/7/09
to orb...@googlegroups.com
Author: waj...@gmail.com
Date: Sat Mar 7 16:16:27 2009
New Revision: 119

Modified:
trunk/src/main/java/net/bigbark/item/ItemService.java
trunk/src/main/resources/hibernate.cfg.xml

Log:
Re-enabled RatingFormulaConfig. Reduced the default time limits for item
retrieval.

Modified: trunk/src/main/java/net/bigbark/item/ItemService.java
==============================================================================
--- trunk/src/main/java/net/bigbark/item/ItemService.java (original)
+++ trunk/src/main/java/net/bigbark/item/ItemService.java Sat Mar 7
16:16:27 2009
@@ -110,7 +110,7 @@
public List<Item> findFrontPageStories(Date date) {
int maxHours =
ratingFormulaConfigService.get().getHoursToStayOnFrontPage();
if (maxHours <= 0) {
- maxHours = 450000; // about 50 years...
+ maxHours = 168; // one week...
}
Calendar calendar = Calendar.getInstance();
if (date == null) {
@@ -132,7 +132,7 @@
public List<Item> findLatestPageStories(Date date) {
int maxHours =
ratingFormulaConfigService.get().getHoursToStayOnLatestPage();
if (maxHours <= 0) {
- maxHours = 450000; // about 50 years...
+ maxHours = 168; // one week...
}
Calendar calendar = Calendar.getInstance();
if (date == null) {
@@ -150,7 +150,7 @@

int maxDays =
ratingFormulaConfigService.get().getDaysToStayOnTopStoryPage();
if (maxDays <= 0) {
- maxDays = (365 * 50); // about 50 years...
+ maxDays = 7; // one week...
}
Calendar calendar = Calendar.getInstance();

@@ -176,8 +176,7 @@
public List<Item> findMostCommentedStoriesOfPrevDays() {

int minCommentsPrevDays =
ratingFormulaConfigService.get().getThresholdToReachPreviousDaysTopComments();
- int maxAgePrevHours =
ratingFormulaConfigService.get().getHoursToStayOnPreviousDaysTopCommentsSinceLastComment()
- ;
+ int maxAgePrevHours =
ratingFormulaConfigService.get().getHoursToStayOnPreviousDaysTopCommentsSinceLastComment();

Calendar calendar = Calendar.getInstance();
Date curDate = calendar.getTime();
@@ -216,7 +215,7 @@
public List<Item> find(Category category, Date date) {
int maxHours =
ratingFormulaConfigService.get().getHoursToStayOnCategoryPage();
if (maxHours <= 0) {
- maxHours = 450000; // about 50 years...
+ maxHours = 168; // one week...
}
Calendar calendar = Calendar.getInstance();
if (date == null) {

Modified: trunk/src/main/resources/hibernate.cfg.xml
==============================================================================
--- trunk/src/main/resources/hibernate.cfg.xml (original)
+++ trunk/src/main/resources/hibernate.cfg.xml Sat Mar 7 16:16:27 2009
@@ -18,7 +18,7 @@
<property name="hbm2ddl.auto">update</property>
<mapping class="net.bigbark.user.User"/>
<mapping class="net.bigbark.group.Group"/>
- <!--<mapping class="net.bigbark.model.RatingFormulaConfig"/>-->
+ <mapping class="net.bigbark.model.RatingFormulaConfig"/>
<mapping class="net.bigbark.item.Item"/>
<mapping class="net.bigbark.comment.Comment"/>
<mapping class="net.bigbark.item.ItemWatch"/>

Reply all
Reply to author
Forward
0 new messages