-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFileMapping.java
More file actions
86 lines (68 loc) · 2.05 KB
/
FileMapping.java
File metadata and controls
86 lines (68 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package org.utplsql.api;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;
/**
* Created by Vinicius on 17/07/2017.
*/
public class FileMapping implements SQLData {
private String fileName;
private String objectOwner;
private String objectName;
private String objectType;
public FileMapping() {
}
public FileMapping(String fileName, String objectOwner, String objectName, String objectType) {
this.fileName = fileName;
this.objectOwner = objectOwner;
this.objectName = objectName;
this.objectType = objectType;
}
public String getFileName() {
return fileName;
}
private void setFileName(String fileName) {
this.fileName = fileName;
}
public String getObjectOwner() {
return objectOwner;
}
private void setObjectOwner(String objectOwner) {
this.objectOwner = objectOwner;
}
public String getObjectName() {
return objectName;
}
private void setObjectName(String objectName) {
this.objectName = objectName;
}
public String getObjectType() {
return objectType;
}
private void setObjectType(String objectType) {
this.objectType = objectType;
}
@Override
public String getSQLTypeName() {
return CustomTypes.UT_FILE_MAPPING;
}
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
setFileName(stream.readString());
setObjectOwner(stream.readString());
setObjectName(stream.readString());
setObjectType(stream.readString());
}
@Override
public void writeSQL(SQLOutput stream) throws SQLException {
stream.writeString(getFileName());
stream.writeString(getObjectOwner());
stream.writeString(getObjectName());
stream.writeString(getObjectType());
}
@Override
public String toString() {
return String.format("%s/%s.%s", getObjectType(), getObjectOwner(), getObjectName());
}
}