Package name.abuchen.portfolio.snapshot.security

Examples of name.abuchen.portfolio.snapshot.security.SecurityPerformanceSnapshot


        cal.setTime(endDate);
        cal.add(Calendar.YEAR, -option.intValue());
        cal.set(Calendar.DAY_OF_MONTH, 1);
        cal.add(Calendar.DATE, -1);

        SecurityPerformanceSnapshot sps = null;

        ReportingPeriod.FromXtoY period = new ReportingPeriod.FromXtoY(cal.getTime(), endDate);
        if (clientSnapshot != null)
            sps = SecurityPerformanceSnapshot.create(client, period);
        else
            sps = SecurityPerformanceSnapshot.create(client, portfolioSnapshot.getSource(), period);

        StatementOfAssetsContentProvider contentProvider = (StatementOfAssetsContentProvider) assets
                        .getContentProvider();

        for (Element e : contentProvider.elements)
        {
            if (e.isSecurity())
            {
                for (SecurityPerformanceRecord r : sps.getRecords())
                {
                    if (r.getSecurity().equals(e.getSecurity()))
                    {
                        e.setPerformance(option, r);
                        break;
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.snapshot.security.SecurityPerformanceSnapshot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.