Code example for Session

Methods: createCriteria

0
     *            the hibernate session used to create the criteria. 
     * @return the base criteria object. 
     */ 
    public Criteria getCriteria(final Session hibernateSession)
    { 
        Criteria criteria = hibernateSession.createCriteria(DomainGroup.class);
        ProjectionList fields = Projections.projectionList();
        fields.add(getColumn("id"));
        fields.add(getColumn("description"));
        fields.add(getColumn("name"));
        fields.add(getColumn("shortName"));
        fields.add(Projections.property("publicGroup").as("isPublic"));
        fields.add(getColumn("updatesCount"));
        fields.add(getColumn("followersCount"));
        fields.add(getColumn("dateAdded"));
        fields.add(getColumn("avatarId"));
        fields.add(getColumn("avatarCropSize"));
        fields.add(getColumn("avatarCropX"));
        fields.add(getColumn("avatarCropY"));
        fields.add(getColumn("bannerId"));
Experience pair programming with AI  Get Codota for Java