001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.actionitem;
017
018import javax.persistence.AttributeOverride;
019import javax.persistence.AttributeOverrides;
020import javax.persistence.Column;
021import javax.persistence.Entity;
022import javax.persistence.Table;
023
024/**
025 * Outbox item.  An extension of {@link ActionItemActionListExtension} for OJB.
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 *
029 */
030@Entity
031@Table(name="KREW_OUT_BOX_ITM_T")
032@AttributeOverrides({
033        @AttributeOverride(name="id", column=@Column(name="ACTN_ITM_ID")),
034        @AttributeOverride(name="principalId", column=@Column(name="PRNCPL_ID")),
035        @AttributeOverride(name="dateAssigned", column=@Column(name="ASND_DT")),
036        @AttributeOverride(name="actionRequestCd", column=@Column(name="RQST_CD")),
037        @AttributeOverride(name="actionRequestId", column=@Column(name="ACTN_RQST_ID")),
038        @AttributeOverride(name="documentId", column=@Column(name="DOC_HDR_ID")),//, insertable=false, updatable=false)),
039        @AttributeOverride(name="responsibilityId", column=@Column(name="RSP_ID")),
040        @AttributeOverride(name="groupId", column=@Column(name="GRP_ID")),
041        @AttributeOverride(name="roleName", column=@Column(name="ROLE_NM")),
042        @AttributeOverride(name="docTitle", column=@Column(name="DOC_HDR_TTL")),
043        @AttributeOverride(name="docLabel", column=@Column(name="DOC_TYP_LBL")),
044        @AttributeOverride(name="docHandlerURL", column=@Column(name="DOC_HDLR_URL")),
045        @AttributeOverride(name="docName", column=@Column(name="DOC_TYP_NM")),
046        @AttributeOverride(name="delegatorPrincipalId", column=@Column(name="DLGN_PRNCPL_ID")),
047        @AttributeOverride(name="delegatorGroupId", column=@Column(name="DLGN_GRP_ID")),
048        @AttributeOverride(name="delegationType", column=@Column(name="DLGN_TYP")),
049        @AttributeOverride(name="requestLabel", column=@Column(name="RQST_LBL"))
050})
051
052public class OutboxItemActionListExtension extends ActionItemActionListExtension {
053
054        private static final long serialVersionUID = 5776214610837858304L;
055
056        public OutboxItemActionListExtension() {}
057
058        public OutboxItemActionListExtension(ActionItem actionItem) {
059                this.setActionRequestCd(actionItem.getActionRequestCd());
060                this.setActionRequestId(actionItem.getActionRequestId());
061                this.setDateAssigned(actionItem.getDateAssigned());
062                this.setDelegationType(actionItem.getDelegationType());
063                this.setDelegatorPrincipalId(actionItem.getDelegatorPrincipalId());
064                this.setDelegatorGroupId(actionItem.getDelegatorGroupId());
065                this.setDocHandlerURL(actionItem.getDocHandlerURL());
066                this.setDocLabel(actionItem.getDocLabel());
067                this.setDocName(actionItem.getDocName());
068                this.setDocTitle(actionItem.getDocTitle());
069                this.setResponsibilityId(actionItem.getResponsibilityId());
070                this.setRoleName(actionItem.getRoleName());
071                this.setDocumentId(actionItem.getDocumentId());
072                this.setPrincipalId(actionItem.getPrincipalId());
073                this.setGroupId(actionItem.getGroupId());
074                this.setRequestLabel(actionItem.getRequestLabel());
075        }
076
077}