This is a cache of https://fess.codelibs.org/xref/org/codelibs/fess/es/config/bsentity/dbmeta/BadWordDbm.html. It is a snapshot of the page at 2020-10-25T01:19:06.857+0000.
BadWordDbm xref
View Javadoc
1   /*
2    * Copyright 2012-2020 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.es.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.es.config.exentity.BadWord;
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 BadWordDbm extends AbstractDBMeta {
36  
37      protected static final Class<?&gt; suppressUnusedImportLocalDateTime = LocalDateTime.class;
38  
39      // ===================================================================================
40      //                                                                           Singleton
41      //                                                                           =========
42      private static final BadWordDbmg/bsentity/dbmeta/BadWordDbm.html#BadWordDbm">BadWordDbm _instance = new BadWordDbm();
43  
44      private BadWordDbm() {
45      }
46  
47      public static BadWordDbm 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&gt; _epgMap = newHashMap();
81      {
82          setupEpg(_epgMap, et -&gt; ((BadWordlibs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getCreatedBy(), (et, vl) -&gt; ((BadWord) et).setCreatedBy(DfTypeUtil.toString(vl)),
83                  "createdBy");
84          setupEpg(_epgMap, et -&gt; ((BadWordbs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getCreatedTime(), (et, vl) -&gt; ((BadWord) et).setCreatedTime(DfTypeUtil.toLong(vl)),
85                  "createdTime");
86          setupEpg(_epgMap, et -&gt; ((BadWordbs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getSuggestWord(), (et, vl) -&gt; ((BadWord) et).setSuggestWord(DfTypeUtil.toString(vl)),
87                  "suggestWord");
88          setupEpg(_epgMap, et -&gt; ((BadWordbs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getTargetLabel(), (et, vl) -&gt; ((BadWord) et).setTargetLabel(DfTypeUtil.toString(vl)),
89                  "targetLabel");
90          setupEpg(_epgMap, et -&gt; ((BadWordibs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getTargetRole(), (et, vl) -&gt; ((BadWord) et).setTargetRole(DfTypeUtil.toString(vl)),
91                  "targetRole");
92          setupEpg(_epgMap, et -&gt; ((BadWordlibs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getUpdatedBy(), (et, vl) -&gt; ((BadWord) et).setUpdatedBy(DfTypeUtil.toString(vl)),
93                  "updatedBy");
94          setupEpg(_epgMap, et -&gt; ((BadWordbs/fess/es/config/exentity/BadWord.html#BadWord">BadWord) et).getUpdatedTime(), (et, vl) -&gt; ((BadWord) et).setUpdatedTime(DfTypeUtil.toLong(vl)),
95                  "updatedTime");
96      }
97  
98      @Override
99      public Propertygateway findPropertygateway(final String prop) {
100         return doFindEpg(_epgMap, prop);
101     }
102 
103     // ===================================================================================
104     //                                                                          Table Info
105     //                                                                          ==========
106     protected final String _tableDbName = "bad_word";
107     protected final String _tableDispName = "bad_word";
108     protected final String _tablePropertyName = "BadWord";
109 
110     public String getTableDbName() {
111         return _tableDbName;
112     }
113 
114     @Override
115     public String getTableDispName() {
116         return _tableDispName;
117     }
118 
119     @Override
120     public String getTablePropertyName() {
121         return _tablePropertyName;
122     }
123 
124     @Override
125     public TableSqlName getTableSqlName() {
126         return null;
127     }
128 
129     // ===================================================================================
130     //                                                                         Column Info
131     //                                                                         ===========
132     protected final ColumnInfo _columnCreatedBy = cci("createdBy", "createdBy", null, null, String.class, "createdBy", null, false, false,
133             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
134     protected final ColumnInfo _columnCreatedTime = cci("createdTime", "createdTime", null, null, Long.class, "createdTime", null, false,
135             false, false, "Long", 0, 0, null, null, false, null, null, null, null, null, false);
136     protected final ColumnInfo _columnSuggestWord = cci("suggestWord", "suggestWord", null, null, String.class, "suggestWord", null, false,
137             false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
138     protected final ColumnInfo _columnTargetLabel = cci("targetLabel", "targetLabel", null, null, String.class, "targetLabel", null, false,
139             false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
140     protected final ColumnInfo _columnTargetRole = cci("targetRole", "targetRole", null, null, String.class, "targetRole", null, false,
141             false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
142     protected final ColumnInfo _columnUpdatedBy = cci("updatedBy", "updatedBy", null, null, String.class, "updatedBy", null, false, false,
143             false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
144     protected final ColumnInfo _columnUpdatedTime = cci("updatedTime", "updatedTime", null, null, Long.class, "updatedTime", null, false,
145             false, false, "Long", 0, 0, null, null, false, null, null, null, null, null, false);
146 
147     public ColumnInfo columnCreatedBy() {
148         return _columnCreatedBy;
149     }
150 
151     public ColumnInfo columnCreatedTime() {
152         return _columnCreatedTime;
153     }
154 
155     public ColumnInfo columnSuggestWord() {
156         return _columnSuggestWord;
157     }
158 
159     public ColumnInfo columnTargetLabel() {
160         return _columnTargetLabel;
161     }
162 
163     public ColumnInfo columnTargetRole() {
164         return _columnTargetRole;
165     }
166 
167     public ColumnInfo columnUpdatedBy() {
168         return _columnUpdatedBy;
169     }
170 
171     public ColumnInfo columnUpdatedTime() {
172         return _columnUpdatedTime;
173     }
174 
175     protected List<ColumnInfo&gt; ccil() {
176         List<ColumnInfo&gt; ls = newArrayList();
177         ls.add(columnCreatedBy());
178         ls.add(columnCreatedTime());
179         ls.add(columnSuggestWord());
180         ls.add(columnTargetLabel());
181         ls.add(columnTargetRole());
182         ls.add(columnUpdatedBy());
183         ls.add(columnUpdatedTime());
184         return ls;
185     }
186 
187     // ===================================================================================
188     //                                                                         Unique Info
189     //                                                                         ===========
190     @Override
191     public boolean hasPrimaryKey() {
192         return false;
193     }
194 
195     @Override
196     public boolean hasCompoundPrimaryKey() {
197         return false;
198     }
199 
200     @Override
201     protected UniqueInfo cpui() {
202         return null;
203     }
204 
205     // ===================================================================================
206     //                                                                           Type Name
207     //                                                                           =========
208     @Override
209     public String getEntityTypeName() {
210         return "org.codelibs.fess.es.config.exentity.BadWord";
211     }
212 
213     @Override
214     public String getConditionBeanTypeName() {
215         return "org.codelibs.fess.es.config.cbean.BadWordCB";
216     }
217 
218     @Override
219     public String getBehaviorTypeName() {
220         return "org.codelibs.fess.es.config.exbhv.BadWordBhv";
221     }
222 
223     // ===================================================================================
224     //                                                                         Object Type
225     //                                                                         ===========
226     @Override
227     public Class<? extends Entity&gt; getEntityType() {
228         return BadWord.class;
229     }
230 
231     // ===================================================================================
232     //                                                                     Object Instance
233     //                                                                     ===============
234     @Override
235     public Entity newEntity() {
236         return new BadWord();
237     }
238 
239     // ===================================================================================
240     //                                                                   Map Communication
241     //                                                                   =================
242     @Override
243     public void acceptPrimaryKeyMap(Entity entity, Map<String, ? extends Object&gt; primaryKeyMap) {
244     }
245 
246     @Override
247     public void acceptAllColumnMap(Entity entity, Map<String, ? extends Object&gt; allColumnMap) {
248     }
249 
250     @Override
251     public Map<String, Object&gt; extractPrimaryKeyMap(Entity entity) {
252         return null;
253     }
254 
255     @Override
256     public Map<String, Object&gt; extractAllColumnMap(Entity entity) {
257         return null;
258     }
259 }