View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.tuigwaa.database.util;
17  
18  public class FileData {
19  
20  	private Long id;
21  	
22  	private String entityName;
23  	
24  	private String attrName;
25  
26  	private String entityId;
27  	
28  	private byte[] bytes;
29  
30  	public FileData(){
31  	}
32  	
33  	public FileData(String entityName, String attrName, String entityId, byte[] bytes){
34  		this.entityName = entityName;
35  		this.attrName = attrName;
36  		this.entityId = entityId;
37  		this.bytes = bytes;
38  	}
39  		
40  	public String getAttrName() {
41  		return attrName;
42  	}
43  
44  	public void setAttrName(String attrName) {
45  		this.attrName = attrName;
46  	}
47  
48  	public byte[] getBytes() {
49  		return bytes;
50  	}
51  
52  	public void setBytes(byte[] bytes) {
53  		this.bytes = bytes;
54  	}
55  
56  	public String getEntityName() {
57  		return entityName;
58  	}
59  
60  	public void setEntityName(String entityName) {
61  		this.entityName = entityName;
62  	}
63  
64  	public Long getId() {
65  		return id;
66  	}
67  
68  	public void setId(Long id) {
69  		this.id = id;
70  	}
71  	
72  	public void setEntityId(String entityId) {
73  		this.entityId = entityId;
74  	}
75  	
76  	public String getEntityId() {
77  		return entityId;
78  	}
79  	
80  	public boolean hasEntityId(){
81  		if(entityId == null || entityId.equals("")){
82  			return false;
83  		}
84  		return true;
85  	}
86  }