Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(10)  |  Derive(0)  |  Import(4)
Models aggregation of several domain objects.

src/q/u/quant-0.8/src/quant/dom/market.py   quant(Download)
from quant.dom.base import Text 
from quant.dom.base import Date
from quant.dom.base import AggregatesMany
from quant.dom.base import HasMany
from quant.dom.base import HasA
class Exchange(SimpleNamedObject):
 
    symbols = AggregatesMany('Symbol', key='name', ownerName='exchange')
    holidays = Text(isRequired=False)
 
 
class Symbol(SimpleNamedObject):
 
    markets = AggregatesMany('Market', key='id')
    symbol = HasA('Symbol', isRequired=True)
    lastPrice = Float(isTemporal=True, isRequired=True)
    metrics = AggregatesMany('Metric', key='id', isEditable=False)
 
    def getLabelValue(self):
    observationTime = DateTime()
    priceProcess = HasA('PriceProcess', isRequired=True)
    results = AggregatesMany('Result', key='id')
    metrics = AggregatesMany('Metric', key='id')
 

src/q/u/quant-0.8/src/quant/dom/result.py   quant(Download)
from quant.dom.base import SimpleObject
from quant.dom.base import SimpleDatedObject
from quant.dom.base import String
from quant.dom.base import AggregatesMany
from quant.dom.base import HasA
    image = HasA('Image')
    doCalculationsLater = Boolean(isHidden=True)
    lines = AggregatesMany('ResultLine', key='id', isEditable=False)
    totalValue = Float(isEditable=False)
 

src/q/u/quant-0.8/src/quant/dom/book.py   quant(Download)
from quant.dom.base import SimpleObject, String, HasMany, AggregatesMany, HasA
 
class Book(SimpleObject):
 
    isUnique = False
 
    isTemporal = True
 
    title = String(isTemporal=True)
    results = AggregatesMany('Result', key='id')

src/q/u/quant-0.8/src/quant/dom/extension.py   quant(Download)
from quant.dom.base import DatedStatefulObject
from quant.dom.base import String
from quant.dom.base import AggregatesMany
from quant.dom.base import HasA
import codecs
class PriceProcess(Extension):
 
    pricerPreferences = AggregatesMany('PricerPreference', key='contractType')
 
    def getDurationYears(self, *args, **kwds):
class ContractType(Extension):
 
    pricerPreferences = AggregatesMany('PricerPreference', key='priceProcess')
 
 
class Pricer(Extension):
 
    pricerPreferences = AggregatesMany('PricerPreference', key='id')