@@ -307,51 +307,6 @@ protected QuotaSummaryResponse getQuotaSummaryResponse(QuotaSummaryVO summary) {
307307 return response ;
308308 }
309309
310- @ Override
311- public Pair <List <QuotaSummaryResponse >, Integer > createQuotaSummaryResponse (final String accountName , final Long domainId ) {
312- List <QuotaSummaryResponse > result = new ArrayList <QuotaSummaryResponse >();
313-
314- if (accountName != null && domainId != null ) {
315- Account account = _accountDao .findActiveAccount (accountName , domainId );
316- QuotaSummaryResponse qr = getQuotaSummaryResponse (account );
317- result .add (qr );
318- }
319-
320- return new Pair <>(result , result .size ());
321- }
322-
323- @ Override
324- public Pair <List <QuotaSummaryResponse >, Integer > createQuotaSummaryResponse (Boolean listAll ) {
325- return createQuotaSummaryResponse (listAll , null , null , null );
326- }
327-
328- @ Override
329- public Pair <List <QuotaSummaryResponse >, Integer > createQuotaSummaryResponse (Boolean listAll , final String keyword , final Long startIndex , final Long pageSize ) {
330- List <QuotaSummaryResponse > result = new ArrayList <QuotaSummaryResponse >();
331- Integer count = 0 ;
332- if (listAll ) {
333- Filter filter = new Filter (AccountVO .class , "accountName" , true , startIndex , pageSize );
334- Pair <List <AccountVO >, Integer > data = _accountDao .findAccountsLike (keyword , filter );
335- count = data .second ();
336- for (final AccountVO account : data .first ()) {
337- QuotaSummaryResponse qr = getQuotaSummaryResponse (account );
338- result .add (qr );
339- }
340- } else {
341- Pair <List <QuotaAccountVO >, Integer > data = quotaAccountDao .listAllQuotaAccount (startIndex , pageSize );
342- count = data .second ();
343- for (final QuotaAccountVO quotaAccount : data .first ()) {
344- AccountVO account = _accountDao .findById (quotaAccount .getId ());
345- if (account == null ) {
346- continue ;
347- }
348- QuotaSummaryResponse qr = getQuotaSummaryResponse (account );
349- result .add (qr );
350- }
351- }
352- return new Pair <>(result , count );
353- }
354-
355310 protected QuotaSummaryResponse getQuotaSummaryResponse (final Account account ) {
356311 Calendar [] period = quotaStatement .getCurrentStatementTime ();
357312
0 commit comments