View Javadoc
1   /*
2    * Copyright 2012-2025 CodeLibs Project 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.codelibs.fess.opensearch.config.bsentity.dbmeta;
17  
18  import java.time.LocalDateTime;
19  import java.util.List;
20  import java.util.Map;
21  
22  import org.codelibs.fess.opensearch.config.exentity.FileAuthentication;
23  import org.dbflute.Entity;
24  import org.dbflute.dbmeta.AbstractDBMeta;
25  import org.dbflute.dbmeta.info.ColumnInfo;
26  import org.dbflute.dbmeta.info.UniqueInfo;
27  import org.dbflute.dbmeta.name.TableSqlName;
28  import org.dbflute.dbmeta.property.PropertyGateway;
29  import org.dbflute.dbway.DBDef;
30  import org.dbflute.util.DfTypeUtil;
31  
32  /**
33   * @author ESFlute (using FreeGen)
34   */
35  public class FileAuthenticationDbm extends AbstractDBMeta {
36  
37      protected static final Class<?> suppressUnusedImportLocalDateTime = LocalDateTime.class;
38  
39      // ===================================================================================
40      //                                                                           Singleton
41      //                                                                           =========
42      private static final FileAuthenticationDbm _instance = new FileAuthenticationDbm();
43  
44      private FileAuthenticationDbm() {
45      }
46  
47      public static FileAuthenticationDbm getInstance() {
48          return _instance;
49      }
50  
51      // ===================================================================================
52      //                                                                       Current DBDef
53      //                                                                       =============
54      @Override
55      public String getProjectName() {
56          return null;
57      }
58  
59      @Override
60      public String getProjectPrefix() {
61          return null;
62      }
63  
64      @Override
65      public String getGenerationGapBasePrefix() {
66          return null;
67      }
68  
69      @Override
70      public DBDef getCurrentDBDef() {
71          return null;
72      }
73  
74      // ===================================================================================
75      //                                                                    Property Gateway
76      //                                                                    ================
77      // -----------------------------------------------------
78      //                                       Column Property
79      //                                       ---------------
80      protected final Map<String, PropertyGateway> _epgMap = newHashMap();
81      {
82          setupEpg(_epgMap, et -> ((FileAuthentication) et).getCreatedBy(),
83                  (et, vl) -> ((FileAuthentication) et).setCreatedBy(DfTypeUtil.toString(vl)), "createdBy");
84          setupEpg(_epgMap, et -> ((FileAuthentication) et).getCreatedTime(),
85                  (et, vl) -> ((FileAuthentication) et).setCreatedTime(DfTypeUtil.toLong(vl)), "createdTime");
86          setupEpg(_epgMap, et -> ((FileAuthentication) et).getFileConfigId(),
87                  (et, vl) -> ((FileAuthentication) et).setFileConfigId(DfTypeUtil.toString(vl)), "fileConfigId");
88          setupEpg(_epgMap, et -> ((FileAuthentication) et).getHostname(),
89                  (et, vl) -> ((FileAuthentication) et).setHostname(DfTypeUtil.toString(vl)), "hostname");
90          setupEpg(_epgMap, et -> ((FileAuthentication) et).getParameters(),
91                  (et, vl) -> ((FileAuthentication) et).setParameters(DfTypeUtil.toString(vl)), "parameters");
92          setupEpg(_epgMap, et -> ((FileAuthentication) et).getPassword(),
93                  (et, vl) -> ((FileAuthentication) et).setPassword(DfTypeUtil.toString(vl)), "password");
94          setupEpg(_epgMap, et -> ((FileAuthentication) et).getPort(),
95                  (et, vl) -> ((FileAuthentication) et).setPort(DfTypeUtil.toInteger(vl)), "port");
96          setupEpg(_epgMap, et -> ((FileAuthentication) et).getProtocolScheme(),
97                  (et, vl) -> ((FileAuthentication) et).setProtocolScheme(DfTypeUtil.toString(vl)), "protocolScheme");
98          setupEpg(_epgMap, et -> ((FileAuthentication) et).getUpdatedBy(),
99                  (et, vl) -> ((FileAuthentication) et).setUpdatedBy(DfTypeUtil.toString(vl)), "updatedBy");
100         setupEpg(_epgMap, et -> ((FileAuthentication) et).getUpdatedTime(),
101                 (et, vl) -> ((FileAuthentication) et).setUpdatedTime(DfTypeUtil.toLong(vl)), "updatedTime");
102         setupEpg(_epgMap, et -> ((FileAuthentication) et).getUsername(),
103                 (et, vl) -> ((FileAuthentication) et).setUsername(DfTypeUtil.toString(vl)), "username");
104     }
105 
106     @Override
107     public PropertyGateway findPropertyGateway(final String prop) {
108         return doFindEpg(_epgMap, prop);
109     }
110 
111     // ===================================================================================
112     //                                                                          Table Info
113     //                                                                          ==========
114     protected final String _tableDbName = "file_authentication";
115     protected final String _tableDispName = "file_authentication";
116     protected final String _tablePropertyName = "FileAuthentication";
117 
118     public String getTableDbName() {
119         return _tableDbName;
120     }
121 
122     @Override
123     public String getTableDispName() {
124         return _tableDispName;
125     }
126 
127     @Override
128     public String getTablePropertyName() {
129         return _tablePropertyName;
130     }
131 
132     @Override
133     public TableSqlName getTableSqlName() {
134         return null;
135     }
136 
137     // ===================================================================================
138     //                                                                         Column Info
139     //                                                                         ===========
140     protected final ColumnInfo _columnCreatedBy = cci("createdBy", "createdBy", null, null, String.class, "createdBy", null, false, false,
141             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
142     protected final ColumnInfo _columnCreatedTime = cci("createdTime", "createdTime", null, null, Long.class, "createdTime", null, false,
143             false, false, "Long", 0, 0, null, null, false, null, null, null, null, null, false);
144     protected final ColumnInfo _columnFileConfigId = cci("fileConfigId", "fileConfigId", null, null, String.class, "fileConfigId", null,
145             false, false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
146     protected final ColumnInfo _columnHostname = cci("hostname", "hostname", null, null, String.class, "hostname", null, false, false,
147             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
148     protected final ColumnInfo _columnParameters = cci("parameters", "parameters", null, null, String.class, "parameters", null, false,
149             false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
150     protected final ColumnInfo _columnPassword = cci("password", "password", null, null, String.class, "password", null, false, false,
151             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
152     protected final ColumnInfo _columnPort = cci("port", "port", null, null, Integer.class, "port", null, false, false, false, "Integer", 0,
153             0, null, null, false, null, null, null, null, null, false);
154     protected final ColumnInfo _columnProtocolScheme = cci("protocolScheme", "protocolScheme", null, null, String.class, "protocolScheme",
155             null, false, false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
156     protected final ColumnInfo _columnUpdatedBy = cci("updatedBy", "updatedBy", null, null, String.class, "updatedBy", null, false, false,
157             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
158     protected final ColumnInfo _columnUpdatedTime = cci("updatedTime", "updatedTime", null, null, Long.class, "updatedTime", null, false,
159             false, false, "Long", 0, 0, null, null, false, null, null, null, null, null, false);
160     protected final ColumnInfo _columnUsername = cci("username", "username", null, null, String.class, "username", null, false, false,
161             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
162 
163     public ColumnInfo columnCreatedBy() {
164         return _columnCreatedBy;
165     }
166 
167     public ColumnInfo columnCreatedTime() {
168         return _columnCreatedTime;
169     }
170 
171     public ColumnInfo columnFileConfigId() {
172         return _columnFileConfigId;
173     }
174 
175     public ColumnInfo columnHostname() {
176         return _columnHostname;
177     }
178 
179     public ColumnInfo columnParameters() {
180         return _columnParameters;
181     }
182 
183     public ColumnInfo columnPassword() {
184         return _columnPassword;
185     }
186 
187     public ColumnInfo columnPort() {
188         return _columnPort;
189     }
190 
191     public ColumnInfo columnProtocolScheme() {
192         return _columnProtocolScheme;
193     }
194 
195     public ColumnInfo columnUpdatedBy() {
196         return _columnUpdatedBy;
197     }
198 
199     public ColumnInfo columnUpdatedTime() {
200         return _columnUpdatedTime;
201     }
202 
203     public ColumnInfo columnUsername() {
204         return _columnUsername;
205     }
206 
207     protected List<ColumnInfo> ccil() {
208         List<ColumnInfo> ls = newArrayList();
209         ls.add(columnCreatedBy());
210         ls.add(columnCreatedTime());
211         ls.add(columnFileConfigId());
212         ls.add(columnHostname());
213         ls.add(columnParameters());
214         ls.add(columnPassword());
215         ls.add(columnPort());
216         ls.add(columnProtocolScheme());
217         ls.add(columnUpdatedBy());
218         ls.add(columnUpdatedTime());
219         ls.add(columnUsername());
220         return ls;
221     }
222 
223     // ===================================================================================
224     //                                                                         Unique Info
225     //                                                                         ===========
226     @Override
227     public boolean hasPrimaryKey() {
228         return false;
229     }
230 
231     @Override
232     public boolean hasCompoundPrimaryKey() {
233         return false;
234     }
235 
236     @Override
237     protected UniqueInfo cpui() {
238         return null;
239     }
240 
241     // ===================================================================================
242     //                                                                           Type Name
243     //                                                                           =========
244     @Override
245     public String getEntityTypeName() {
246         return "org.codelibs.fess.opensearch.config.exentity.FileAuthentication";
247     }
248 
249     @Override
250     public String getConditionBeanTypeName() {
251         return "org.codelibs.fess.opensearch.config.cbean.FileAuthenticationCB";
252     }
253 
254     @Override
255     public String getBehaviorTypeName() {
256         return "org.codelibs.fess.opensearch.config.exbhv.FileAuthenticationBhv";
257     }
258 
259     // ===================================================================================
260     //                                                                         Object Type
261     //                                                                         ===========
262     @Override
263     public Class<? extends Entity> getEntityType() {
264         return FileAuthentication.class;
265     }
266 
267     // ===================================================================================
268     //                                                                     Object Instance
269     //                                                                     ===============
270     @Override
271     public Entity newEntity() {
272         return new FileAuthentication();
273     }
274 
275     // ===================================================================================
276     //                                                                   Map Communication
277     //                                                                   =================
278     @Override
279     public void acceptPrimaryKeyMap(Entity entity, Map<String, ? extends Object> primaryKeyMap) {
280     }
281 
282     @Override
283     public void acceptAllColumnMap(Entity entity, Map<String, ? extends Object> allColumnMap) {
284     }
285 
286     @Override
287     public Map<String, Object> extractPrimaryKeyMap(Entity entity) {
288         return null;
289     }
290 
291     @Override
292     public Map<String, Object> extractAllColumnMap(Entity entity) {
293         return null;
294     }
295 }