Examples of AssetOwnedDailyId


Examples of org.vaadin.spring.samples.mvp.dto.AssetOwnedDailyId

    public void onFetch(Screen screen) {
        if (screen.getViewName().equals(DSRUpdateHourlyView.NAME) && screen.getAction().equals(Action.GET_DATA)) {

            // obtain control values
            Date marketDay = ((Property<Date>) screen.getControl(MarketDayPicker.class)).getValue();
            AssetOwnedDailyId id = ((Property<AssetOwnedDailyId>) screen.getControl(AnyParticipantSelector.class)).getValue();

            if (marketDay != null && id != null) {
                try {
                    List<DSRUpdateDTO> dsrUpdateHourlies = dsrService.getDSRHourly(SSTimeUtil.dateToDateTime(marketDay), id.getAssetOwner());
                    new Table();
                    // should only ever have one
                    if (CollectionUtils.isNotEmpty(dsrUpdateHourlies)) {
                        getView().populateGrid(dsrUpdateHourlies.get(0).getRecords());
                    } else {
View Full Code Here

Examples of org.vaadin.spring.samples.mvp.dto.AssetOwnedDailyId

    MockData data;

    private List<AssetOwnedDailyId> getParticipantsInternal(@NotNull final String name, @NotNull final DateTime day) {
        log.debug("Retrieving participants whose names start with [{}] that are effective on [{}].", name, day);
        List<AssetOwnedDailyId> result = new ArrayList<>();
        AssetOwnedDailyId participant;
        String assetOwner;
        DateTime d;
        for (Map.Entry<String, DateTime> entry: data.allParticipants().entrySet()) {
            assetOwner = entry.getKey();
            d = entry.getValue();
            if (assetOwner.startsWith(name.toUpperCase()) && day.isBefore(d)) {
                participant = new AssetOwnedDailyId();
                participant.setAssetOwner(assetOwner);
                participant.setDay(SSTimeUtil.dateTimeToIsoDay(d));
                result.add(participant);
            }
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.