Package com.killcoding.datasource
Class IdentityCard
java.lang.Object
com.killcoding.datasource.IdentityCard
CREATE TABLE identity_card (
id CHAR(16),
identity_name VARCHAR(200),
identity_value BIGINT,
generate_task_id CHAR(16),
created_user_id CHAR(16),
updated_user_id CHAR(16),
deleted_user_id CHAR(16),
created_at DATETIME(6),
updated_at DATETIME(6),
deleted_at DATETIME(6),
deleted TINYINT(1)
) ENGINE=InnoDB;
ALTER TABLE identity_card ADD PRIMARY KEY (id);
ALTER TABLE identity_card ADD UNIQUE INDEX idx_idcard_unique_idname (identity_name);
ALTER TABLE identity_card ADD INDEX idx_idcard_deleted (deleted);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Fileprivate static ConfigPropertiesprivate static DriverDataSourceprivate static Stringprivate CacheDriverExecutorprivate static booleanprivate Stringprivate Stringprivate Loggerprivate static Longprivate static Longprivate static Longprivate static Longprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static Integerprivate static Integerprivate static Stringprivate static Longprivate Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate Objectcreate()first()generateId(int length) generateId(int length, String prefix) generateId(int length, String prefix, String delimiter, int randomSuffixLength) static ConfigPropertiesstatic DriverDataSourceprivate LonggetMaxValueForLength(int length) private voidinit()private voidinitConn()private voidprivate voidreload()private voidprivate voidresetForce(Object id) voidprivate boolean
-
Field Details
-
CURRENT_VALUES
-
STEP_LAST_VALUES
-
SQL_INSERT
- See Also:
-
SQL_UPDATE
- See Also:
-
SQL_RESET
- See Also:
-
SQL_RESET_FORCE
- See Also:
-
SQL_CLEAR
- See Also:
-
SQL_FIRST
- See Also:
-
SQL_FIRST_BY_GENERATE_TASK_ID
- See Also:
-
APP_IDENTITY_CARD
-
log
-
driverExecutor
-
MAX_VALUE_LIMITED
-
MIN_VALUE_LIMITED
-
STEP_VALUE_LIMITED
-
enable
-
configProperties
-
dataSource
-
dataSourcePath
-
tableName
-
timeout
-
maxValue
-
minValue
-
stepValue
-
identityName
-
generateTaskId
-
userId
-
-
Constructor Details
-
IdentityCard
-
-
Method Details
-
initValues
-
initConn
- Throws:
SQLException
-
generateId
- Throws:
SQLException
-
generateIdForNextStep
- Throws:
SQLException
-
generateId
- Throws:
SQLException
-
generateId
- Throws:
SQLException
-
generateId
public String generateId(int length, String prefix, String delimiter, int randomSuffixLength) throws SQLException - Throws:
SQLException
-
init
-
reload
-
update
- Throws:
SQLException
-
clear
- Throws:
SQLException
-
reset
- Throws:
SQLException
-
resetForce
- Throws:
SQLException
-
create
- Throws:
SQLException
-
first
- Throws:
SQLException
-
firstByGenerateTaskId
- Throws:
SQLException
-
getMaxValueForLength
-
getDataSource
-
formatSql
-
formatSql
-
setUserId
-
getUserId
-
getIdentityName
-
getConfigProperties
-