Package org.cyclos.impl.system
Class FinancialSubReportsHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.system.FinancialSubReportsHandlerImpl
-
- All Implemented Interfaces:
FinancialSubReportsHandler,FinancialSubReportsTestableHandler,SubReportsHandler
@Component public class FinancialSubReportsHandlerImpl extends BaseNetworkedHandlerImpl implements FinancialSubReportsTestableHandler
Implementation for FinancialSubReportsHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cyclos.impl.system.SubReportsHandler
SubReportsHandler.PeriodLimit
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description FinancialSubReportsHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ReportSection>data(SystemReportQuery query)Returns the section that should be included in the reportCurrencyAmountDTOgetBalanceForUserAccountType(UserAccountType accountType, Set<? extends Group> groups, Date date)protected DBQuery<?>getBaseMemberQuery(Set<? extends Group> groups, boolean excludeRemoved, Date date, org.cyclos.impl.system.SubReportsHandlerImpl.QueryType type)gets the base query for checking group membership at a certain time/period against the group history log.protected DBQuery<?>getBaseMemberQuery(Set<? extends Group> groups, DateTime date, org.cyclos.impl.system.SubReportsHandlerImpl.QueryType type)protected DateTimegetPeriodLimit(SystemReportQuery query, SubReportsHandler.PeriodLimit periodLimit)protected DategetPeriodLimitAsDate(SystemReportQuery query, SubReportsHandler.PeriodLimit periodLimit)intorder()The order the report sections are shown-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
data
public List<ReportSection> data(SystemReportQuery query)
Description copied from interface:SubReportsHandlerReturns the section that should be included in the report- Specified by:
datain interfaceSubReportsHandler
-
getBalanceForUserAccountType
public CurrencyAmountDTO getBalanceForUserAccountType(UserAccountType accountType, Set<? extends Group> groups, Date date)
- Specified by:
getBalanceForUserAccountTypein interfaceFinancialSubReportsTestableHandler
-
order
public int order()
Description copied from interface:SubReportsHandlerThe order the report sections are shown- Specified by:
orderin interfaceSubReportsHandler- Returns:
-
getBaseMemberQuery
protected DBQuery<?> getBaseMemberQuery(Set<? extends Group> groups, boolean excludeRemoved, Date date, org.cyclos.impl.system.SubReportsHandlerImpl.QueryType type) throws IllegalArgumentException
gets the base query for checking group membership at a certain time/period against the group history log.- Parameters:
ugl- QGroupHistoryLog, to invoke further where clauses ongroups- the groups to check ondate- The point in timesub- if true returns a DBSubQuery, if false a DBQuery- Returns:
- A DBQuery, depending on the sub parameter. The result should be casted to either of those.
- Throws:
IllegalArgumentException- if both startDate and endDate on the period are null.
-
getBaseMemberQuery
protected DBQuery<?> getBaseMemberQuery(Set<? extends Group> groups, DateTime date, org.cyclos.impl.system.SubReportsHandlerImpl.QueryType type) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getPeriodLimit
protected DateTime getPeriodLimit(SystemReportQuery query, SubReportsHandler.PeriodLimit periodLimit)
-
getPeriodLimitAsDate
protected Date getPeriodLimitAsDate(SystemReportQuery query, SubReportsHandler.PeriodLimit periodLimit)
-
-