├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── LICENSE ├── brief-common ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ ├── anno │ │ ├── BaseModel.java │ │ ├── BaseUnique.java │ │ ├── ColName.java │ │ ├── EnumValue.java │ │ ├── NoneCol.java │ │ ├── derive │ │ │ ├── Blur.java │ │ │ ├── EmailBlur.java │ │ │ ├── IdCardBlur.java │ │ │ ├── JsonColumn.java │ │ │ ├── PhoneNumBlur.java │ │ │ ├── StringBlur.java │ │ │ └── flag │ │ │ │ ├── DeriveFlag.java │ │ │ │ ├── DeriveInfo.java │ │ │ │ ├── DeriveMark.java │ │ │ │ ├── IsDel.java │ │ │ │ ├── NormalDeriveInfo.java │ │ │ │ ├── RowStatus.java │ │ │ │ ├── ShardingStrategyMark.java │ │ │ │ └── Version.java │ │ ├── fun │ │ │ ├── noneparam │ │ │ │ ├── math │ │ │ │ │ └── Rand.java │ │ │ │ └── time │ │ │ │ │ ├── Curdate.java │ │ │ │ │ ├── CurrentDate.java │ │ │ │ │ ├── CurrentTime.java │ │ │ │ │ ├── Curtime.java │ │ │ │ │ ├── Now.java │ │ │ │ │ └── UnixTimestamp.java │ │ │ ├── params │ │ │ │ ├── CaseWhen.java │ │ │ │ ├── If.java │ │ │ │ ├── IfEq.java │ │ │ │ ├── IfGt.java │ │ │ │ ├── IfGte.java │ │ │ │ ├── IfLt.java │ │ │ │ ├── IfLte.java │ │ │ │ ├── IfNeq.java │ │ │ │ ├── IfNotNull.java │ │ │ │ ├── IfNull.java │ │ │ │ ├── Left.java │ │ │ │ ├── Right.java │ │ │ │ ├── math │ │ │ │ │ ├── Abs.java │ │ │ │ │ ├── Ceil.java │ │ │ │ │ ├── Floor.java │ │ │ │ │ ├── Mod.java │ │ │ │ │ ├── Round.java │ │ │ │ │ └── Truncate.java │ │ │ │ ├── time │ │ │ │ │ ├── DateFormat.java │ │ │ │ │ ├── Dayname.java │ │ │ │ │ ├── FromDays.java │ │ │ │ │ ├── Hour.java │ │ │ │ │ ├── Makedate.java │ │ │ │ │ ├── Maketime.java │ │ │ │ │ ├── Minute.java │ │ │ │ │ ├── Month.java │ │ │ │ │ ├── Monthname.java │ │ │ │ │ ├── SecToTime.java │ │ │ │ │ ├── StrToDate.java │ │ │ │ │ ├── TimeFormat.java │ │ │ │ │ ├── TimeToSec.java │ │ │ │ │ ├── ToDays.java │ │ │ │ │ ├── Week.java │ │ │ │ │ ├── Weekday.java │ │ │ │ │ └── Year.java │ │ │ │ └── varchar │ │ │ │ │ ├── CharLength.java │ │ │ │ │ ├── Concat.java │ │ │ │ │ ├── ConcatWs.java │ │ │ │ │ ├── GroupConcat.java │ │ │ │ │ ├── LTrim.java │ │ │ │ │ ├── Length.java │ │ │ │ │ ├── Lower.java │ │ │ │ │ ├── RTrim.java │ │ │ │ │ ├── Repeat.java │ │ │ │ │ ├── Replace.java │ │ │ │ │ ├── Strcmp.java │ │ │ │ │ ├── SubString.java │ │ │ │ │ ├── Trim.java │ │ │ │ │ └── Upper.java │ │ │ └── parse │ │ │ │ ├── FunAnnoParser.java │ │ │ │ └── ParseSqlFunResult.java │ │ └── internal │ │ │ └── NotNull.java │ │ ├── briefstate │ │ └── BriefCommonComponentStates.java │ │ ├── constants │ │ ├── ConfigPropertiesConstants.java │ │ └── ModelHelpperConstants.java │ │ ├── context │ │ ├── BriefContext.java │ │ ├── BriefContextAware.java │ │ ├── BriefContextPostProcessor.java │ │ ├── BriefProperties.java │ │ ├── BriefPropertiesLoader.java │ │ ├── ConditionInterceptor.java │ │ ├── DeriveInfoLoader.java │ │ ├── Interceptor.java │ │ ├── JqlInterceptor.java │ │ └── JqlInterceptorLoader.java │ │ ├── core │ │ ├── BaseSQLInfo.java │ │ ├── BaseSQLStatement.java │ │ ├── ConvertProxy.java │ │ ├── Id.java │ │ ├── KeyGenerate.java │ │ ├── Limit.java │ │ ├── UniqueKeyGenerate.java │ │ └── gkey │ │ │ ├── AtoIncrementSequenceKey.java │ │ │ ├── SnowflakeKey.java │ │ │ ├── UUIDKey.java │ │ │ └── VoidKey.java │ │ ├── exception │ │ ├── BaseException.java │ │ ├── BriefException.java │ │ ├── BriefTransactionException.java │ │ ├── ClassNotFindException.java │ │ ├── ConnectionException.java │ │ ├── EnumValueException.java │ │ ├── FindColException.java │ │ ├── GetColValueException.java │ │ ├── JdbcException.java │ │ ├── NewInstanceException.java │ │ ├── ParseDataSourceException.java │ │ ├── ParseModelException.java │ │ ├── ParseParamException.java │ │ ├── ParseResultSetException.java │ │ ├── ParseTableException.java │ │ ├── PrimaryKeyNotFoundException.java │ │ ├── QueryDataException.java │ │ ├── ShardingConfigExecException.java │ │ ├── SqlAesProcessException.java │ │ ├── SqlParseException.java │ │ ├── StopExecException.java │ │ └── UpdateFieldsException.java │ │ ├── filter │ │ ├── Filter.java │ │ ├── JqlExecutorChain.java │ │ ├── JqlExecutorFilter.java │ │ ├── JqlFunFilter.java │ │ ├── JqlMetaInfo.java │ │ └── impl │ │ │ └── AsSqlFunFilterImpl.java │ │ ├── fun │ │ ├── CategoryTag.java │ │ ├── Condition.java │ │ ├── ConditionContext.java │ │ ├── ConditionTag.java │ │ ├── ConstructorFun.java │ │ ├── G4GetterFun.java │ │ ├── G5GetterFun.java │ │ ├── GGGetterFun.java │ │ ├── GGetterFun.java │ │ ├── GetterFun.java │ │ └── ShardingCondition.java │ │ ├── jdbc │ │ ├── DataSourceExecutor.java │ │ ├── JdbcExecutor.java │ │ ├── JdbcExecutorFactory.java │ │ ├── JdbcExecutorMetadata.java │ │ ├── ModifyExecutor.java │ │ ├── QueryExecutor.java │ │ ├── ResultSetExecutor.java │ │ └── SaveExecutor.java │ │ ├── mapper │ │ └── BaseMapper.java │ │ ├── parser │ │ ├── MarkConditionParser.java │ │ ├── StatementParser.java │ │ └── TableInfoParser.java │ │ └── utils │ │ ├── Assert.java │ │ ├── BlurUtils.java │ │ ├── ByteBuddyUtils.java │ │ ├── CglibProxyProcess.java │ │ ├── CglibProxyUtils.java │ │ ├── ColNameAndColValueUtils.java │ │ ├── ColNameAnnoInfo.java │ │ ├── ColumnInfo.java │ │ ├── ColumnLabel.java │ │ ├── CommonExecutor.java │ │ ├── DBType.java │ │ ├── DBTypeLabel.java │ │ ├── DeriveProcessFire.java │ │ ├── EnumValueUtils.java │ │ ├── FieldNameAnnoInfo.java │ │ ├── FutureLock.java │ │ ├── Getter.java │ │ ├── GsonUtils.java │ │ ├── JdkProxyUtils.java │ │ ├── LambdaCreateUtils.java │ │ ├── Lists.java │ │ ├── ModelFieldInfo.java │ │ ├── ModelFieldInfoPosition.java │ │ ├── ModelInfo.java │ │ ├── NetUtils.java │ │ ├── Newc.java │ │ ├── ProxyProcess.java │ │ ├── ReflectionUtils.java │ │ ├── SQLType.java │ │ ├── Setter.java │ │ ├── SoftCache.java │ │ ├── SqlColInfo.java │ │ ├── TableHelper.java │ │ ├── TableInfo.java │ │ └── Utils.java │ └── resources │ └── log4j.properties ├── brief-core ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── javaoffers │ └── brief │ └── modelhelper │ ├── context │ ├── SmartBriefContext.java │ ├── SmartBriefProperties.java │ └── SmartTableInfoParser.java │ ├── core │ ├── BaseBrief.java │ ├── BaseBriefImpl.java │ ├── BaseBriefImplAdapter.java │ ├── CrudMapperConstant.java │ ├── CrudMapperMethodExcutor.java │ ├── CrudMapperMethodThreadLocal.java │ ├── CrudSQLStatement.java │ ├── LinkedConditions.java │ ├── MysqlStatementParser.java │ ├── SQL.java │ ├── SQLParse.java │ ├── SmartSQLInfo.java │ ├── StatementParserAdepter.java │ └── parse │ │ ├── AbstractParseCondition.java │ │ ├── DeleteConditionParse.java │ │ ├── InsertConditionParse.java │ │ ├── ParseCondition.java │ │ ├── SelectConditionParse.java │ │ └── UpdateConditionParse.java │ ├── filter │ ├── LastJqlChainFilter.java │ └── SmartJqlChainFilter.java │ ├── fun │ ├── AggTag.java │ ├── ExecutFun.java │ ├── ExecutMoreFun.java │ ├── ExecutOneFun.java │ ├── HeadCondition.java │ ├── HeadEnum.java │ ├── StreamingFun.java │ ├── condition │ │ ├── ColValueCondition.java │ │ ├── DeleteFromCondition.java │ │ ├── IgnoreAndOrWordCondition.java │ │ ├── JoinTableCondition.java │ │ ├── KeyWordCondition.java │ │ ├── insert │ │ │ ├── InsertAllColValueCondition.java │ │ │ ├── InsertCondition.java │ │ │ └── InsertIntoCondition.java │ │ ├── mark │ │ │ ├── OnConditionMark.java │ │ │ ├── OnDuplicateKeyUpdateMark.java │ │ │ ├── ReplaceIntoMark.java │ │ │ └── WhereConditionMark.java │ │ ├── on │ │ │ ├── OnColumnFunCondition.java │ │ │ └── OnValueFunCondition.java │ │ ├── select │ │ │ ├── SelectColumnCondition.java │ │ │ └── SelectTableCondition.java │ │ ├── update │ │ │ ├── UpdateAllColValueCondition.java │ │ │ ├── UpdateColValueCondition.java │ │ │ ├── UpdateCondition.java │ │ │ └── UpdateSetCondition.java │ │ └── where │ │ │ ├── AddPatchMarkCondition.java │ │ │ ├── BetweenCondition.java │ │ │ ├── CondSQLCondition.java │ │ │ ├── ExistsCondition.java │ │ │ ├── GroupByWordCondition.java │ │ │ ├── HavingBetweenCondition.java │ │ │ ├── HavingGroupCondition.java │ │ │ ├── HavingInCondition.java │ │ │ ├── HavingMarkWordCondition.java │ │ │ ├── InCondition.java │ │ │ ├── IsNullOrCondition.java │ │ │ ├── KeyWordCondition.java │ │ │ ├── LFCondition.java │ │ │ ├── LeftGroupByWordCondition.java │ │ │ ├── LikeCondition.java │ │ │ ├── LimitWordCondition.java │ │ │ ├── NativeSQLCondition.java │ │ │ ├── OrCondition.java │ │ │ ├── OrderWordCondition.java │ │ │ ├── RFWordCondition.java │ │ │ ├── WhereCondition.java │ │ │ └── WhereOnCondition.java │ ├── crud │ │ ├── BaseSelectFun.java │ │ ├── FirstOnFun.java │ │ ├── GroupFun.java │ │ ├── HavingFun.java │ │ ├── HavingPendingFun.java │ │ ├── JoinFun.java │ │ ├── JoinFunTableExtend.java │ │ ├── LastJoinFun.java │ │ ├── LastJoinFunTableExtend.java │ │ ├── LastOnFun.java │ │ ├── LeftGroupFun.java │ │ ├── LeftHavingPendingFun.java │ │ ├── LeftWhereSelectFun.java │ │ ├── LimitFun.java │ │ ├── OnFun.java │ │ ├── OrderFun.java │ │ ├── SelectFun.java │ │ ├── SmartJoinFun.java │ │ ├── SmartOnFun.java │ │ ├── SmartSelectFun.java │ │ ├── ToJoinFun.java │ │ ├── WhereFun.java │ │ ├── WhereModifyFun.java │ │ ├── WhereSelectFun.java │ │ ├── delete │ │ │ ├── DeleteFun.java │ │ │ └── DeleteWhereFun.java │ │ ├── impl │ │ │ ├── HavingFunImpl.java │ │ │ ├── HavingPendingFunImpl.java │ │ │ ├── JoinFunImpl.java │ │ │ ├── LastJoinFunImpl.java │ │ │ ├── LastLeftHavingFunImpl.java │ │ │ ├── LastLeftHavingPendingFunImpl.java │ │ │ ├── LastLeftWhereSelectFunImpl.java │ │ │ ├── LastOnFunImpl.java │ │ │ ├── LeftHavingFunImpl.java │ │ │ ├── LeftHavingPendingFunImpl.java │ │ │ ├── LeftWhereSelectFunImpl.java │ │ │ ├── OnFunImpl.java │ │ │ ├── SelectFunImpl.java │ │ │ ├── SmartSelectFunImpl.java │ │ │ ├── WhereSelectFunImpl.java │ │ │ ├── delete │ │ │ │ ├── DeleteFunImpl.java │ │ │ │ └── DeleteWhereFunImpl.java │ │ │ ├── insert │ │ │ │ ├── InsertFunImpl.java │ │ │ │ ├── MoreInsertFunImpl.java │ │ │ │ ├── OneInsertFunImpl.java │ │ │ │ └── SmartMoreInsertFunImpl.java │ │ │ └── update │ │ │ │ ├── OneUpdateFunImpl.java │ │ │ │ ├── PrepareWhereModifyFunImpl.java │ │ │ │ ├── SmartUpdateFunImpl.java │ │ │ │ ├── UpdateFunImpl.java │ │ │ │ └── WhereModifyFunImpl.java │ │ ├── insert │ │ │ ├── InsertFun.java │ │ │ ├── MoreInsertColAll.java │ │ │ ├── MoreInsertFun.java │ │ │ ├── OneInsertCol.java │ │ │ ├── OneInsertFun.java │ │ │ ├── SmartMoreInsertColAll.java │ │ │ └── SmartMoreInsertFun.java │ │ └── update │ │ │ ├── MoreUpdateFun.java │ │ │ ├── OneUpdateCol.java │ │ │ ├── OneUpdateFun.java │ │ │ ├── PrepareWhereModifyFun.java │ │ │ ├── SmartUpdateFun.java │ │ │ └── UpdateFun.java │ └── general │ │ ├── GeneralFun.java │ │ └── impl │ │ ├── GeneralFunImpl.java │ │ └── NativeFunImpl.java │ ├── jdbc │ ├── BriefJdbcExecutor.java │ ├── BriefJdbcExecutorFactory.java │ ├── BriefModifyExecutor.java │ ├── BriefQueryExecutor.java │ ├── BriefResultSetExecutor.java │ └── BriefSaveExecutor.java │ ├── log │ └── JqlLogger.java │ ├── mapper │ ├── BriefMapper.java │ └── SmartMapperProxy.java │ ├── parse │ ├── H2TableInfoParser.java │ └── MysqlTableInfoParser.java │ ├── readme.md │ └── utils │ └── BriefUtils.java ├── brief-encipher ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── javaoffers │ └── brief │ └── modelhelper │ └── encrypt │ ├── BriefEncipher.java │ ├── EncryptConfigConst.java │ ├── EncryptConfigContext.java │ ├── JqlAesInterceptor.java │ ├── JqlAesInterceptorImpl.java │ ├── SqlAesProcessor.java │ └── SqlAesProcessorImpl.java ├── brief-helper ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── javaoffers │ └── brief │ └── modelhelper │ ├── AppTest.java │ ├── consistant │ └── ModelConsistants.java │ ├── convert │ ├── AbstractConver.java │ ├── Boolean2StringConvert.java │ ├── ByteArray2JsonColumnConvert.java │ ├── ByteArray2StringConvert.java │ ├── Character2StringConvert.java │ ├── Convert.java │ ├── Date2LocalDateConvert.java │ ├── Date2LocalDateTimeConvert.java │ ├── Date2LongConvert.java │ ├── Date2OffsetDateTimeConvert.java │ ├── Date2StringConvert.java │ ├── DateOne2DateTwoConvert.java │ ├── LocalDate2StringConvert.java │ ├── LocalDateTime2DateConvert.java │ ├── LocalDateTime2StringConvert.java │ ├── Number2BooleanConvert.java │ ├── Number2DateConvert.java │ ├── Number2EnumConvert.java │ ├── Number2LocalDateConvert.java │ ├── Number2LocalDateTimeConvert.java │ ├── Number2PrimitiveConvert.java │ ├── Number2SQLDateConvert.java │ ├── Number2StringConvert.java │ ├── Number2VersionConvert.java │ ├── PrimitiveNumber2PrimitiveNumberConvert.java │ ├── Serializable2IdConvert.java │ ├── String2BigDecimalConvert.java │ ├── String2BigIntegerConvert.java │ ├── String2BooleanConvert.java │ ├── String2ByteConvert.java │ ├── String2CharConvert.java │ ├── String2DateConvert.java │ ├── String2DoubleConvert.java │ ├── String2EnumConvert.java │ ├── String2FloatConvert.java │ ├── String2IntegerConvert.java │ ├── String2JsonColumnConvert.java │ ├── String2LocalDateConvert.java │ ├── String2LocalDateTimeConvert.java │ ├── String2LongConvert.java │ ├── String2OffsetDateTimeConvert.java │ ├── String2SQLDateConvert.java │ └── String2ShortConvert.java │ ├── core │ ├── ConverDescriptor.java │ ├── ConvertDelegate.java │ ├── ConvertRegisterSelectorDelegate.java │ ├── Descriptor.java │ ├── ModelApplicationContext.java │ ├── Register.java │ ├── Selector.java │ └── SelectorRegister.java │ ├── parse │ ├── ModelParse.java │ ├── ModelParseUtils.java │ ├── RealtimeModelParse.java │ ├── RealtimeSmartModelParse.java │ └── SmartModelParse.java │ ├── readme.md │ └── util │ ├── DateUtils.java │ ├── HelperUtils.java │ └── Model.java ├── brief-samples ├── brief-commom-sample │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── base │ │ └── modelhelper │ │ └── sample │ │ ├── blur │ │ └── BlurSample.java │ │ ├── common │ │ └── FunAnnoParserSample.java │ │ ├── constant │ │ ├── ManLevel.java │ │ ├── Month.java │ │ ├── Sex.java │ │ └── Work.java │ │ ├── gkey │ │ └── SnowflakeKeySample.java │ │ ├── json │ │ └── ExtraInfo.java │ │ ├── mapper │ │ ├── BriefEncryptDataMapper.java │ │ ├── BriefTeacherMapper.java │ │ ├── BriefUserMapper.java │ │ ├── BriefUserOrderMapper.java │ │ ├── EncryptDataAuMapper.java │ │ ├── ShardingUserMapper.java │ │ └── UserMapper.java │ │ ├── model │ │ ├── EncryptData.java │ │ ├── EncryptDataAutoUpdate.java │ │ ├── ShardingUser.java │ │ ├── Teacher.java │ │ ├── User.java │ │ ├── UserOrder.java │ │ ├── UserTeacher.java │ │ ├── ViewModel.java │ │ └── WithAsModel.java │ │ ├── sharding │ │ └── ShardingUserTableMonthStrategy.java │ │ └── utils │ │ └── LOGUtils.java ├── brief-mybatis-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── javaoffers │ │ │ └── base │ │ │ └── modelhelper │ │ │ └── sample │ │ │ ├── HelpSample.java │ │ │ └── spring │ │ │ ├── SpringSuportCrudEncryptMapperEncryptData.java │ │ │ ├── SpringSuportCrudShardingMapperOp.java │ │ │ ├── SpringSuportCrudUserMapperBlur.java │ │ │ ├── SpringSuportCrudUserMapperDelete.java │ │ │ ├── SpringSuportCrudUserMapperGeneral.java │ │ │ ├── SpringSuportCrudUserMapperInsert.java │ │ │ ├── SpringSuportCrudUserMapperSelect.java │ │ │ ├── SpringSuportCrudUserMapperUpdate.java │ │ │ ├── SpringSuportUserMapper.java │ │ │ ├── SpringSupportCrudUserMapperAllOperation.java │ │ │ ├── config │ │ │ └── encrypt │ │ │ │ ├── AesEncryptConfigBeanRegistrar.java │ │ │ │ ├── MybatisEncryptInterceptor.java │ │ │ │ ├── MybatisEncryptInterceptorConfig.java │ │ │ │ └── anno │ │ │ │ ├── AesEncryptConfig.java │ │ │ │ └── EncryptTableColumns.java │ │ │ ├── filter │ │ │ └── JqlSampleFilter.java │ │ │ └── interceptor │ │ │ ├── LogInterceptor.java │ │ │ └── SpringSuportJqlInterceptor.java │ │ └── resources │ │ ├── application.yml │ │ ├── h2.sql │ │ ├── mysql.sql │ │ ├── sqlMapConfig.xml │ │ └── static │ │ └── model │ │ └── ReformMapper.xml_bak ├── brief-orms-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ ├── BriefSample.java │ │ ├── MybatisSample.java │ │ ├── TestStarter.java │ │ ├── brief │ │ │ ├── BriefInitializer.java │ │ │ └── entity │ │ │ │ └── BriefAccount.java │ │ ├── commons │ │ │ └── DataSourceFactory.java │ │ ├── flex │ │ │ ├── FlexInitializer.java │ │ │ ├── entity │ │ │ │ └── FlexAccount.java │ │ │ └── mapper │ │ │ │ └── FlexAccountMapper.java │ │ └── plus │ │ │ ├── PlusInitializer.java │ │ │ ├── entity │ │ │ └── PlusAccount.java │ │ │ └── mapper │ │ │ └── PlusAccountMapper.java │ │ └── resources │ │ ├── mybatis-flex.properties │ │ └── schema.sql ├── brief-speedier-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── javaoffers │ │ │ └── base │ │ │ └── modelhelper │ │ │ └── sample │ │ │ ├── MockBriefJdbcExecutor.java │ │ │ ├── MockBriefJdbcExecutorFactory.java │ │ │ ├── MockBriefSpeedier.java │ │ │ ├── clickhouse │ │ │ ├── ClickHouseSample.java │ │ │ └── MyFirstTable.java │ │ │ ├── encipher │ │ │ └── SqlParserProcessorTest.java │ │ │ ├── mysql │ │ │ └── MysqlSample.java │ │ │ ├── oracle │ │ │ └── OracleSample.java │ │ │ ├── pgsql │ │ │ └── PgSqlSample.java │ │ │ ├── sharding │ │ │ └── ShardingSample.java │ │ │ ├── speedier │ │ │ └── BriefSpeedierSample.java │ │ │ ├── sqlite │ │ │ └── SqliteSample.java │ │ │ └── sqlserver │ │ │ └── SqlServerSample.java │ │ └── resources │ │ └── logback.xml └── pom.xml ├── brief-sharding ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── javaoffers │ └── brief │ └── modelhelper │ └── sharding │ ├── context │ ├── ConditionBriefContextPostProcessor.java │ └── ShardingStrategyContext.java │ ├── derive │ ├── ShardingDeriveInfo.java │ ├── ShardingDeriveInfoLoader.java │ ├── ShardingModifyJqlExecutorFilter.java │ ├── ShardingOrder.java │ ├── ShardingParams.java │ ├── ShardingProcessor.java │ ├── ShardingQueryJqlExecutorFilter.java │ ├── ShardingQueryParse.java │ ├── ShardingStrategy.java │ ├── ShardingTableMonthStrategy.java │ ├── ShardingTableProcessor.java │ └── ShardingTableStrategy.java │ └── exception │ └── ShardingConfigException.java ├── brief-speedier ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── javaoffers │ └── brief │ └── modelhelper │ └── speedier │ ├── BriefSpeedier.java │ ├── BriefSpeedierDataSource.java │ ├── SpeedierBriefContext.java │ ├── config │ └── BriefSpeedierConfigProperties.java │ └── transaction │ ├── BriefTransaction.java │ └── SpeedierTransactionManagement.java ├── brief-sqlstatement ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── javaoffers │ ├── brief │ └── modelhelper │ │ └── parser │ │ ├── ColNameProcessorInfo.java │ │ ├── ConditionName.java │ │ ├── NamingFromItemVisitorAdapter.java │ │ ├── NamingSelectContent.java │ │ ├── NamingSelectExpressionVisitorAdapter.java │ │ ├── NamingSelectItemVisitor.java │ │ ├── NamingSelectVisitorAdapter.java │ │ ├── NamingStatementVisitorAdapter.java │ │ ├── SqlParserProcessor.java │ │ ├── TableColumns.java │ │ ├── delete │ │ └── NamingDeleteExpressionVisitorAdapter.java │ │ ├── insert │ │ ├── NamingInsertExpressionVisitorAdapter.java │ │ ├── NamingInsertItemsListVisitorAdapter.java │ │ ├── NamingInsertSelectExpressionVisitorAdapter.java │ │ ├── NamingInsertSelectItemVisitorAdapter.java │ │ └── NamingInsertVisitorAdapter.java │ │ └── update │ │ └── NamingUpdateExpressionVisitorAdapter.java │ └── thrid │ └── jsqlparser │ ├── JSQLParserException.java │ ├── Model.java │ ├── expression │ ├── Alias.java │ ├── AllValue.java │ ├── AnalyticExpression.java │ ├── AnalyticType.java │ ├── AnyComparisonExpression.java │ ├── AnyType.java │ ├── ArrayConstructor.java │ ├── ArrayExpression.java │ ├── BinaryExpression.java │ ├── CaseExpression.java │ ├── CastExpression.java │ ├── CollateExpression.java │ ├── ConnectByRootOperator.java │ ├── DateTimeLiteralExpression.java │ ├── DateValue.java │ ├── DoubleValue.java │ ├── Expression.java │ ├── ExpressionVisitor.java │ ├── ExpressionVisitorAdapter.java │ ├── ExtractExpression.java │ ├── FilterOverImpl.java │ ├── Function.java │ ├── HexValue.java │ ├── IntervalExpression.java │ ├── JdbcNamedParameter.java │ ├── JdbcParameter.java │ ├── JsonAggregateFunction.java │ ├── JsonAggregateOnNullType.java │ ├── JsonAggregateUniqueKeysType.java │ ├── JsonExpression.java │ ├── JsonFunction.java │ ├── JsonFunctionExpression.java │ ├── JsonFunctionType.java │ ├── JsonKeyValuePair.java │ ├── KeepExpression.java │ ├── LongValue.java │ ├── MySQLGroupConcat.java │ ├── MySQLIndexHint.java │ ├── NextValExpression.java │ ├── NotExpression.java │ ├── NullValue.java │ ├── NumericBind.java │ ├── OracleHierarchicalExpression.java │ ├── OracleHint.java │ ├── OracleNamedFunctionParameter.java │ ├── OrderByClause.java │ ├── Parenthesis.java │ ├── PartitionByClause.java │ ├── RowConstructor.java │ ├── RowGetExpression.java │ ├── SQLServerHints.java │ ├── SignedExpression.java │ ├── StringValue.java │ ├── TimeKeyExpression.java │ ├── TimeValue.java │ ├── TimestampValue.java │ ├── TimezoneExpression.java │ ├── TryCastExpression.java │ ├── UserVariable.java │ ├── ValueListExpression.java │ ├── VariableAssignment.java │ ├── WhenClause.java │ ├── WindowElement.java │ ├── WindowOffset.java │ ├── WindowRange.java │ ├── XMLSerializeExpr.java │ └── operators │ │ ├── arithmetic │ │ ├── Addition.java │ │ ├── BitwiseAnd.java │ │ ├── BitwiseLeftShift.java │ │ ├── BitwiseOr.java │ │ ├── BitwiseRightShift.java │ │ ├── BitwiseXor.java │ │ ├── Concat.java │ │ ├── Division.java │ │ ├── IntegerDivision.java │ │ ├── Modulo.java │ │ ├── Multiplication.java │ │ └── Subtraction.java │ │ ├── conditional │ │ ├── AndExpression.java │ │ ├── OrExpression.java │ │ └── XorExpression.java │ │ └── relational │ │ ├── Between.java │ │ ├── ComparisonOperator.java │ │ ├── EqualsTo.java │ │ ├── ExistsExpression.java │ │ ├── ExpressionList.java │ │ ├── FullTextSearch.java │ │ ├── GeometryDistance.java │ │ ├── GreaterThan.java │ │ ├── GreaterThanEquals.java │ │ ├── InExpression.java │ │ ├── IsBooleanExpression.java │ │ ├── IsDistinctExpression.java │ │ ├── IsNullExpression.java │ │ ├── ItemsList.java │ │ ├── ItemsListVisitor.java │ │ ├── ItemsListVisitorAdapter.java │ │ ├── JsonOperator.java │ │ ├── LikeExpression.java │ │ ├── Matches.java │ │ ├── MinorThan.java │ │ ├── MinorThanEquals.java │ │ ├── MultiExpressionList.java │ │ ├── NamedExpressionList.java │ │ ├── NotEqualsTo.java │ │ ├── OldOracleJoinBinaryExpression.java │ │ ├── RegExpMatchOperator.java │ │ ├── RegExpMatchOperatorType.java │ │ ├── RegExpMySQLOperator.java │ │ ├── SimilarToExpression.java │ │ └── SupportsOldOracleJoinSyntax.java │ ├── parser │ ├── ASTNodeAccess.java │ ├── ASTNodeAccessImpl.java │ ├── AbstractJSqlParser.java │ ├── BaseToken.java │ ├── CCJSqlParser.java │ ├── CCJSqlParserConstants.java │ ├── CCJSqlParserDefaultVisitor.java │ ├── CCJSqlParserManager.java │ ├── CCJSqlParserTokenManager.java │ ├── CCJSqlParserTreeConstants.java │ ├── CCJSqlParserUtil.java │ ├── CCJSqlParserVisitor.java │ ├── JJTCCJSqlParserState.java │ ├── JSqlParser.java │ ├── Node.java │ ├── ParseException.java │ ├── Provider.java │ ├── SimpleCharStream.java │ ├── SimpleNode.java │ ├── StatementListener.java │ ├── StreamProvider.java │ ├── StringProvider.java │ ├── Token.java │ ├── TokenMgrException.java │ └── feature │ │ ├── Feature.java │ │ ├── FeatureConfiguration.java │ │ ├── FeatureSet.java │ │ └── ModifyableFeatureSet.java │ ├── schema │ ├── Column.java │ ├── Database.java │ ├── MultiPartName.java │ ├── Sequence.java │ ├── Server.java │ ├── Synonym.java │ └── Table.java │ ├── statement │ ├── Block.java │ ├── Commit.java │ ├── CreateFunctionalStatement.java │ ├── DeclareStatement.java │ ├── DeclareType.java │ ├── DescribeStatement.java │ ├── ExplainStatement.java │ ├── IfElseStatement.java │ ├── PurgeObjectType.java │ ├── PurgeStatement.java │ ├── ReferentialAction.java │ ├── ResetStatement.java │ ├── RollbackStatement.java │ ├── SavepointStatement.java │ ├── SetStatement.java │ ├── ShowColumnsStatement.java │ ├── ShowStatement.java │ ├── Statement.java │ ├── StatementVisitor.java │ ├── StatementVisitorAdapter.java │ ├── Statements.java │ ├── UseStatement.java │ ├── alter │ │ ├── Alter.java │ │ ├── AlterExpression.java │ │ ├── AlterOperation.java │ │ ├── AlterSession.java │ │ ├── AlterSessionOperation.java │ │ ├── AlterSystemOperation.java │ │ ├── AlterSystemStatement.java │ │ ├── ConstraintState.java │ │ ├── DeferrableConstraint.java │ │ ├── EnableConstraint.java │ │ ├── RenameTableStatement.java │ │ ├── ValidateConstraint.java │ │ └── sequence │ │ │ └── AlterSequence.java │ ├── comment │ │ └── Comment.java │ ├── create │ │ ├── function │ │ │ └── CreateFunction.java │ │ ├── index │ │ │ └── CreateIndex.java │ │ ├── procedure │ │ │ └── CreateProcedure.java │ │ ├── schema │ │ │ └── CreateSchema.java │ │ ├── sequence │ │ │ └── CreateSequence.java │ │ ├── synonym │ │ │ └── CreateSynonym.java │ │ ├── table │ │ │ ├── CheckConstraint.java │ │ │ ├── ColDataType.java │ │ │ ├── ColumnDefinition.java │ │ │ ├── CreateTable.java │ │ │ ├── ExcludeConstraint.java │ │ │ ├── ForeignKeyIndex.java │ │ │ ├── Index.java │ │ │ ├── NamedConstraint.java │ │ │ ├── RowMovement.java │ │ │ └── RowMovementMode.java │ │ └── view │ │ │ ├── AlterView.java │ │ │ ├── CreateView.java │ │ │ ├── ForceOption.java │ │ │ └── TemporaryOption.java │ ├── delete │ │ ├── Delete.java │ │ └── DeleteModifierPriority.java │ ├── drop │ │ └── Drop.java │ ├── execute │ │ └── Execute.java │ ├── grant │ │ └── Grant.java │ ├── insert │ │ ├── Insert.java │ │ └── InsertModifierPriority.java │ ├── merge │ │ ├── Merge.java │ │ ├── MergeInsert.java │ │ └── MergeUpdate.java │ ├── replace │ │ └── Replace.java │ ├── select │ │ ├── AllColumns.java │ │ ├── AllTableColumns.java │ │ ├── Distinct.java │ │ ├── ExceptOp.java │ │ ├── ExpressionListItem.java │ │ ├── Fetch.java │ │ ├── First.java │ │ ├── FromItem.java │ │ ├── FromItemVisitor.java │ │ ├── FromItemVisitorAdapter.java │ │ ├── FunctionItem.java │ │ ├── GroupByElement.java │ │ ├── GroupByVisitor.java │ │ ├── IntersectOp.java │ │ ├── IntoTableVisitor.java │ │ ├── IntoTableVisitorAdapter.java │ │ ├── Join.java │ │ ├── KSQLJoinWindow.java │ │ ├── KSQLWindow.java │ │ ├── LateralSubSelect.java │ │ ├── Limit.java │ │ ├── MinusOp.java │ │ ├── MySqlSqlCacheFlags.java │ │ ├── Offset.java │ │ ├── OptimizeFor.java │ │ ├── OrderByElement.java │ │ ├── OrderByVisitor.java │ │ ├── OrderByVisitorAdapter.java │ │ ├── ParenthesisFromItem.java │ │ ├── Pivot.java │ │ ├── PivotVisitor.java │ │ ├── PivotVisitorAdapter.java │ │ ├── PivotXml.java │ │ ├── PlainSelect.java │ │ ├── Select.java │ │ ├── SelectBody.java │ │ ├── SelectExpressionItem.java │ │ ├── SelectItem.java │ │ ├── SelectItemVisitor.java │ │ ├── SelectItemVisitorAdapter.java │ │ ├── SelectVisitor.java │ │ ├── SelectVisitorAdapter.java │ │ ├── SetOperation.java │ │ ├── SetOperationList.java │ │ ├── Skip.java │ │ ├── SpecialSubSelect.java │ │ ├── SubJoin.java │ │ ├── SubSelect.java │ │ ├── TableFunction.java │ │ ├── Top.java │ │ ├── UnPivot.java │ │ ├── UnionOp.java │ │ ├── ValuesList.java │ │ ├── Wait.java │ │ ├── WithIsolation.java │ │ └── WithItem.java │ ├── show │ │ └── ShowTablesStatement.java │ ├── truncate │ │ └── Truncate.java │ ├── update │ │ ├── Update.java │ │ ├── UpdateModifierPriority.java │ │ └── UpdateSet.java │ ├── upsert │ │ └── Upsert.java │ └── values │ │ └── ValuesStatement.java │ └── util │ ├── AddAliasesVisitor.java │ ├── ConnectExpressionsVisitor.java │ ├── SelectUtils.java │ ├── TablesNamesFinder.java │ ├── cnfexpression │ ├── CNFConverter.java │ ├── CloneHelper.java │ ├── MultiAndExpression.java │ ├── MultiOrExpression.java │ └── MultipleExpression.java │ ├── deparser │ ├── AbstractDeParser.java │ ├── AlterDeParser.java │ ├── AlterSequenceDeParser.java │ ├── AlterSessionDeParser.java │ ├── AlterViewDeParser.java │ ├── CreateIndexDeParser.java │ ├── CreateSequenceDeParser.java │ ├── CreateSynonymDeparser.java │ ├── CreateTableDeParser.java │ ├── CreateViewDeParser.java │ ├── DeclareStatementDeParser.java │ ├── DeleteDeParser.java │ ├── DropDeParser.java │ ├── ExecuteDeParser.java │ ├── ExpressionDeParser.java │ ├── GrantDeParser.java │ ├── GroupByDeParser.java │ ├── InsertDeParser.java │ ├── LimitDeparser.java │ ├── OrderByDeParser.java │ ├── ReplaceDeParser.java │ ├── ResetStatementDeParser.java │ ├── SelectDeParser.java │ ├── SetStatementDeParser.java │ ├── ShowColumnsStatementDeParser.java │ ├── ShowStatementDeParser.java │ ├── ShowTablesStatementDeparser.java │ ├── StatementDeParser.java │ ├── UpdateDeParser.java │ ├── UpsertDeParser.java │ ├── UseStatementDeParser.java │ └── ValuesStatementDeParser.java │ └── validation │ ├── ContextKey.java │ ├── ParseCapability.java │ ├── ParseContext.java │ ├── ParseException.java │ ├── UnexpectedValidationException.java │ ├── Validation.java │ ├── ValidationCapability.java │ ├── ValidationContext.java │ ├── ValidationError.java │ ├── ValidationException.java │ ├── ValidationUtil.java │ ├── Validator.java │ ├── allowedtypes │ ├── AllowedTypesContext.java │ └── AllowedTypesValidation.java │ ├── feature │ ├── DatabaseType.java │ ├── FeatureContext.java │ ├── FeatureSetValidation.java │ ├── FeaturesAllowed.java │ ├── H2Version.java │ ├── MariaDbVersion.java │ ├── MySqlVersion.java │ ├── OracleVersion.java │ ├── PostgresqlVersion.java │ ├── SQLVersion.java │ ├── SqlServerVersion.java │ └── Version.java │ ├── metadata │ ├── AbstractDatabaseMetaDataCapability.java │ ├── DatabaseException.java │ ├── DatabaseMetaDataValidation.java │ ├── JdbcDatabaseMetaDataCapability.java │ ├── MetadataContext.java │ ├── Named.java │ ├── NamedObject.java │ └── NamesLookup.java │ └── validator │ ├── AbstractValidator.java │ ├── AlterSequenceValidator.java │ ├── AlterSessionValidator.java │ ├── AlterValidator.java │ ├── AlterViewValidator.java │ ├── CreateIndexValidator.java │ ├── CreateSequenceValidator.java │ ├── CreateSynonymValidator.java │ ├── CreateTableValidator.java │ ├── CreateViewValidator.java │ ├── DeclareStatementValidator.java │ ├── DeleteValidator.java │ ├── DropValidator.java │ ├── ExecuteValidator.java │ ├── ExpressionValidator.java │ ├── GrantValidator.java │ ├── GroupByValidator.java │ ├── InsertValidator.java │ ├── ItemsListValidator.java │ ├── LimitValidator.java │ ├── MergeValidator.java │ ├── OrderByValidator.java │ ├── ReplaceValidator.java │ ├── ResetStatementValidator.java │ ├── SelectValidator.java │ ├── SetStatementValidator.java │ ├── ShowColumnsStatementValidator.java │ ├── ShowStatementValidator.java │ ├── ShowTablesStatementValidator.java │ ├── StatementValidator.java │ ├── UpdateValidator.java │ ├── UpsertValidator.java │ ├── UseStatementValidator.java │ └── ValuesStatementValidator.java ├── brief-support ├── brief-clickhouse │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ └── clickhouse │ │ ├── CHSelectConditionParse.java │ │ ├── CHStatementParser.java │ │ ├── CHTableInfoParser.java │ │ ├── ClickHouseStatementParser.java │ │ └── ClickHouseTableInfoParser.java ├── brief-mybatis │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ ├── com │ │ │ └── javaoffers │ │ │ │ └── brief │ │ │ │ └── modelhelper │ │ │ │ ├── aggent │ │ │ │ ├── InstallModelHelper.java │ │ │ │ └── MapperProxyAggentProcess.java │ │ │ │ ├── context │ │ │ │ ├── BriefMybatisConfigContext.java │ │ │ │ └── SpringMybatisBriefContext.java │ │ │ │ ├── exception │ │ │ │ └── VersionException.java │ │ │ │ ├── install │ │ │ │ ├── InitMapper.java │ │ │ │ └── InstallAgent.java │ │ │ │ └── proxy │ │ │ │ └── CrudMapperProxy.java │ │ └── org │ │ │ └── apache │ │ │ └── ibatis │ │ │ └── binding │ │ │ ├── MapperProxyFactoryAggent341.java │ │ │ └── MapperProxyFactoryAggent3511.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── brief-oracle │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ └── oracle │ │ ├── OracleInsertAllColValueCondition.java │ │ ├── OracleInsertConditionParse.java │ │ ├── OracleLimitWordCondition.java │ │ ├── OracleSelectConditionParse.java │ │ ├── OracleStatementParser.java │ │ └── OracleTableInfoParser.java ├── brief-pgsql │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ └── pgsql │ │ ├── PostgreSqlInsertAllColValueCondition.java │ │ ├── PostgreSqlInsertConditionParse.java │ │ ├── PostgreSqlLimitWordCondition.java │ │ ├── PostgreSqlSelectConditionParse.java │ │ ├── PostgreSqlStatementParser.java │ │ └── PostgreSqlTableInfoParser.java ├── brief-spring-jdbc │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ └── jdbc │ │ └── spring │ │ ├── SpringBriefContext.java │ │ ├── SpringContextPostProcessor.java │ │ ├── SpringJdbcExecutor.java │ │ ├── SpringJdbcExecutorFactory.java │ │ ├── SpringModifyExecutor.java │ │ ├── SpringQueryExecutor.java │ │ └── SpringSaveExecutor.java ├── brief-sqlite │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ └── sqlite │ │ ├── SqliteInsertAllColValueCondition.java │ │ ├── SqliteInsertConditionParse.java │ │ ├── SqliteLimitWordCondition.java │ │ ├── SqliteSelectConditionParse.java │ │ ├── SqliteStatementParser.java │ │ └── SqliteTableInfoParser.java ├── brief-sqlserver │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── javaoffers │ │ └── brief │ │ └── modelhelper │ │ └── sqlserver │ │ ├── SqlServerInsertAllColValueCondition.java │ │ ├── SqlServerInsertConditionParse.java │ │ ├── SqlServerLimitWordCondition.java │ │ ├── SqlServerSelectConditionParse.java │ │ ├── SqlServerStatementParser.java │ │ └── SqlServerTableInfoParser.java └── pom.xml ├── checkstyle.xml ├── note-doc └── img │ ├── 2220967059897.png │ └── qq.jpg ├── pom.xml ├── readme.md ├── readmeCN.md ├── version.md └── wiki.md /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Current version 2 | 3 | 4 | 5 | ### How did the problem arise? (Make sure the latest version also has problems!!) 6 | 7 | 8 | 9 | ### Repeat steps 10 | 11 | 12 | 13 | ### Error message 14 | 15 | 16 | 17 | ### Your expectations 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not create a Pull Request without creating an issue first. 2 | 3 | ## What is the purpose of the change 4 | xxxx 5 | 6 | 7 | ## The Issue associated with the Pull Request 8 | xxxx 9 | 10 | 11 | ## Brief changelog OR 12 | xxxx 13 | 14 | 15 | ## Verifying this change 16 | xxxx 17 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/EnumValue.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: support enum convert. 11 | * {@code EnumValue} cannot be in the same enumeration class on multiple attributes used at the same time. 12 | * Only mark in one of the attributes and have unique characteristics.No @EnumValue attribute will be ordinal 13 | * as default values. 14 | * @author: create by cmj on 2023/1/2 11:46 15 | */ 16 | @Target({ElementType.FIELD}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Inherited 19 | public @interface EnumValue { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/NoneCol.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Not a table field or sql statement. Will be ignored when performing db operations 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface NoneCol { 17 | } 18 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/Blur.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive; 2 | 3 | /** 4 | * fuzzy strategy 5 | * @author mingJie 6 | */ 7 | public enum Blur { 8 | 9 | /** 10 | * left blur 11 | */ 12 | FRONT_BLUR, 13 | 14 | /** 15 | * right blur 16 | */ 17 | POST_BLUR, 18 | 19 | /** 20 | * middle blur 21 | */ 22 | MIDDLE_BLUR 23 | 24 | } 25 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/JsonColumn.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 标记是一个json字段. 如果你的表中有json字段, 那么你只需要建一个类继承JsonColumn即可. 7 | * 注意: 综合考虑没有使用注解的方式去做. 8 | * @author mingJie 9 | */ 10 | public interface JsonColumn extends Serializable { 11 | } 12 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/flag/DeriveFlag.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive.flag; 2 | 3 | /** 4 | * @description: Derivative label 5 | * @author: create by cmj on 2023/6/11 17:51 6 | */ 7 | public enum DeriveFlag implements DeriveMark { 8 | //Version of the function 9 | VERSION, 10 | /** 11 | * {@link IsDel} 12 | * {@link RowStatus} 13 | */ 14 | IS_DEL, 15 | ; 16 | } 17 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/flag/DeriveInfo.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive.flag; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | /** 6 | * @description: info 7 | * @author: create by cmj on 2023/6/11 19:48 8 | */ 9 | public abstract class DeriveInfo { 10 | //col name of db 11 | private String colName; 12 | private Field field; 13 | 14 | 15 | public DeriveInfo(String colName, Field field) { 16 | this.colName = colName; 17 | this.field = field; 18 | } 19 | 20 | public String getColName() { 21 | return colName; 22 | } 23 | 24 | public Field getField() { 25 | return field; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/flag/DeriveMark.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive.flag; 2 | 3 | public interface DeriveMark { 4 | } 5 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/flag/IsDel.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive.flag; 2 | 3 | import com.javaoffers.brief.modelhelper.anno.EnumValue; 4 | 5 | /** 6 | * @description: Whether or not to be deleted 7 | * @author: create by cmj on 2023/6/11 01:39 8 | */ 9 | public enum IsDel { 10 | //Data is logically deleted 11 | YES(1), 12 | //data is valid, there is not be logically deleted 13 | NO(0), 14 | ; 15 | @EnumValue 16 | private int code; 17 | 18 | IsDel(int code){ 19 | this.code = code; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/flag/RowStatus.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive.flag; 2 | 3 | import com.javaoffers.brief.modelhelper.anno.EnumValue; 4 | 5 | /** 6 | * Whether or not to be deleted 7 | * @author mingJie 8 | */ 9 | public enum RowStatus { 10 | 11 | /** 12 | * Data is logically deleted 13 | */ 14 | ABSENT(0), 15 | 16 | /** 17 | * data is valid, there is not be logically deleted 18 | */ 19 | PRESENCE(1) 20 | 21 | ; 22 | @EnumValue 23 | private int code; 24 | 25 | RowStatus(int code){ 26 | this.code = code; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/derive/flag/ShardingStrategyMark.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.derive.flag; 2 | 3 | /** 4 | * desc. 5 | * 6 | * @author cao ming jie create by 2025/5/2 7 | */ 8 | public enum ShardingStrategyMark implements DeriveMark { 9 | SHARDING_TABLE_STRATEGY; 10 | } 11 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/math/Rand.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * select RAND() 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Rand { 17 | public static final String TAG = "RAND"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/time/Curdate.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * CURDATE() 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Curdate { 17 | public static final String TAG = "CURDATE"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/time/CurrentDate.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * CURRENT_DATE() 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface CurrentDate { 17 | public static final String TAG = "CURRENT_DATE"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/time/CurrentTime.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * CURRENT_TIME() 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface CurrentTime { 17 | public static final String TAG = "CURRENT_TIME"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/time/Curtime.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * CURTIME() 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Curtime { 17 | public static final String TAG = "CURTIME"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/time/Now.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * now() 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Now { 17 | public static final String TAG = "NOW"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/noneparam/time/UnixTimestamp.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.noneparam.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: unix_timestamp(); 11 | * @author: create by cmj on 2022/10/15 17:01 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface UnixTimestamp { 17 | public static final String TAG = "UNIX_TIMESTAMP"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/IfEq.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * extended if: if (colName = xx, ep1, ep2) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface IfEq { 17 | public static String EXPR = " = "; 18 | /** 19 | * colName equal xx. 20 | */ 21 | String eq(); 22 | /** 23 | * expr1 24 | */ 25 | String ep1(); 26 | 27 | /** 28 | * expr2 29 | */ 30 | String ep2(); 31 | } 32 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/IfLt.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * extended if: if (colName < xx, ep1, ep2) 11 | * colName < xx 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface IfLt { 18 | public static String EXPR = " < "; 19 | /** 20 | * colName less than xx. 21 | */ 22 | String lt(); 23 | /** 24 | * expr1 25 | */ 26 | String ep1(); 27 | 28 | /** 29 | * expr2 30 | */ 31 | String ep2(); 32 | } 33 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/IfLte.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * extended if: if (colName <= xx, ep1, ep2) 11 | * colName <= xx 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface IfLte { 18 | public static String EXPR = " <= "; 19 | /** 20 | * colName less than or equal xx. 21 | */ 22 | String lte(); 23 | /** 24 | * expr1 25 | */ 26 | String ep1(); 27 | 28 | /** 29 | * expr2 30 | */ 31 | String ep2(); 32 | } 33 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/IfNeq.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * extended if: if (colName != xx, ep1, ep2) 11 | * colName != xx 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface IfNeq { 18 | public static String EXPR = " != "; 19 | /** 20 | * colName not equal xx. 21 | */ 22 | String neq(); 23 | /** 24 | * expr1 25 | */ 26 | String ep1(); 27 | 28 | /** 29 | * expr2 30 | */ 31 | String ep2(); 32 | } 33 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/IfNull.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * ifNull(colName, 'defalut value'). 11 | * sample: 12 | *
13 | * @ColName("name") 14 | * @IfNull("'Amop'") 15 | * private String colName; 16 | *
17 | * create by cmj 18 | */ 19 | @Target({ElementType.FIELD}) 20 | @Retention(RetentionPolicy.RUNTIME) 21 | @Inherited 22 | public @interface IfNull { 23 | public static final String TAG = "IFNULL"; 24 | /** 25 | * defalut value 26 | */ 27 | String value() ; 28 | } 29 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/Left.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * select left(colName, length) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Left { 17 | public static final String TAG = "LEFT"; 18 | 19 | /** 20 | * length 21 | */ 22 | int value(); 23 | } 24 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/Right.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: RIGHT(colName,len) 11 | * @author: create by cmj on 2022/10/15 15:09 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Right { 17 | public static final String TAG = "RIGHT"; 18 | int value(); 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/math/Abs.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * https://blog.csdn.net/weixin_51696091/article/details/124731621 11 | * Absolute value function: abs(colName) 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Abs { 18 | public static final String TAG = "ABS"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/math/Ceil.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * select CEIL(colName) 11 | * CEIL(3.2) : 4 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Ceil { 18 | 19 | public static final String TAG = "CEIL"; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/math/Floor.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * select FLOOR(colName) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Floor { 17 | public static final String TAG = "FLOOR"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/math/Mod.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * MOD(colName, xx) 11 | * SELECT MOD(234, 10); # 4 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Mod { 18 | public static final String TAG = "MOD"; 19 | 20 | /** 21 | * colName mod xx 22 | */ 23 | int value(); 24 | } 25 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/math/Round.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * ROUND(colName, precision) 11 | * ROUND(20.5,0) 21 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Round { 18 | public static final String TAG = "ROUND"; 19 | 20 | /** 21 | * Accuracy 22 | */ 23 | int precision() default 0; 24 | } 25 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/math/Truncate.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.math; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * TRUNCATE(colName, precision) 11 | * TRUNCATE(7.536432,2); 7.53 12 | * Numerical intercept function 13 | * @author mingJie 14 | */ 15 | @Target({ElementType.FIELD}) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Inherited 18 | public @interface Truncate { 19 | 20 | public static final String TAG = "TRUNCATE"; 21 | 22 | /** 23 | * Preserve the length after the decimal point. 24 | * value of precision 25 | */ 26 | int value() default 0; 27 | } 28 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/DateFormat.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: date_format(colName,format) 11 | * @author: create by cmj on 2022/10/15 16:19 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface DateFormat { 17 | public static final String TAG = "DATE_FORMAT"; 18 | 19 | /** 20 | * format 21 | */ 22 | String value(); 23 | } 24 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Dayname.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * DAYNAME(colName) 11 | * SELECT DAYNAME(now()); # Sunday 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Dayname { 18 | public static final String TAG = "DAYNAME"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/FromDays.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: from_days(colName) 11 | * Returns a date from a numeric date value 12 | * SELECT FROM_DAYS(780500); output 2136-12-08 13 | * @author: create by cmj on 2022/10/15 16:37 14 | */ 15 | @Target({ElementType.FIELD}) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Inherited 18 | public @interface FromDays { 19 | public static final String TAG = "FROM_DAYS"; 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Hour.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * HOUR(colName) 11 | * SELECT HOUR('10:05:03'); output 10 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Hour { 18 | public static final String TAG = "HOUR"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Makedate.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: makedate(colName, days) 11 | * select makedate(2001,31); -- '2001-01-31' 12 | * select makedate(2001,32); -- '2001-02-01' 13 | * @author: create by cmj on 2022/10/15 17:03 14 | */ 15 | @Target({ElementType.FIELD}) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Inherited 18 | public @interface Makedate { 19 | public static final String TAG = "MAKEDATE"; 20 | 21 | /** 22 | * days 23 | */ 24 | int value(); 25 | } 26 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Maketime.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: maketime(colName ,minute, second) 11 | * select maketime(12,15,30); -- '12:15:30' 12 | * @author: create by cmj on 2022/10/15 17:07 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Maketime { 18 | public static final String TAG = "MAKETIME"; 19 | 20 | /** 21 | * minute 22 | */ 23 | int ep1(); 24 | 25 | /** 26 | * second 27 | */ 28 | int ep2(); 29 | } 30 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Minute.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * MINUTE(colName) 11 | * select minute('2018-9-28 10:20:25.000002') ; 20 12 | * @author mingJie 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Minute { 18 | public static final String TAG = "MINUTE"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Month.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * MONTH(colName) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Month { 17 | public static final String TAG = "MONTH"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Monthname.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * MONTHNAME(colName) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Monthname { 17 | public static final String TAG = "MONTHNAME"; 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/SecToTime.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: sec_to_time(colName) 11 | * @author: create by cmj on 2022/10/15 16:48 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface SecToTime { 17 | 18 | public static final String TAG = "SEC_TO_TIME"; 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/TimeFormat.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: time_format(colName,format) 11 | * @author: create by cmj on 2022/10/15 16:19 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface TimeFormat { 17 | public static final String TAG = "TIME_FORMAT"; 18 | 19 | /** 20 | * format 21 | */ 22 | String value(); 23 | } 24 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/TimeToSec.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: time_to_sec(colName) Converts a time value to a second value 11 | * TIME_TO_SEC('15:15:15') output 54915 12 | * @author: create by cmj on 2022/10/15 16:41 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface TimeToSec { 18 | public static final String TAG = "TIME_TO_SEC"; 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/ToDays.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: to_days(colName) 11 | * @author: create by cmj on 2022/10/15 16:33 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface ToDays { 17 | public static final String TAG = "TO_DAYS"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Week.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * WEEK(colName) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Week { 17 | public static final String TAG = "WEEK"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Weekday.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /**WEEKDAY(colName) 10 | * @author mingJie 11 | */ 12 | @Target({ElementType.FIELD}) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | @Inherited 15 | public @interface Weekday { 16 | public static final String TAG = "WEEKDAY"; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/time/Year.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.time; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * YEAR(colName) 11 | * @author mingJie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Year { 17 | public static final String TAG = "YEAR"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/CharLength.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Get the number of characters in a string function: char_length(str) 11 | * create by cmj 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface CharLength { 17 | public static final String TAG = "CHAR_LENGTH"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/LTrim.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: LTRIM(str) 11 | * @author: create by cmj on 2022/10/15 15:15 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface LTrim { 17 | public static final String TAG = "LTRIM"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Length.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Get the number of bytes in a string function: length(str) 11 | * create by mingjie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Length { 17 | public static String TAG = "LENGTH"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Lower.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * lower(x) 11 | * create by mingjie 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Lower { 17 | public static final String TAG = "LOWER"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/RTrim.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: RTRIM(str) 11 | * @author: create by cmj on 2022/10/15 15:15 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface RTrim { 17 | public static final String TAG = "RTRIM"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Repeat.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: REPEAT(str,x) The number of times used to repeat a string. 11 | * @author: create by cmj on 2022/10/15 15:15 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Repeat { 17 | public static final String TAG = "REPEAT"; 18 | int value(); 19 | } 20 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Replace.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: REPLACE(colName, ep1, ep2) 11 | * @author: create by cmj on 2022/10/15 15:15 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Replace { 17 | public static final String TAG = "REPLACE"; 18 | String ep1(); 19 | String ep2(); 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Strcmp.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * strcmp(colName,expr): compareStringSizeFunction 11 | * create by cmj 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Strcmp { 17 | public static final String TAG = "STRCMP"; 18 | 19 | /** 20 | * expr 21 | */ 22 | String value(); 23 | } 24 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/SubString.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: SUBSTRING(colName, ep1, ep2) 11 | * @author: create by cmj on 2022/10/15 15:15 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface SubString { 17 | public static final String TAG = "SUBSTRING"; 18 | String ep1(); 19 | String ep2(); 20 | } 21 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Trim.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * @description: TRIM(str) 11 | * @author: create by cmj on 2022/10/15 15:15 12 | */ 13 | @Target({ElementType.FIELD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface Trim { 17 | public static final String TAG = "TRIM"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/fun/params/varchar/Upper.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.fun.params.varchar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Uppercase: upper(x) 11 | * create by mingjie 12 | * 13 | */ 14 | @Target({ElementType.FIELD}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Inherited 17 | public @interface Upper { 18 | 19 | public static final String TAG = "UPPER"; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/anno/internal/NotNull.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.anno.internal; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * It is used for prompting information. The ability to verify when there is no time 11 | * @author mingJie 12 | */ 13 | @Documented 14 | @Retention(RetentionPolicy.CLASS) 15 | @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) 16 | public @interface NotNull { 17 | } 18 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/briefstate/BriefCommonComponentStates.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.briefstate; 2 | 3 | /** 4 | * @author mingJie 5 | */ 6 | public class BriefCommonComponentStates { 7 | 8 | //Whether the encryption component is enabled 9 | public static volatile boolean ENCRYPT_STATE = false; 10 | } 11 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/constants/ConfigPropertiesConstants.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.constants; 2 | 3 | /** 4 | * @description: brief properties 5 | * @author: create by cmj on 2023/5/28 01:46 6 | */ 7 | public interface ConfigPropertiesConstants { 8 | 9 | String SLOW_LOG_TIME = "brief:slow-sql:time"; 10 | 11 | String IS_PRINT_SQL = "brief:print-sql"; 12 | 13 | String IS_PRINT_SQL_COST = "brief:print-cost"; 14 | } 15 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/constants/ModelHelpperConstants.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.constants; 2 | 3 | /** 4 | * @author mingJie 5 | */ 6 | public interface ModelHelpperConstants { 7 | 8 | String NULL = "__NULL__"; 9 | 10 | String FIELD_COL_NAME = "__FIELD_COL_NAME__"; 11 | 12 | //split_line 13 | String SPLIT_LINE = "__"; 14 | 15 | double BLUR_PERCENT= 0.3; 16 | 17 | String BLUR_TAG = "*"; 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/BriefContextAware.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | /** 4 | * 有一些对象想使用BriefContext 对象中的信息,则可以实现该接口. 5 | * 此时的briefContext已经创建完毕. 6 | * @author mingJie 7 | */ 8 | public interface BriefContextAware { 9 | 10 | /** 11 | * 发布BriefContext可用 12 | * @param briefContext 13 | */ 14 | void setBriefContext(BriefContext briefContext); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/BriefContextPostProcessor.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | /** 4 | * brief上下文后置处理器. 不对外提供功能. BriefContext 处于处理过程中. 5 | * @author mingJie 6 | */ 7 | public interface BriefContextPostProcessor { 8 | 9 | /** 10 | * 子类要保证每次执行结果都是一致的. 11 | * @param briefContext 12 | */ 13 | void postProcess(BriefContext briefContext); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/BriefPropertiesLoader.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | /** 4 | * 配置加载器,不对外提供。 5 | * @author mingJie 6 | */ 7 | public interface BriefPropertiesLoader { 8 | 9 | void startLoader(BriefProperties briefProperties); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/ConditionInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | import com.javaoffers.brief.modelhelper.fun.Condition; 4 | import com.javaoffers.brief.modelhelper.fun.ConditionContext; 5 | 6 | import java.util.LinkedList; 7 | 8 | /** 9 | * 在每一个condition添加到list时,可以进行拦截判断. 10 | * 11 | * @author cao ming jie create by 2025/4/30 12 | */ 13 | public interface ConditionInterceptor extends Interceptor{ 14 | 15 | /** 16 | * condition 拦截器 17 | * @param conditions conditions 18 | * @param condition 当前准备add 的condition 19 | * @return true mean that the condition will be added 2 the conditions , 20 | * false will be not added 2 the conditions 21 | */ 22 | boolean process(ConditionContext conditions, Condition condition); 23 | } 24 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/DeriveInfoLoader.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | import com.javaoffers.brief.modelhelper.utils.TableInfo; 4 | 5 | import java.lang.reflect.Field; 6 | 7 | /** 8 | * 处理自定义衍生功能 9 | */ 10 | public interface DeriveInfoLoader { 11 | /** 12 | * 加载衍生配置. 13 | * @param tableInfo 表信息 14 | * @param colF 表字段 15 | * @param colName 表名称 16 | */ 17 | void loadDeriveInfo(TableInfo tableInfo, Field colF, String colName); 18 | } 19 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/Interceptor.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | /** 4 | * @description: 5 | * @author: create by cmj on 2023/3/25 20:24 6 | */ 7 | public interface Interceptor { 8 | } 9 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/JqlInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | import com.javaoffers.brief.modelhelper.core.BaseSQLInfo; 4 | 5 | /** 6 | * {@code SQLParse} 对jql信息拦截,在真正执行之前可修改数据. 7 | */ 8 | public interface JqlInterceptor extends Interceptor { 9 | 10 | void handler(BaseSQLInfo baseSQLInfo); 11 | } 12 | -------------------------------------------------------------------------------- /brief-common/src/main/java/com/javaoffers/brief/modelhelper/context/JqlInterceptorLoader.java: -------------------------------------------------------------------------------- 1 | package com.javaoffers.brief.modelhelper.context; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 加载Jql拦截器,外部不可用. 主要加载brief内部自定义的. 7 | * 只需要实现JqlInterceptorLoader中的loadJqlInterceptor方法即可. 8 | */ 9 | public interface JqlInterceptorLoader extends BriefContextPostProcessor { 10 | 11 | @Override 12 | default void postProcess(BriefContext briefContext) { 13 | List