@Override public long performCount() throws PortalException { if (_performCountMethod != null) { return _performCountMethod.performCount(); } DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( _modelClass, _classLoader); addDefaultCriteria(dynamicQuery); addCriteria(dynamicQuery); return (Long)executeDynamicQuery( _dynamicQueryCountMethod, dynamicQuery, getCountProjection()); }
public static Criterion eqProperty( String propertyName, String otherPropertyName) { return getRestrictionsFactory().eqProperty( propertyName, otherPropertyName); }
public static Projection sqlGroupProjection( String sql, String groupBy, String[] columnAliases, Type[] types) { return getProjectionFactory().sqlGroupProjection( sql, groupBy, columnAliases, types); }
protected void addDefaultCriteria(DynamicQuery dynamicQuery) { if (_companyId > 0) { Property property = PropertyFactoryUtil.forName("companyId"); dynamicQuery.add(property.eq(_companyId)); } if (_groupId > 0) { Property property = PropertyFactoryUtil.forName( _groupIdPropertyName); dynamicQuery.add(property.eq(_groupId)); } }
public static Criterion leProperty( String propertyName, String otherPropertyName) { return getRestrictionsFactory().leProperty( propertyName, otherPropertyName); }
public static Criterion neProperty( String propertyName, String otherPropertyName) { return getRestrictionsFactory().neProperty( propertyName, otherPropertyName); }
protected void addOrderCriteria(DynamicQuery dynamicQuery) { if (_addOrderCriteriaMethod == null) { dynamicQuery.addOrder( OrderFactoryUtil.asc(_primaryKeyPropertyName)); } else { _addOrderCriteriaMethod.addOrderCriteria(dynamicQuery); } }
public static DynamicQuery forClass( Class<?> clazz, String alias, ClassLoader classLoader) { return getDynamicQueryFactory().forClass(clazz, alias, classLoader); }
public static Criterion ltProperty( String propertyName, String otherPropertyName) { return getRestrictionsFactory().ltProperty( propertyName, otherPropertyName); }
public static Criterion geProperty( String propertyName, String otherPropertyName) { return getRestrictionsFactory().geProperty( propertyName, otherPropertyName); }
public static Criterion gtProperty( String propertyName, String otherPropertyName) { return getRestrictionsFactory().gtProperty( propertyName, otherPropertyName); }
public static Criterion and(Criterion lhs, Criterion rhs) { return getRestrictionsFactory().and(lhs, rhs); }
public static Criterion ge(String propertyName, Object value) { return getRestrictionsFactory().ge(propertyName, value); }
public static Criterion in(String propertyName, Collection<?> values) { return getRestrictionsFactory().in(propertyName, values); }
public static Criterion isNotNull(String propertyName) { return getRestrictionsFactory().isNotNull(propertyName); }
public static Criterion sizeGe(String propertyName, int size) { return getRestrictionsFactory().sizeGe(propertyName, size); }
public static Projection alias(Projection projection, String alias) { return getProjectionFactory().alias(projection, alias); }
public static Criterion sqlRestriction( String sql, Object[] values, Type[] types) { return getRestrictionsFactory().sqlRestriction(sql, values, types); }
@Override protected long doPerformActions(long previousPrimaryKey) throws PortalException { try { return super.doPerformActions(previousPrimaryKey); } finally { indexInterval(); } }
public static Criterion sqlRestriction(String sql) { return getRestrictionsFactory().sqlRestriction(sql); }