Package org.zeroexchange.model.resource.participant

Examples of org.zeroexchange.model.resource.participant.TenderType


                        /**
                         * {@inheritDoc}
                         */
                        @Override
                        protected void onClick() {
                            TenderType ownerTenderType = resourceReader.isUserInRole(resource, TenderType.SUPPLY,
                                    authorizedUserService.getCurrentUser()) ?
                                            TenderType.SUPPLY : TenderType.NEED;
                            //Go next page
                            setResponsePage(ResourceManagement.class,
                                    new PageParameters().add(ResourceManagement.PARAM_RESOURCE_ID, resource.getId()).
                                    add(ResourceManagement.PARAM_RESOURCE_TENDER_TYPE, ownerTenderType.name()));
                        }
                };
            }
        });
       
View Full Code Here


                        /**
                         * {@inheritDoc}
                         */
                        @Override
                        protected void onClick() {
                            TenderType ownerTenderType = resourceReader.isUserInRole(resource, TenderType.SUPPLY,
                                    authorizedUserService.getCurrentUser()) ?
                                            TenderType.SUPPLY : TenderType.NEED;
                            //Go next page
                            setResponsePage(ResourceManagement.class,
                                    new PageParameters().add(ResourceManagement.PARAM_RESOURCE_ID, resource.getId()).
                                    add(ResourceManagement.PARAM_RESOURCE_TENDER_TYPE, ownerTenderType.name()));
                        }
                };
            }
        });

View Full Code Here

       
        //Tender owner criteria
        Integer resourcesParticipantId = filterData.getResourcesParticipantId();
        Criterion participantCriterion = null;
        if(resourcesParticipantId != null) {
            TenderType tenderType = filterData.getUsageType();
            String supplierAlias = criteriaDescriptor.getFieldAlias(Resource.FIELD_SUPPLIES + "." + ResourceTender.FIELD_USER + "." + User.FIELD_ID(), Criteria.LEFT_JOIN);
            String neederAlias = criteriaDescriptor.getFieldAlias(Resource.FIELD_NEEDS + "." + ResourceTender.FIELD_USER + "." + User.FIELD_ID(), Criteria.LEFT_JOIN);
            participantCriterion =
                    tenderType == TenderType.NEED ? Restrictions.eq(neederAlias, resourcesParticipantId) :
                        tenderType == TenderType.SUPPLY ? Restrictions.eq(supplierAlias, resourcesParticipantId) :
View Full Code Here

            @Override
            public void validate(Form<?> form) {
                // Check for maximal value
                TenderData tenderData = (TenderData) form.getModelObject();
                TenderType usageType = tenderData.getTenderType();
                Resource resource = getResourceModel().getObject();
                if (stockManager.isPriceManagementEnabled(resource) && usageType == TenderType.SUPPLY) {
                   
                    //Amount check
                    BigDecimal maxUserAmount = BigDecimal.ZERO;
View Full Code Here

                }
               
            });
        }

        final TenderType tenderType = tenderData.getTenderType();//Form.getModelObject().getTenderType();//typeChoice.getModelObject();
       
        boolean isSupply = tenderType == TenderType.SUPPLY;

        // --- Tender's supply time
        final boolean priceManagementEnabled = stockManager.isPriceManagementEnabled(resource);
View Full Code Here

TOP

Related Classes of org.zeroexchange.model.resource.participant.TenderType

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.