package org.seasar.doma.it.entity;

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

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

    private static final _IdentityStrategy __singleton = new _IdentityStrategy();

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

    private final org.seasar.doma.jdbc.id.BuiltinIdentityIdGenerator __idGenerator = new org.seasar.doma.jdbc.id.BuiltinIdentityIdGenerator();

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

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

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

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

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

    private _IdentityStrategy() {
        __listener = new org.seasar.doma.jdbc.entity.NullEntityListener<org.seasar.doma.it.entity.IdentityStrategy>();
        __namingType = org.seasar.doma.jdbc.entity.NamingType.SNAKE_UPPER_CASE;
        __immutable = false;
        __name = "IdentityStrategy";
        __catalogName = "";
        __schemaName = "";
        __tableName = "IDENTITY_STRATEGY";
        __qualifiedTableName = "IDENTITY_STRATEGY";
        java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.IdentityStrategy, ?>> __idList = new java.util.ArrayList<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.IdentityStrategy, ?>>();
        java.util.List<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.IdentityStrategy, ?>> __list = new java.util.ArrayList<org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.IdentityStrategy, ?>>(2);
        java.util.Map<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.IdentityStrategy, ?>> __map = new java.util.HashMap<String, org.seasar.doma.jdbc.entity.EntityPropertyType<org.seasar.doma.it.entity.IdentityStrategy, ?>>(2);
        __idList.add($id);
        __list.add($id);
        __map.put("id", $id);
        __list.add($value);
        __map.put("value", $value);
        __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.IdentityStrategy entity, org.seasar.doma.jdbc.entity.PreInsertContext<org.seasar.doma.it.entity.IdentityStrategy> context) {
        __listener.preInsert(entity, context);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @Override
    public void saveCurrentStates(org.seasar.doma.it.entity.IdentityStrategy __entity) {
        org.seasar.doma.it.entity.IdentityStrategy __currentStates = new org.seasar.doma.it.entity.IdentityStrategy();
        $id.getWrapper(__currentStates).set($id.getWrapper(__entity).getCopy());
        $value.getWrapper(__currentStates).set($value.getWrapper(__entity).getCopy());
        __originalStatesAccessor.set(__entity, __currentStates);
    }

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

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

}
