Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2010 JBoss Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 
 package org.jbpm.services.task.impl.model;
 
 import java.util.List;
 
 import  javax.persistence.CascadeType;
 import  javax.persistence.Column;
 import  javax.persistence.Entity;
 import  javax.persistence.GeneratedValue;
 import  javax.persistence.GenerationType;
 import  javax.persistence.Id;
 import  javax.persistence.JoinColumn;
 import  javax.persistence.JoinTable;
 import  javax.persistence.ManyToMany;
 import  javax.persistence.OneToMany;
 import  javax.persistence.SequenceGenerator;
 import  javax.persistence.Table;
 
 import  org.kie.api.task.model.I18NText;
 import  org.kie.api.task.model.OrganizationalEntity;
 import  org.kie.internal.task.api.model.NotificationType;
 
 @Entity
 @Table(name="Notification")
 @SequenceGenerator(name="notificationIdSeq", sequenceName="NOTIFICATION_ID_SEQ", allocationSize=1)
 public class NotificationImpl implements org.kie.internal.task.api.model.Notification  {
     
     @Id
     @GeneratedValue(strategy = GenerationType.AUTO, generator="notificationIdSeq")
     @Column(name = "id")
     private Long                             id;
 
     @OneToMany(cascade = CascadeType.ALL, targetEntity=I18NTextImpl.class)
     @JoinColumn(name = "Notification_Documentation_Id", nullable = true)
     private List<I18NText>                   documentation = Collections.emptyList();
 
     private int                              priority;
     
     @ManyToMany(targetEntity=OrganizationalEntityImpl.class)
     @JoinTable(name = "Notification_Recipients", joinColumns = @JoinColumn(name = "task_id"), inverseJoinColumns = @JoinColumn(name = "entity_id"))    
     private List<OrganizationalEntity>       recipients = Collections.emptyList();
 
     @ManyToMany(targetEntity=OrganizationalEntityImpl.class)
     @JoinTable(name = "Notification_BAs", joinColumns = @JoinColumn(name = "task_id"), inverseJoinColumns = @JoinColumn(name = "entity_id"))
     private List<OrganizationalEntity>       businessAdministrators = Collections.emptyList();
 
     @OneToMany(cascade = CascadeType.ALL, targetEntity=I18NTextImpl.class)
     @JoinColumn(name = "Notification_Names_Id", nullable = true)    
     private List<I18NText> names        = Collections.emptyList();
     
     @OneToMany(cascade = CascadeType.ALL, targetEntity=I18NTextImpl.class)
     @JoinColumn(name = "Notification_Subjects_Id", nullable = true)    
     private List<I18NText> subjects     = Collections.emptyList();
     
     @OneToMany(cascade = CascadeType.ALL, targetEntity=I18NTextImpl.class)
     @JoinColumn(name = "Notification_Descriptions_Id", nullable = true)
     private List<I18NText> descriptions = Collections.emptyList();  
     
     public void writeExternal(ObjectOutput outthrows IOException {
         out.writeLong );
         out.writeInt );
         
         CollectionUtils.writeOrganizationalEntityListout );
         CollectionUtils.writeOrganizationalEntityListout );                
         
         CollectionUtils.writeI18NTextListout );
         CollectionUtils.writeI18NTextListout );
         CollectionUtils.writeI18NTextListout );
         CollectionUtils.writeI18NTextListout );
         
     }
     
     public void readExternal(ObjectInput inthrows IOException,
                                             ClassNotFoundException {
          = in.readLong();
          = in.readInt();
         
          = CollectionUtils.readOrganizationalEntityListin );
          = CollectionUtils.readOrganizationalEntityListin );
                
         = CollectionUtils.readI18NTextListin );
         = CollectionUtils.readI18NTextListin );
         = CollectionUtils.readI18NTextListin );
         = CollectionUtils.readI18NTextListin );        
    }
    public Long getId() {
        return ;
    }
    public void setId(long id) {
        this. = id;
    }
    
    public NotificationType getNotificationType() {
        return NotificationType.Default;
    }
    public List<I18NText> getDocumentation() {
        return ;
    }
    public void setDocumentation(List<I18NText> documentation) {
        this. = documentation;
    }
    public int getPriority() {
        return ;
    }
    public void setPriority(int priority) {
        this. = priority;
    }
    public List<OrganizationalEntity> getRecipients() {
        return ;
    }
    public void setRecipients(List<OrganizationalEntity> recipients) {
        this. = recipients;
    }
    public List<OrganizationalEntity> getBusinessAdministrators() {
        return ;
    }
    public void setBusinessAdministrators(List<OrganizationalEntity> businessAdministrators) {
        this. = businessAdministrators;
    }
    public List<I18NText> getNames() {
        return ;
    }
    public void setNames(List<I18NText> names) {
        this. = names;
    }
    public List<I18NText> getSubjects() {
        return ;
    }
    public void setSubjects(List<I18NText> subjects) {
        this. = subjects;
    }
    
    public List<I18NText> getDescriptions() {
        return ;
    }
    public void setDescriptions(List<I18NText> descriptions) {
        this. = descriptions;
    }    
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ;        
        result = prime * result + CollectionUtils.hashCode );        
        result = prime * result + CollectionUtils.hashCode );        
        result = prime * result + CollectionUtils.hashCode );
        result = prime * result + CollectionUtils.hashCode );       
        result = prime * result + CollectionUtils.hashCode );        
        result = prime * result + CollectionUtils.hashCode );        
        return result;
    }
    @Override
    public boolean equals(Object obj) {
        if ( this == obj ) return true;
        if ( obj == null ) return false;
        if ( !(obj instanceof NotificationImpl) ) return false;
        NotificationImpl other = (NotificationImplobj;        
        
        return CollectionUtils.equalsother.businessAdministrators ) && CollectionUtils.equalsother.documentation )
        && CollectionUtils.equalsother.recipients ) && CollectionUtils.equalsother.descriptions ) && CollectionUtils.equalsother.names )
        && CollectionUtils.equalsother.subjects );
    }
                
New to GrepCode? Check out our FAQ X