public List
fetchDetailMetrics(Date dateFrom, Date dateTo, String navPage, String navOption, OrganizationDTO org) {
List
pageViews = new ArrayList (); log.warn("Date from " + dateFrom + " to " + dateTo);
DetachedCriteria metrics = DetachedCriteria.forClass(MetricsForUserSession.class);
metrics.add(Expression.between("dateTime", dateFrom, dateTo));
metrics.add(Expression.eq("navOption", navOption));
metrics.add(Expression.eq("navPage", navPage));
if (org != null)
{
log.warn(" org " + org.getName());
metrics.add(Expression.eq("organization.id", org.getId()));
}
ProjectionList projectList = Projections.projectionList();
// group by
projectList.add(Projections.groupProperty("entityId"));
// alias of the column head
projectList.add(Projections.alias(Projections.rowCount(), "count"));
metrics.setProjection(projectList);
// order by, sorting
metrics.addOrder(Order.desc("count"));
List
if (results == null || results.size() <>
log.warn("fetched nothing");
else
log.warn("fetched " + results.size());
log.warn("fetched navPages " + results.size());
for (Object[] column : results)
{
log.warn(column[0] + " " + column[1]);
PageView pageView = new PageView();
determineDescription(pageView, column, navPage);
pageView.setViewCount(new Integer(column[1].toString()));
pageViews.add(pageView);
}
return pageViews;
}
Secure, private AI inspired by behavioral sciences and evolutionary anthropology, built on Tiny Neural Networks (TNN, TLM), and a distributed agent system.
Hibernate Detached criteria with projections (GROUP BY)
Examples of Spring/Hibernate compare, group by, order by (sort) functionality:
Subscribe to:
Post Comments (Atom)
Post Scriptum
The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
Google Scholar
My favorite quotations..
“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.” by Robert A. Heinlein
"We are but habits and memories we chose to carry along." ~ Uki D. Lucas
Popular Recent Posts
-
Choice D Since we are currently renting, we started looking at the houses we could afford. This place fits our budget, but the baby blue col...
-
Every couple of years, I write a post about my career in which I review the past and consider pivots for the future. It is time to post an u...
-
How to get a model from HuggingFace on Mac OS This guide documents the steps needed to download HuggingFace models (especially MLX models) c...
-
Something subtle but powerful just landed in my AI pipeline: agent_Observer. It listens. Not to spy, but to sense the mood and intent. It ...
-
I have been reading a book, "Brave New Words," by Salman Khan of Khan Academy, and I got inspired to design an AI tutor (named Mai...
-
I am working on truly multi-persona (Marcus Aurelius, Seneca, etc.) I had fun while testing the interaction with the AI chat. I got this res...
-
Sometimes the AI chats surprise me on a new level. Here is an interaction I just had when fixing my AIKO app's Human-AI Interaction (HAi...
-
I never thought that I will need agent_HOA_rules.py but it is very useful! The bylaws are many and long and not text searchable, getting a ...
-
When I work with ChatGPT, I don't just ask for an answer and move on. Instead, we engage in a real dialogue, going back and forth like ...
-
I tested to belong to Haplogroup R1b1b2a1a1d1. Subclade R1b1b2a1a1d1* (as named by 23andMe ) or R1b1a2a1a1a4 (per FTDNA ) is a paternal (...
Most Popular Articles
-
In my journey building software and managing technology teams, I've often witnessed the allure and danger of what Melissa Perri aptly na...
-
I have noticed a very unsettling statistic on my blog. This prompted a fascinating question about AI, blogs' future, and maybe even the...
-
Choice D Since we are currently renting, we started looking at the houses we could afford. This place fits our budget, but the baby blue col...
-
Prompt: What do you really see in the selfie of myself? AI: I see a volcano about to blow up and I see a lost, scared boy in front of it. ...
-
Every couple of years, I write a post about my career in which I review the past and consider pivots for the future. It is time to post an u...
-
How to get a model from HuggingFace on Mac OS This guide documents the steps needed to download HuggingFace models (especially MLX models) c...
-
Something subtle but powerful just landed in my AI pipeline: agent_Observer. It listens. Not to spy, but to sense the mood and intent. It ...
-
I tested to belong to Haplogroup R1b1b2a1a1d1. Subclade R1b1b2a1a1d1* (as named by 23andMe ) or R1b1a2a1a1a4 (per FTDNA ) is a paternal (...
-
I have been reading a book, "Brave New Words," by Salman Khan of Khan Academy, and I got inspired to design an AI tutor (named Mai...
-
Introduction: A Language Model of My Own We are surrounded by large language models: systems trained on the vastness of the internet. Models...
No comments:
Post a Comment
Please be polite.