/*
* Copyright 2011 Impetus Infotech.
*
* 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 com.impetus.kundera.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import com.impetus.kundera.api.Document;
/**
* Entity class for Email attachment
* @author amresh.singh
*/
@Entity
@Document(name="attachments", db="mongodbtest")
public class Attachment {
@Id
@Column(name="attachment_id")
private String attachmentId;
@Column(name="file_name")
private String fileName;
@Column(name="file_type")
private String fileType;
@Column(name="file_location")
private String fileLocation;
public String toString() {
return "ID: " + attachmentId
+ "\tName: " + fileName
+ "\tType: " + fileType
+ "\tLocation: " + fileLocation;
}
/**
* @return the attachmentId
*/
public String getAttachmentId() {
return attachmentId;
}
/**
* @param attachmentId the attachmentId to set
*/
public void setAttachmentId(String attachmentId) {
this.attachmentId = attachmentId;
}
/**
* @return the fileName
*/
public String getFileName() {
return fileName;
}
/**
* @param fileName the fileName to set
*/
public void setFileName(String fileName) {
this.fileName = fileName;
}
/**
* @return the fileType
*/
public String getFileType() {
return fileType;
}
/**
* @param fileType the fileType to set
*/
public void setFileType(String fileType) {
this.fileType = fileType;
}
/**
* @return the fileLocation
*/
public String getFileLocation() {
return fileLocation;
}
/**
* @param fileLocation the fileLocation to set
*/
public void setFileLocation(String fileLocation) {
this.fileLocation = fileLocation;
}
}