package org.seasar.doma.it.entity;

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

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

    private static final _Emp2 __singleton = new _Emp2();

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

    /** the id */
    public final org.seasar.doma.jdbc.entity.AssignedIdPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.lang.Integer, java.lang.Object> $id = new org.seasar.doma.jdbc.entity.AssignedIdPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.lang.Integer, java.lang.Object>(org.seasar.doma.it.entity.Emp2.class, java.lang.Integer.class, org.seasar.doma.wrapper.IntegerWrapper.class, org.seasar.doma.it.entity._Emp.getSingletonInternal().$id, null, "id", "ID");

    /** the name */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.lang.String, java.lang.Object> $name = new org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.lang.String, java.lang.Object>(org.seasar.doma.it.entity.Emp2.class, java.lang.String.class, org.seasar.doma.wrapper.StringWrapper.class, org.seasar.doma.it.entity._Emp.getSingletonInternal().$name, null, "name", "NAME", true, true);

    /** the salary */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.math.BigDecimal, java.lang.Object> $salary = new org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.math.BigDecimal, java.lang.Object>(org.seasar.doma.it.entity.Emp2.class, java.math.BigDecimal.class, org.seasar.doma.wrapper.BigDecimalWrapper.class, org.seasar.doma.it.entity._Emp.getSingletonInternal().$salary, null, "salary", "SALARY", true, true);

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

    /** the insertTimestamp */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.sql.Timestamp, java.lang.Object> $insertTimestamp = new org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.sql.Timestamp, java.lang.Object>(org.seasar.doma.it.entity.Emp2.class, java.sql.Timestamp.class, org.seasar.doma.wrapper.TimestampWrapper.class, org.seasar.doma.it.entity._Emp.getSingletonInternal().$insertTimestamp, null, "insertTimestamp", "INSERT_TIMESTAMP", true, true);

    /** the updateTimestamp */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.sql.Timestamp, java.lang.Object> $updateTimestamp = new org.seasar.doma.jdbc.entity.BasicPropertyType<org.seasar.doma.it.entity.Emp, org.seasar.doma.it.entity.Emp2, java.sql.Timestamp, java.lang.Object>(org.seasar.doma.it.entity.Emp2.class, java.sql.Timestamp.class, org.seasar.doma.wrapper.TimestampWrapper.class, org.seasar.doma.it.entity._Emp.getSingletonInternal().$updateTimestamp, null, "updateTimestamp", "UPDATE_TIMESTAMP", true, true);

    /** the age */
    public final org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Emp2, java.lang.Integer, org.seasar.doma.it.domain.Age> $age = new org.seasar.doma.jdbc.entity.BasicPropertyType<java.lang.Object, org.seasar.doma.it.entity.Emp2, java.lang.Integer, org.seasar.doma.it.domain.Age>(org.seasar.doma.it.entity.Emp2.class, java.lang.Integer.class, org.seasar.doma.wrapper.IntegerWrapper.class, null, __.org.seasar.doma.it.domain._Age.getSingletonInternal(), "age", "AGE", true, true);

    private final org.seasar.doma.it.entity.EmpListener<org.seasar.doma.it.entity.Emp2> __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.Emp2, ?>> __idPropertyTypes;

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

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

    private _Emp2() {
        __listener = new org.seasar.doma.it.entity.EmpListener<org.seasar.doma.it.entity.Emp2>();
        __namingType = org.seasar.doma.jdbc.entity.NamingType.SNAKE_UPPER_CASE;
        __immutable = false;
        __name = "Emp2";
        __catalogName = "";
        __schemaName = "";
        __tableName = "EMP2";
        __qualifiedTableName = "EMP2";
        java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Emp2, ?>> __idList = new java.util.ArrayList<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Emp2, ?>>();
        java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Emp2, ?>> __list = new java.util.ArrayList<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Emp2, ?>>(7);
        java.util.Map<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Emp2, ?>> __map = new java.util.HashMap<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.Emp2, ?>>(7);
        __idList.add($id);
        __list.add($id);
        __map.put("id", $id);
        __list.add($name);
        __map.put("name", $name);
        __list.add($salary);
        __map.put("salary", $salary);
        __list.add($version);
        __map.put("version", $version);
        __list.add($insertTimestamp);
        __map.put("insertTimestamp", $insertTimestamp);
        __list.add($updateTimestamp);
        __map.put("updateTimestamp", $updateTimestamp);
        __list.add($age);
        __map.put("age", $age);
        __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.Emp2 entity, org.seasar.doma.jdbc.entity.PreInsertContext<org.seasar.doma.it.entity.Emp2> context) {
        __listener.preInsert(entity, context);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @Override
    public void saveCurrentStates(org.seasar.doma.it.entity.Emp2 __entity) {
        org.seasar.doma.it.entity.Emp2 __currentStates = new org.seasar.doma.it.entity.Emp2();
        $id.getWrapper(__currentStates).set($id.getWrapper(__entity).getCopy());
        $name.getWrapper(__currentStates).set($name.getWrapper(__entity).getCopy());
        $salary.getWrapper(__currentStates).set($salary.getWrapper(__entity).getCopy());
        $version.getWrapper(__currentStates).set($version.getWrapper(__entity).getCopy());
        $insertTimestamp.getWrapper(__currentStates).set($insertTimestamp.getWrapper(__entity).getCopy());
        $updateTimestamp.getWrapper(__currentStates).set($updateTimestamp.getWrapper(__entity).getCopy());
        $age.getWrapper(__currentStates).set($age.getWrapper(__entity).getCopy());
        __originalStatesAccessor.set(__entity, __currentStates);
    }

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

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

}
