Rev 12 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package pt.estgp.estgweb.domain.dao.impl;
import org.hibernate.criterion.Order;
import static org.
hibernate.
criterion.
Restrictions.
*;
import pt.estgp.estgweb.domain.UrlStatMonth;
import java.util.Date;
import java.util.List;
/**
* @author Jorge Machado
* @date 28/Fev/2008
* @time 2:51:06
* @see pt.estgp.estgweb.domain.dao.impl
*/
public class UrlStatMonthDaoImpl
extends UrlStatMonthDao
{
public static UrlStatMonthDaoImpl getInstance
()
{
if (myInstance ==
null)
myInstance =
new UrlStatMonthDaoImpl
();
return (UrlStatMonthDaoImpl
) myInstance
;
}
public List
<UrlStatMonth
> loadByMonth
(1.5.0/docs/api/java/lang/String.html">String relativePath,
5+0%2Fdocs%2Fapi+Date">Date startDate,
5+0%2Fdocs%2Fapi+Date">Date endDate
)
{
return createCriteria
()
.
add(eq
("id.urlStatYear.id.urlStat.relativePath",relativePath
))
.
add(or
(gt
("date",startDate
),eq
("date",startDate
)))
.
add(or
(lt
("date",endDate
),eq
("date",endDate
))).
addOrder(Order.
asc("date")).
list();
}
}