Share and Money Management  0.16
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
smm.objects.Currency Class Reference

Class to handle Currency data. More...

Inheritance diagram for smm.objects.Currency:

Public Member Functions

def __str__
 Returns the content of this instance as string.
- Public Member Functions inherited from smm.objects.SMMBaseObject
def __init__
 Initialise the instance and set attributes optionally.
def __repr__
 Returns the representation of this object as string.
def update
 Update instance arguments.
def add2db
 Add an object to the database.

Static Public Member Functions

def get
 Query Currency objects.
def getCount
 Returns the number of known currencies.

Static Public Attributes

dictionary arguments
string psTopic = 'smm.currency'
tuple id = Int(default=AutoReload, primary=True)
 Unique ID for each object.
tuple code = Unicode()
 ISO 4217 currency code.
tuple sign = Unicode()
 Short sign.
tuple description = Unicode()
 Detailed description.
- Static Public Attributes inherited from smm.objects.SMMBaseObject
dictionary arguments
 Set of argument names for keyword arguments.
tuple encoding = sys.stdout.encodingorsys.getdefaultencoding()
 Encoding of all character strings.
 psTopic = None
 Publish Subscribe Topic for this class.

Static Private Attributes

string __storm_table__ = "t_currency"
 Use given table to store all of this class inside.

Detailed Description

Class to handle Currency data.

Test:
tests.test_objects.TestObjects.test_Currency_objects()

Member Function Documentation

def smm.objects.Currency.__str__ (   self)

Returns the content of this instance as string.

References smm.objects.SMMBaseObject._encode(), smm.objects.Currency.code, smm.objects.Exchange.id, and smm.objects.Currency.id.

Referenced by smm.objects.SMMBaseObject.__repr__().

Here is the call graph for this function:

Here is the caller graph for this function:

def smm.objects.Currency.get (   id = None,
  code = None,
  sign = None 
)
static

Query Currency objects.

There are two ways for querying objects:

  • Querying by id returns a Currency object or None
  • Querying by code returns a Currency object or None
  • Querying by sign returns a Currency object or None
  • Querying without parameters to get all Currency objects

The last way returns always a storm.store.ResultSet.

Parameters
idReturns a Currency object specified by id
codeReturns a Currency object specified by code
signReturns a Currency object specified by sign
Sorting:
The result are unsorted
Test:
tests.test_objects.TestObjects.test_Currency_get()
def smm.objects.Currency.getCount ( )
static

Returns the number of known currencies.

Member Data Documentation

string smm.objects.Currency.__storm_table__ = "t_currency"
staticprivate

Use given table to store all of this class inside.

dictionary smm.objects.Currency.arguments
static
Initial value:
{
'code': 'unicode',
'sign': 'unicode',
'description': 'unicode',
}
tuple smm.objects.Currency.code = Unicode()
static

ISO 4217 currency code.

Referenced by smm.objects.Currency.__str__().

tuple smm.objects.Currency.description = Unicode()
static

Detailed description.

tuple smm.objects.Currency.id = Int(default=AutoReload, primary=True)
static
string smm.objects.Currency.psTopic = 'smm.currency'
static
tuple smm.objects.Currency.sign = Unicode()
static

Short sign.


The documentation for this class was generated from the following file: