001package com.randomnoun.common.db.to;
002
003import java.util.Map;
004
005public class RoutineTO {
006        
007        private SchemaTO schema;
008        private String name;
009        private String type; // PROCEDURE, FUNCTION
010        private String dataType;  // function only
011        private Long dataTypeLength; // character length
012        // private Long dataTypeByteLength;
013        private Long dataTypeNumericPrecision;
014        private Long dataTypeNumericScale;
015        private Long dataTypeDateTimePrecision;
016        private String charsetName;
017        private String collationName;
018        
019        // private String dtdIdentifier; // functions only, is the dataType + extra bits
020        // private String bodyLanguage; // always 'SQL'
021        private String definer;
022        
023        private String comment;
024        private String definition;
025        private boolean deterministic;
026        private String dataAccess;  //  The value is one of CONTAINS SQL, NO SQL, READS SQL DATA, or MODIFIES SQL DATA.
027        private String securityType; // The routine SQL SECURITY characteristic. The value is one of DEFINER or INVOKER.
028        
029        private String sqlMode; // eg IGNORE_SPACE,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
030        
031        private Map<String, RoutineParameterTO> routineParameterMap;
032        
033        public RoutineTO(SchemaTO schema, String name) {
034                this.schema = schema;
035                this.name = name;
036        }
037
038        public SchemaTO getSchema() {
039                return schema;
040        }
041
042        public void setSchema(SchemaTO schema) {
043                this.schema = schema;
044        }
045
046        public String getName() {
047                return name;
048        }
049
050        public void setName(String name) {
051                this.name = name;
052        }
053
054        public String getType() {
055                return type;
056        }
057
058        public void setType(String type) {
059                this.type = type;
060        }
061
062        public String getDataType() {
063                return dataType;
064        }
065
066        public void setDataType(String dataType) {
067                this.dataType = dataType;
068        }
069
070
071        public String getCharsetName() {
072                return charsetName;
073        }
074
075        public void setCharsetName(String charsetName) {
076                this.charsetName = charsetName;
077        }
078
079        public String getCollationName() {
080                return collationName;
081        }
082
083        public void setCollationName(String collationName) {
084                this.collationName = collationName;
085        }
086
087        public String getDefiner() {
088                return definer;
089        }
090
091        public void setDefiner(String definer) {
092                this.definer = definer;
093        }
094
095        public String getComment() {
096                return comment;
097        }
098
099        public void setComment(String comment) {
100                this.comment = comment;
101        }
102
103        public String getDefinition() {
104                return definition;
105        }
106
107        public void setDefinition(String definition) {
108                this.definition = definition;
109        }
110
111        public boolean isDeterministic() {
112                return deterministic;
113        }
114
115        public void setDeterministic(boolean deterministic) {
116                this.deterministic = deterministic;
117        }
118
119        public String getDataAccess() {
120                return dataAccess;
121        }
122
123        public void setDataAccess(String dataAccess) {
124                this.dataAccess = dataAccess;
125        }
126
127        public String getSecurityType() {
128                return securityType;
129        }
130
131        public void setSecurityType(String securityType) {
132                this.securityType = securityType;
133        }
134
135        public String getSqlMode() {
136                return sqlMode;
137        }
138
139        public void setSqlMode(String sqlMode) {
140                this.sqlMode = sqlMode;
141        }
142
143        public Map<String, RoutineParameterTO> getRoutineParameterMap() {
144                return routineParameterMap;
145        }
146
147        public void setRoutineParameterMap(Map<String, RoutineParameterTO> routineParameterMap) {
148                this.routineParameterMap = routineParameterMap;
149        }
150
151        public Long getDataTypeLength() {
152                return dataTypeLength;
153        }
154
155        public void setDataTypeLength(Long dataTypeLength) {
156                this.dataTypeLength = dataTypeLength;
157        }
158
159        public Long getDataTypeNumericPrecision() {
160                return dataTypeNumericPrecision;
161        }
162
163        public void setDataTypeNumericPrecision(Long dataTypeNumericPrecision) {
164                this.dataTypeNumericPrecision = dataTypeNumericPrecision;
165        }
166
167        public Long getDataTypeNumericScale() {
168                return dataTypeNumericScale;
169        }
170
171        public void setDataTypeNumericScale(Long dataTypeNumericScale) {
172                this.dataTypeNumericScale = dataTypeNumericScale;
173        }
174
175        public Long getDataTypeDateTimePrecision() {
176                return dataTypeDateTimePrecision;
177        }
178
179        public void setDataTypeDateTimePrecision(Long dataTypeDateTimePrecision) {
180                this.dataTypeDateTimePrecision = dataTypeDateTimePrecision;
181        }
182
183}