<commit_before>/*
 * Kuali Coeus, a comprehensive research administration system for higher education.
 * 
 * Copyright 2005-2015 Kuali, Inc.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.kuali.kra.protocol.onlinereview;

import org.apache.commons.lang3.StringUtils;
import org.kuali.coeus.common.committee.impl.meeting.CommitteeScheduleMinuteBase;
import org.kuali.coeus.common.framework.person.KcPerson;
import org.kuali.coeus.common.framework.rolodex.Rolodex;
import org.kuali.coeus.common.permissions.impl.PermissionableKeys;
import org.kuali.coeus.common.framework.auth.perm.Permissionable;
import org.kuali.coeus.sys.framework.model.KcPersistableBusinessObjectBase;
import org.kuali.kra.protocol.auth.UnitAclLoadable;
import org.kuali.kra.infrastructure.Constants;
import org.kuali.kra.infrastructure.RoleConstants;
import org.kuali.kra.protocol.ProtocolBase;
import org.kuali.kra.protocol.ProtocolOnlineReviewDocumentBase;
import org.kuali.kra.protocol.actions.submit.ProtocolReviewer;
import org.kuali.kra.protocol.actions.submit.ProtocolSubmissionBase;
import org.kuali.rice.krad.util.GlobalVariables;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * This class encapsulates the notion of a protocol review. Essentially 
 * a join between protocol, submission, and a reviewer.  The ProtocolReview
 * is created by the IRB Admin as request.
 */
public abstract class ProtocolOnlineReviewBase extends KcPersistableBusinessObjectBase implements Permissionable, UnitAclLoadable {

    private static final long serialVersionUID = 531397319695764847L;

    private Long protocolOnlineReviewId;

    private Long protocolId;

    private Long submissionIdFk;

    private Long protocolReviewerId;

    private String protocolOnlineReviewStatusCode;

    private Long protocolOnlineReviewDeterminationRecommendationCode;

    private Date dateDue;

    private Date dateRequested;

    private String actionsPerformed;

    private boolean reviewerApproved = false;

    private boolean adminAccepted = false;

    private ProtocolBase protocol;

    private ProtocolSubmissionBase protocolSubmission;

    private ProtocolReviewer protocolReviewer;

    private ProtocolOnlineReviewStatus protocolOnlineReviewStatus;

    private ProtocolOnlineReviewDeterminationRecommendationBase protocolOnlineReviewDeterminationRecommendation;

    private List<CommitteeScheduleMinuteBase> committeeScheduleMinutes;

    private List<ProtocolReviewAttachmentBase> reviewAttachments;

    private ProtocolOnlineReviewDocumentBase protocolOnlineReviewDocument;

    //lookup fields  
    private transient ProtocolBase lookupProtocol;

    private transient Integer lookupReviewerRolodexId;

    private transient Rolodex lookupReviewerRolodex;

    private transient String lookupReviewerPersonId;

    private transient KcPerson lookupReviewerPerson;

    private transient String lookupProtocolOnlineReviewStatusCode;

    // to limit reviewertype drop down to primary/secondary on OLR  
    private transient String reviewerTypeCode;

    public ProtocolOnlineReviewBase() {
        this.committeeScheduleMinutes = new ArrayList<CommitteeScheduleMinuteBase>();
    }

    /**
     * Gets the protocolReviewId attribute. 
     * @return Returns the protocolReviewId.
     */
    public Long getProtocolOnlineReviewId() {
        return protocolOnlineReviewId;
    }

    /**
     * Sets the protocolReviewId attribute value.
     * @param protocolOnlineReviewId The protocolReviewId to set.
     */
    public void setProtocolOnlineReviewId(Long protocolOnlineReviewId) {
        this.protocolOnlineReviewId = protocolOnlineReviewId;<commit_msg>RESMER-633: reviewAttachments list was not initialized and so it was throwing NPE while trying to delete attachments list from OnlineReviewComments document<commit_after>/*
 * Kuali Coeus, a comprehensive research administration system for higher education.
 * 
 * Copyright 2005-2015 Kuali, Inc.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.kuali.kra.protocol.onlinereview;

import org.apache.commons.lang3.StringUtils;
import org.kuali.coeus.common.committee.impl.meeting.CommitteeScheduleMinuteBase;
import org.kuali.coeus.common.framework.person.KcPerson;
import org.kuali.coeus.common.framework.rolodex.Rolodex;
import org.kuali.coeus.common.permissions.impl.PermissionableKeys;
import org.kuali.coeus.common.framework.auth.perm.Permissionable;
import org.kuali.coeus.sys.framework.model.KcPersistableBusinessObjectBase;
import org.kuali.kra.protocol.auth.UnitAclLoadable;
import org.kuali.kra.infrastructure.Constants;
import org.kuali.kra.infrastructure.RoleConstants;
import org.kuali.kra.protocol.ProtocolBase;
import org.kuali.kra.protocol.ProtocolOnlineReviewDocumentBase;
import org.kuali.kra.protocol.actions.submit.ProtocolReviewer;
import org.kuali.kra.protocol.actions.submit.ProtocolSubmissionBase;
import org.kuali.rice.krad.util.GlobalVariables;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * This class encapsulates the notion of a protocol review. Essentially 
 * a join between protocol, submission, and a reviewer.  The ProtocolReview
 * is created by the IRB Admin as request.
 */
public abstract class ProtocolOnlineReviewBase extends KcPersistableBusinessObjectBase implements Permissionable, UnitAclLoadable {

    private static final long serialVersionUID = 531397319695764847L;

    private Long protocolOnlineReviewId;

    private Long protocolId;

    private Long submissionIdFk;

    private Long protocolReviewerId;

    private String protocolOnlineReviewStatusCode;

    private Long protocolOnlineReviewDeterminationRecommendationCode;

    private Date dateDue;

    private Date dateRequested;

    private String actionsPerformed;

    private boolean reviewerApproved = false;

    private boolean adminAccepted = false;

    private ProtocolBase protocol;

    private ProtocolSubmissionBase protocolSubmission;

    private ProtocolReviewer protocolReviewer;

    private ProtocolOnlineReviewStatus protocolOnlineReviewStatus;

    private ProtocolOnlineReviewDeterminationRecommendationBase protocolOnlineReviewDeterminationRecommendation;

    private List<CommitteeScheduleMinuteBase> committeeScheduleMinutes;

    private List<ProtocolReviewAttachmentBase> reviewAttachments;

    private ProtocolOnlineReviewDocumentBase protocolOnlineReviewDocument;

    //lookup fields  
    private transient ProtocolBase lookupProtocol;

    private transient Integer lookupReviewerRolodexId;

    private transient Rolodex lookupReviewerRolodex;

    private transient String lookupReviewerPersonId;

    private transient KcPerson lookupReviewerPerson;

    private transient String lookupProtocolOnlineReviewStatusCode;

    // to limit reviewertype drop down to primary/secondary on OLR  
    private transient String reviewerTypeCode;

    public ProtocolOnlineReviewBase() {
        this.committeeScheduleMinutes = new ArrayList<>();
        this.reviewAttachments = new ArrayList<>();
    }

    /**
     * Gets the protocolReviewId attribute. 
     * @return Returns the protocolReviewId.
     */
    public Long getProtocolOnlineReviewId() {
        return protocolOnlineReviewId;
    }

    /**
     * Sets the protocolReviewId attribute value.
     * @param protocolOnlineReviewId The protocolReviewId to set.
     */
    public void setProtocolOnlineReviewId(Long protocolOnlineReviewId) {
        this.protocolOnlineReviewId = protocolOnlineReviewId;
{'fraction_non_alphanumeric': 0.05962887531115637, 'fraction_numerical': 0.006675718488345779, 'mean_word_length': 4.626352641629535, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1895575', 'n_tokens_mistral': 2471, 'n_tokens_neox': 2227, 'n_words': 688}