/*
* Copyright 2012-2017 CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.codelibs.fess.es.config.bsentity.dbmeta;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import org.codelibs.fess.es.config.exentity.DataConfigToRole;
import org.dbflute.Entity;
import org.dbflute.dbmeta.AbstractDBMeta;
import org.dbflute.dbmeta.info.ColumnInfo;
import org.dbflute.dbmeta.info.UniqueInfo;
import org.dbflute.dbmeta.name.TableSqlName;
import org.dbflute.dbmeta.property.PropertyGateway;
import org.dbflute.dbway.DBDef;
import org.dbflute.util.DfTypeUtil;
/**
* @author ESFlute (using FreeGen)
*/
public class DataConfigToRoleDbm extends AbstractDBMeta {
protected static final Class<?> suppressUnusedImportLocalDateTime = LocalDateTime.class;
// ===================================================================================
// Singleton
// =========
private static final DataConfigToRoleDbm _instance = new DataConfigToRoleDbm();
private DataConfigToRoleDbm() {
}
public static DataConfigToRoleDbm getInstance() {
return _instance;
}
// ===================================================================================
// Current DBDef
// =============
@Override
public String getProjectName() {
return null;
}
@Override
public String getProjectPrefix() {
return null;
}
@Override
public String getGenerationGapBasePrefix() {
return null;
}
@Override
public DBDef getCurrentDBDef() {
return null;
}
// ===================================================================================
// Property Gateway
// ================
// -----------------------------------------------------
// Column Property
// ---------------
protected final Map<String, PropertyGateway> _epgMap = newHashMap();
{
setupEpg(_epgMap, et -> ((DataConfigToRole) et).getDataConfigId(),
(et, vl) -> ((DataConfigToRole) et).setDataConfigId(DfTypeUtil.toString(vl)), "dataConfigId");
setupEpg(_epgMap, et -> ((DataConfigToRole) et).getRoleTypeId(),
(et, vl) -> ((DataConfigToRole) et).setRoleTypeId(DfTypeUtil.toString(vl)), "roleTypeId");
}
@Override
public PropertyGateway findPropertyGateway(final String prop) {
return doFindEpg(_epgMap, prop);
}
// ===================================================================================
// Table Info
// ==========
protected final String _tableDbName = "data_config_to_role";
protected final String _tableDispName = "data_config_to_role";
protected final String _tablePropertyName = "DataConfigToRole";
public String getTableDbName() {
return _tableDbName;
}
@Override
public String getTableDispName() {
return _tableDispName;
}
@Override
public String getTablePropertyName() {
return _tablePropertyName;
}
@Override
public TableSqlName getTableSqlName() {
return null;
}
// ===================================================================================
// Column Info
// ===========
protected final ColumnInfo _columnDataConfigId = cci("dataConfigId", "dataConfigId", null, null, String.class, "dataConfigId", null,
false, false, false, "keyword", 0, 0, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnRoleTypeId = cci("roleTypeId", "roleTypeId", null, null, String.class, "roleTypeId", null, false,
false, false, "keyword", 0, 0, null, false, null, null, null, null, null, false);
public ColumnInfo columnDataConfigId() {
return _columnDataConfigId;
}
public ColumnInfo columnRoleTypeId() {
return _columnRoleTypeId;
}
protected List<ColumnInfo> ccil() {
List<ColumnInfo> ls = newArrayList();
ls.add(columnDataConfigId());
ls.add(columnRoleTypeId());
return ls;
}
// ===================================================================================
// Unique Info
// ===========
@Override
public boolean hasPrimaryKey() {
return false;
}
@Override
public boolean hasCompoundPrimaryKey() {
return false;
}
@Override
protected UniqueInfo cpui() {
return null;
}
// ===================================================================================
// Type Name
// =========
@Override
public String getEntityTypeName() {
return "org.codelibs.fess.es.config.exentity.DataConfigToRole";
}
@Override
public String getConditionBeanTypeName() {
return "org.codelibs.fess.es.config.cbean.DataConfigToRoleCB";
}
@Override
public String getBehaviorTypeName() {
return "org.codelibs.fess.es.config.exbhv.DataConfigToRoleBhv";
}
// ===================================================================================
// Object Type
// ===========
@Override
public Class<? extends Entity> getEntityType() {
return DataConfigToRole.class;
}
// ===================================================================================
// Object Instance
// ===============
@Override
public Entity newEntity() {
return new DataConfigToRole();
}
// ===================================================================================
// Map Communication
// =================
@Override
public void acceptPrimaryKeyMap(Entity entity, Map<String, ? extends Object> primaryKeyMap) {
}
@Override
public void acceptAllColumnMap(Entity entity, Map<String, ? extends Object> allColumnMap) {
}
@Override
public Map<String, Object> extractPrimaryKeyMap(Entity entity) {
return null;
}
@Override
public Map<String, Object> extractAllColumnMap(Entity entity) {
return null;
}
}