package org.seasar.doma.it.entity;

/** */
@javax.annotation.Generated(value = { "Doma", "1.36.0-SNAPSHOT" }, date = "2022-09-08T03:50:44.085+0900")
public final class _Department extends org.seasar.doma.jdbc.entity.AbstractEntityType<org.seasar.doma.it.entity.Department> {

    static {
        org.seasar.doma.internal.Artifact.validateVersion("1.36.0-SNAPSHOT");
    }

    private static final _Department __singleton = new _Department();

    private static final org.seasar.doma.jdbc.entity.OriginalStatesAccessor<org.seasar.doma.it.entity.Department> __originalStatesAccessor = new org.seasar.doma.jdbc.entity.OriginalStatesAccessor<org.seasar.doma.it.entity.Department>(org.seasar.doma.it.entity.Department.class, "originalStates");

    /** the departmentId */
    public final org.seasar.doma.jdbc.entity.AssignedIdPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.Integer, org.seasar.doma.it.domain.Identity<org.seasar.doma.it.entity.Department>> $departmentId = new org.seasar.doma.jdbc.entity.AssignedIdPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.Integer, org.seasar.doma.it.domain.Identity<org.seasar.doma.it.entity.Department>>(org.seasar.doma.it.entity.Department.class, java.lang.Integer.class, org.seasar.doma.wrapper.IntegerWrapper.class, null, org.seasar.doma.it.domain._Identity.<org.seasar.doma.it.entity.Department>getSingletonInternal(), "departmentId", "DEPARTMENT_ID");

    /** the departmentNo */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.Integer, java.lang.Object> $departmentNo = new org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.Integer, java.lang.Object>(org.seasar.doma.it.entity.Department.class, java.lang.Integer.class, org.seasar.doma.wrapper.IntegerWrapper.class, null, null, "departmentNo", "DEPARTMENT_NO", true, true);

    /** the departmentName */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.String, java.lang.Object> $departmentName = new org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.String, java.lang.Object>(org.seasar.doma.it.entity.Department.class, java.lang.String.class, org.seasar.doma.wrapper.StringWrapper.class, null, null, "departmentName", "DEPARTMENT_NAME", true, true);

    /** the location */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.String, org.seasar.doma.it.domain.Location<org.seasar.doma.it.entity.Department>> $location = new org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.String, org.seasar.doma.it.domain.Location<org.seasar.doma.it.entity.Department>>(org.seasar.doma.it.entity.Department.class, java.lang.String.class, org.seasar.doma.wrapper.StringWrapper.class, null, __.org.seasar.doma.it.domain._Location.<org.seasar.doma.it.entity.Department>getSingletonInternal(), "location", "LOCATION", true, true);

    /** the version */
    public final org.seasar.doma.jdbc.entity.VersionPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.Integer, java.lang.Object> $version = new org.seasar.doma.jdbc.entity.VersionPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, java.lang.Integer, java.lang.Object>(org.seasar.doma.it.entity.Department.class, java.lang.Integer.class, org.seasar.doma.wrapper.IntegerWrapper.class, null, null, "version", "VERSION");

    private final org.seasar.doma.jdbc.entity.NullEntityListener<org.seasar.doma.it.entity.Department> __listener;

    private final org.seasar.doma.jdbc.entity.NamingType __namingType;

    private final boolean __immutable;

    private final String __catalogName;

    private final String __schemaName;

    private final String __tableName;

    private final String __qualifiedTableName;

    private final String __name;

    private final java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> __idPropertyTypes;

    private final java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> __entityPropertyTypes;

    private final java.util.Map<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> __entityPropertyTypeMap;

    private _Department() {
        __listener = new org.seasar.doma.jdbc.entity.NullEntityListener<org.seasar.doma.it.entity.Department>();
        __namingType = org.seasar.doma.jdbc.entity.NamingType.SNAKE_UPPER_CASE;
        __immutable = false;
        __name = "Department";
        __catalogName = "";
        __schemaName = "";
        __tableName = "DEPARTMENT";
        __qualifiedTableName = "DEPARTMENT";
        java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> __idList = new java.util.ArrayList<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>>();
        java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> __list = new java.util.ArrayList<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>>(5);
        java.util.Map<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> __map = new java.util.HashMap<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>>(5);
        __idList.add($departmentId);
        __list.add($departmentId);
        __map.put("departmentId", $departmentId);
        __list.add($departmentNo);
        __map.put("departmentNo", $departmentNo);
        __list.add($departmentName);
        __map.put("departmentName", $departmentName);
        __list.add($location);
        __map.put("location", $location);
        __list.add($version);
        __map.put("version", $version);
        __idPropertyTypes = java.util.Collections.unmodifiableList(__idList);
        __entityPropertyTypes = java.util.Collections.unmodifiableList(__list);
        __entityPropertyTypeMap = java.util.Collections.unmodifiableMap(__map);
    }

    @Override
    public org.seasar.doma.jdbc.entity.NamingType getNamingType() {
        return __namingType;
    }

    @Override
    public boolean isImmutable() {
        return __immutable;
    }

    @Override
    public String getName() {
        return __name;
    }

    @Override
    public String getCatalogName() {
        return __catalogName;
    }

    @Override
    public String getSchemaName() {
        return __schemaName;
    }

    @Override
    public String getTableName() {
        return __tableName;
    }

    @Override
    public String getQualifiedTableName() {
        return __qualifiedTableName;
    }

    @Override
    public void preInsert(org.seasar.doma.it.entity.Department entity, org.seasar.doma.jdbc.entity.PreInsertContext<org.seasar.doma.it.entity.Department> context) {
        __listener.preInsert(entity, context);
    }

    @Override
    public void preUpdate(org.seasar.doma.it.entity.Department entity, org.seasar.doma.jdbc.entity.PreUpdateContext<org.seasar.doma.it.entity.Department> context) {
        __listener.preUpdate(entity, context);
    }

    @Override
    public void preDelete(org.seasar.doma.it.entity.Department entity, org.seasar.doma.jdbc.entity.PreDeleteContext<org.seasar.doma.it.entity.Department> context) {
        __listener.preDelete(entity, context);
    }

    @Override
    public void postInsert(org.seasar.doma.it.entity.Department entity, org.seasar.doma.jdbc.entity.PostInsertContext<org.seasar.doma.it.entity.Department> context) {
        __listener.postInsert(entity, context);
    }

    @Override
    public void postUpdate(org.seasar.doma.it.entity.Department entity, org.seasar.doma.jdbc.entity.PostUpdateContext<org.seasar.doma.it.entity.Department> context) {
        __listener.postUpdate(entity, context);
    }

    @Override
    public void postDelete(org.seasar.doma.it.entity.Department entity, org.seasar.doma.jdbc.entity.PostDeleteContext<org.seasar.doma.it.entity.Department> context) {
        __listener.postDelete(entity, context);
    }

    @Override
    public java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> getEntityPropertyTypes() {
        return __entityPropertyTypes;
    }

    @Override
    public org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?> getEntityPropertyType(String __name) {
        return __entityPropertyTypeMap.get(__name);
    }

    @Override
    public java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Department, ?>> getIdPropertyTypes() {
        return __idPropertyTypes;
    }

    @Override
    public org.seasar.doma.jdbc.entity.GeneratedIdPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, ?, ?> getGeneratedIdPropertyType() {
        return null;
    }

    @Override
    public org.seasar.doma.jdbc.entity.VersionPropertyType<java.lang.Object, org.seasar.doma.it.entity.Department, ?, ?> getVersionPropertyType() {
        return $version;
    }

    @Override
    public org.seasar.doma.it.entity.Department newEntity() {
        return new org.seasar.doma.it.entity.Department();
    }

    @Override
    public org.seasar.doma.it.entity.Department newEntity(java.util.Map<String, Object> __args) {
        return new org.seasar.doma.it.entity.Department();
    }

    @Override
    public Class<org.seasar.doma.it.entity.Department> getEntityClass() {
        return org.seasar.doma.it.entity.Department.class;
    }

    @Override
    public org.seasar.doma.it.entity.Department getOriginalStates(org.seasar.doma.it.entity.Department __entity) {
        return __originalStatesAccessor.get(__entity);
    }

    @Override
    public void saveCurrentStates(org.seasar.doma.it.entity.Department __entity) {
        org.seasar.doma.it.entity.Department __currentStates = new org.seasar.doma.it.entity.Department();
        $departmentId.getWrapper(__currentStates).set($departmentId.getWrapper(__entity).getCopy());
        $departmentNo.getWrapper(__currentStates).set($departmentNo.getWrapper(__entity).getCopy());
        $departmentName.getWrapper(__currentStates).set($departmentName.getWrapper(__entity).getCopy());
        $location.getWrapper(__currentStates).set($location.getWrapper(__entity).getCopy());
        $version.getWrapper(__currentStates).set($version.getWrapper(__entity).getCopy());
        __originalStatesAccessor.set(__entity, __currentStates);
    }

    /**
     * @return the singleton
     */
    public static _Department getSingletonInternal() {
        return __singleton;
    }

    /**
     * @return the new instance
     */
    public static _Department newInstance() {
        return new _Department();
    }

}
