Class SubmissionPropertyDao

    • Constructor Detail

      • SubmissionPropertyDao

        public SubmissionPropertyDao()
    • Method Detail

      • getPropertyValueForId

        public String getPropertyValueForId​(Submission submission,
                                            long propertyId)
        Return the property value for the given submission and property id
        Parameters:
        submission - the submission
        propertyId - the property id
        Returns:
        the property value if found or null otherwise
        Since:
        4.3.4
      • getPropertyValue

        public String getPropertyValue​(Submission submission,
                                       String propertyName)
                                throws ApplicationException
        Return the value of a submission property
        Parameters:
        submission - the non-null submission
        propertyName - the non-empty property name
        Returns:
        the property value
        Throws:
        ApplicationException - if multiple values exist for the given property
      • setPropertyValue

        public void setPropertyValue​(Submission submission,
                                     String propertyName,
                                     String propertyValue)
                              throws ApplicationException
        Set a property related to a submission, creating the property if necessary
        Parameters:
        submission - the non-null submission
        propertyName - the non-empty property name
        propertyValue - the new property value
        Throws:
        ApplicationException - if multiple values exist for the given property
      • getSubmissionsWithProperty

        public List<Submission> getSubmissionsWithProperty​(String propertyName,
                                                           String propertyValue)
        Return the list of submissions for which a submission property with a specified name and value exists
        Parameters:
        propertyName - the name of the property to match
        propertyValue - the property value
        Returns:
        the list of matching submissions
      • getSubmissionProperties

        public List<SubmissionProperty> getSubmissionProperties​(String propertyName,
                                                                String propertyValue)
        Return the list of submission properties with a specified name and value
        Parameters:
        propertyName - the name of the property to match (exactly)
        propertyValue - the property value to match (exactly)
        Returns:
        the list of matching submission properties
      • getSubmissionPropertiesNameLike

        public List<SubmissionProperty> getSubmissionPropertiesNameLike​(String propertyName,
                                                                        String propertyValue)
        Return the list of submission properties with a specified name and value
        Parameters:
        propertyName - the name of the property to match (using a LIKE expression)
        propertyValue - the property value to match (exactly)
        Returns:
        the list of matching submission properties