Author: altuure

January 10, 2012

Hi everybody, this was my surprise project , my first startup, my first ruby on rails project 🙂 you can check the  about page  but it is simply a gamification platform for lots of social sites and more, it now supports foursquare, gowalla, stackoverflow etc…. Achivy adds some fun and gamification to your social […]

Continue Reading
October 11, 2011

[caption id="" align="alignright" width="240" caption="Image by alancleaver_2000 via Flickr"][/caption] it has been a long time since I posted  🙁 so it would  be really good to put some targets and build a list of them. otherwise I will be lying on my coach all the time. ruby on rails experience : so far so amazing. […]

Continue Reading
December 9, 2010

Append Method handler Another dynamic query builder. But this one , use simple StringBuilder instead of trying to parse the argument.  So more fast and adjustable dynamic query builder For more see test cases and example dao @YMethod(type = YMethodType.APPEND,select = "pbyte,count(id)",groupBy = "pbyte") List<SimpleBean> append2(@YParameter("pint>=?") int i); @YMethod(type = YMethodType.APPEND,select = "pbyte,count(id)",groupBy = "pbyte",having […]

Continue Reading
November 3, 2010

yagdao (Yet Another Generic DAO) finally. this version is a little bit experimental but stable. yagdao is an generic dao framework  that would be enabled by annotations. simple step to go through for setup read more add jar into your classpath extend GenericDAO moreover you can implement custom method read more

Continue Reading
October 25, 2010

public String getIdProperty(Class entityClass) { String idProperty=sessionAccessor.getSessionFactory() .getClassMetadata(entityClass) .getIdentifierPropertyName(); return idProperty; } for JPA 2.0 metamodel API this method or to get value of id field see comment below public String getIdProperty(Class entityClass) { String idProperty; Metamodel metamodel = getEntityManager().getMetamodel(); EntityType entity = metamodel.entity(entityClass); Set<SingularAttribute> singularAttributes = entity.getSingularAttributes(); for (SingularAttribute singularAttribute : singularAttributes) { if […]

Continue Reading
%d bloggers like this: