com.ltu.smd116.beans
Class CounterAdminBean


public class CounterAdminBean

Administrate counters.


Method Summary
 booleancreateCounter(CounterContainer counter)
          Tries to create a new counter in DB with properties from
a counter container.
 booleandeleteCounter(CounterContainer counter)
          Tries to delete a counter from DB.
 SortedVectorsearchByAccount(AccountContainer account)
          Search for counters whose account we know.
 SortedVectorsearchByName(String name)
          Search for counters whose name we know.
 booleanupdateCounter(CounterContainer counter)
          Tries to update a counter in DB with properties from
a counter container.

Method Detail

createCounter

public boolean createCounter(CounterContainer counter)
Tries to create a new counter in DB with properties from
a counter container.
Returns: True on success, false on failure.

deleteCounter

public boolean deleteCounter(CounterContainer counter)
Tries to delete a counter from DB.
Returns: True on success, false on failure.

searchByAccount

public SortedVector searchByAccount(AccountContainer account)
Search for counters whose account we know.
Parameters:
account - The account that one or more counters use.
Returns: A vector of sortable items.

searchByName

public SortedVector searchByName(String name)
Search for counters whose name we know.
Parameters:
name - The name of one or more counters.
Returns: A vector of sortable items.

updateCounter

public boolean updateCounter(CounterContainer counter)
Tries to update a counter in DB with properties from
a counter container.
Returns: True on success, false on failure.