org.kinsources.kiwa.accounts
Class Accounts

java.lang.Object
  extended by org.kinsources.kiwa.accounts.Accounts
All Implemented Interfaces:
java.lang.Iterable<Account>

public class Accounts
extends java.lang.Object
implements java.lang.Iterable<Account>

The Accounts class represents an account collection.

Author:
christian.momon@devinsy.fr

Constructor Summary
Accounts()
           
Accounts(int initialCapacity)
           
 
Method Summary
 Account add(Account source)
           
 void clear()
           
 Accounts copy()
          This methods returns a shallow copy of the current object.
 int count(Account.Status status)
           
 Accounts findAccountByStatus(Account.Status status)
           
 Accounts findAccountsByRole(Role role)
           
 Account getById(long id)
           
 Account getByIndex(int index)
           
 boolean isEmpty()
           
 boolean isNotEmpty()
           
 java.util.Iterator<Account> iterator()
           
 long lastId()
           
 void remove(Account account)
           
 Accounts reverse()
           
 int size()
           
 Accounts sortByCreationDate()
           
 Accounts sortByFullName()
           
 Accounts sortByFullNameReversed()
           
 Accounts sortById()
           
 Accounts sortByLastConnectionDate()
           
 Accounts sortByLastName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accounts

public Accounts()

Accounts

public Accounts(int initialCapacity)
Method Detail

add

public Account add(Account source)

clear

public void clear()

copy

public Accounts copy()
This methods returns a shallow copy of the current object.

Returns:
a shallow copy of the current object.

count

public int count(Account.Status status)
Parameters:
status -
Returns:

findAccountByStatus

public Accounts findAccountByStatus(Account.Status status)
Parameters:
status -
Returns:

findAccountsByRole

public Accounts findAccountsByRole(Role role)
Parameters:
email -
Returns:

getById

public Account getById(long id)
Parameters:
id -
Returns:

getByIndex

public Account getByIndex(int index)
Parameters:
id -
Returns:

isEmpty

public boolean isEmpty()
Returns:

isNotEmpty

public boolean isNotEmpty()
Returns:

iterator

public java.util.Iterator<Account> iterator()
Specified by:
iterator in interface java.lang.Iterable<Account>
Returns:

lastId

public long lastId()
Returns:

remove

public void remove(Account account)
Parameters:
id -

reverse

public Accounts reverse()
Returns:

size

public int size()
Returns:

sortByCreationDate

public Accounts sortByCreationDate()
Returns:

sortByFullName

public Accounts sortByFullName()
Returns:

sortByFullNameReversed

public Accounts sortByFullNameReversed()
Returns:

sortById

public Accounts sortById()
Returns:

sortByLastConnectionDate

public Accounts sortByLastConnectionDate()
Returns:

sortByLastName

public Accounts sortByLastName()
Returns: