com.nesstar.api
Interface Bank<T extends NesstarBankObject>

Type Parameters:
T - The type of object contained within this Bank
All Superinterfaces:
Map<String,T>

public interface Bank<T extends NesstarBankObject>
extends Map<String,T>

A repository containing all objects of a particular type hosted by a particular Nesstar server.

Since:
0.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 NesstarList<T> getAll()
          Gets all objects in this Bank.
 Server getServer()
          Gets the server to which this Bank belongs.
 Class<T> getType()
          Gets the type of object in this bank.
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getType

Class<T> getType()
Gets the type of object in this bank.

Returns:
A Class object representing the type of object contained within this Bank

getServer

Server getServer()
Gets the server to which this Bank belongs.

Returns:
A Server object

getAll

NesstarList<T> getAll()
                                                throws NotAuthorizedException,
                                                       IOException
Gets all objects in this Bank. This method is the preferable way to retrieve all objects in the Bank. Map.values() specified by Map is limited by the fact that it may not throw checked exceptions, and there for has no alternative to returning null in case of an abnormal condition.

Returns:
A NesstarList containing all objects in this Bank
Throws:
NotAuthorizedException - If access was denied by the Nesstar server
IOException - If there was an error while communicating with the server


Copyright © 2011, NSD All rights reserved