Skip to content

Commit

Permalink
修改java doc
Browse files Browse the repository at this point in the history
  • Loading branch information
threefish committed Mar 19, 2023
1 parent 846466b commit ecd19e9
Show file tree
Hide file tree
Showing 53 changed files with 82 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/9/13
* 2020/9/13
* 搭配 @Id(auto = false)
*/
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/9/13
* 2020/9/13
* 需要实现 org.nutz.dao.enhance.audit.AuditingEntity
*/
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/9/13
* 2020/9/13
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(value = {ElementType.METHOD, ElementType.FIELD})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* @author 黄川 [email protected]
* @date: 2021/6/14
* 2021/6/14
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
Expand All @@ -19,8 +19,6 @@
/**
* 指定实现 SQL 查询的静态类中的具体方法名.
* 为空时和接口方法一致
*
* @return
*/
String methodName() default "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/7/30
* 2020/7/30
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* 删除
*
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
* 1、指定返回的实体类型,默认读取注解优先,若没有注解,则默认通过反射去class类上获取实体类泛型
* 2、自动建表必须需要写在dao类上
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
* 忽略自动建表
*/
@Target({ElementType.METHOD, ElementType.TYPE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/9/13
* 2020/9/13
* 需要实现 org.nutz.dao.enhance.audit.AuditingEntity
*/
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/9/13
* 2020/9/13
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(value = {ElementType.METHOD, ElementType.FIELD})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/7/31
* 2020/7/31
*/
@SuppressWarnings("all")
public interface BaseDao<T> {
Expand All @@ -25,7 +25,6 @@ public interface BaseDao<T> {
* 如果你的字段仅仅声明了 '@Id(auto=true)',没有声明 '@Next',则认为你还是想取回插入后最新的 ID 值,因为 自动为你添加类似 @Next(@SQL("SELECT MAX(id) FROM tableName")) 的设置
*
* @param t
* @return
*/
@CustomProvider(type = BaseDaoProvider.class)
T insert(T t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
*/
public interface DaoFactory {
/**
Expand All @@ -21,16 +21,13 @@ public interface DaoFactory {

/**
* 获取默认dao
*
* @return
*/
Dao getDao();

/**
* 获取dao
*
* @param dataSource
* @return
*/
Dao getDao(String dataSource);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/7/31
* 2020/7/31
*/
@Slf4j
public class DaoMethodInvoke {
Expand Down Expand Up @@ -117,7 +117,6 @@ private void initEntityInfo(Dao dao) {
* @param dataSource
* @param methodTraget
* @param args
* @return
*/
public Object execute(String dataSource, Method methodTraget, Object[] args) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException, InstantiationException {
Stopwatch stopWatch = new Stopwatch();
Expand Down Expand Up @@ -149,7 +148,6 @@ public Object execute(String dataSource, Method methodTraget, Object[] args) thr
*
* @param dao
* @param args
* @return
*/
private Object invokeCustomProvider(Dao dao, Object[] args, Entity entity) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
String executeSql = replaceConditionSql(args);
Expand Down Expand Up @@ -180,7 +178,6 @@ private void parseAndTranslationSql() {
* 替换条件sql
*
* @param args
* @return
*/
private String replaceConditionSql(Object[] args) {
String sql = this.sourceSql;
Expand Down Expand Up @@ -232,7 +229,6 @@ private String replaceConditionSql(Object[] args) {
*
* @param dao
* @param args
* @return
*/
private Execute getCustomizeSqlExecute(Dao dao, Object[] args) {
String executeSql = replaceConditionSql(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/7/31
* 2020/7/31
*/
public interface DaoMethodInvoker {
/**
Expand All @@ -14,7 +14,6 @@ public interface DaoMethodInvoker {
* @param method
* @param args
* @param dataSource
* @return
* @throws Throwable
*/
Object invoke(Object proxy, Method method, Object[] args, String dataSource) throws Throwable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ protected void setCondition(Sql sql) {

/**
* 包裹可选返回值
*
* @return
*/
protected Object returnIsOptionalVal(Object val) {
return this.methodSignature.isReturnsOptional() ? Optional.ofNullable(val) : val;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public Object invoke() {

/**
* 输出是out参数
*
* @return
*/
private Object lineDataQuery() {
Sql sql = getSql();
Expand All @@ -47,8 +45,6 @@ private Object lineDataQuery() {

/**
* 集合数据
*
* @return
*/
private Object collectionDataQuery() {
Sql sql = getSql();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
public interface Execute {
/**
* 真正执行操作
*
* @return
*/
Object invoke();
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public PaginationQueryExecute(Dao dao, String executeSql, MethodSignature method

/**
* 执行
*
* @return
*/
@Override
public Object invoke() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static void setEntity(Class<?> klass, Entity<?> entity) {
* 获取
*
* @param klass
* @return
*/
public static Entity<?> getEntity(Class<?> klass) {
return ENTITY_HASH_MAP.get(klass);
Expand All @@ -45,7 +44,6 @@ public static Entity<?> getEntity(Class<?> klass) {
* 获取
*
* @param name
* @return
*/
public static Entity<?> getEntity(String name) {
Class<?> klass = getClass(name);
Expand All @@ -56,7 +54,6 @@ public static Entity<?> getEntity(String name) {
* 获取类
*
* @param name
* @return
*/
public static Class<?> getClass(String name) {
return STRING_CLASS_HASH_MAP.get(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public SimpleSqlParser(String originalSql) {

/**
* 解析,必须再运行时才能执行
*
* @return
*/
public SimpleSqlParser parse() {
this.replaceSql();
Expand All @@ -87,8 +85,6 @@ private void replaceConditionSql() {

/**
* 替换SQL
*
* @return
*/
private void replaceSql() {
String tempSql = this.sql;
Expand All @@ -110,7 +106,6 @@ private void replaceSql() {
*
* @param tempSql
* @param columnMapping
* @return
*/
private String replaceColumnSql(String tempSql, ColumnMapping columnMapping) {
final TableMapping table = columnMapping.getTable();
Expand Down Expand Up @@ -142,7 +137,6 @@ private String replaceColumnSql(String tempSql, ColumnMapping columnMapping) {
* 获取条件表达式
*
* @param sql
* @return
*/
private void analyzeConditionMapping(String sql) {
List<ConditionMapping> mappingList = new ArrayList<>();
Expand All @@ -167,7 +161,6 @@ private void analyzeConditionMapping(String sql) {
* 获取条件参数名
*
* @param part
* @return
*/
private Set<String> getConditionParameter(String part) {
Matcher matcher = CONDITION_PARAMETER_PATTERN.matcher(part);
Expand All @@ -190,7 +183,6 @@ private Set<String> getConditionParameter(String part) {
* 分析sql字符串
*
* @param str
* @return
*/
private String[] getTokens(String str) {
String[] tokens = split(WHITESPACE + "(),", str, true);
Expand Down Expand Up @@ -223,7 +215,6 @@ private String[] getTokens(String str) {
* 获取字段信息
*
* @param allTokens
* @return
*/
private Set<ColumnMapping> getColumnMapping(String[] allTokens) {
Set<ColumnMapping> columnMappings = new HashSet<>();
Expand All @@ -249,7 +240,6 @@ private Set<ColumnMapping> getColumnMapping(String[] allTokens) {
* 获取表信息
*
* @param tokens
* @return
*/
private void analyzeTableMapping(String[] tokens) {
Set<TableMapping> mappings = new HashSet<>();
Expand All @@ -274,7 +264,6 @@ private void analyzeTableMapping(String[] tokens) {
*
* @param tokens
* @param start
* @return
*/
private String nextNonWhite(String[] tokens, int start) {
for (int i = start + 1; i < tokens.length; i++) {
Expand All @@ -301,7 +290,6 @@ private boolean isTokenEndWithAQuoteCharacter(String token) {
* 是java实体字段
*
* @param token
* @return
*/
private boolean isEntityJavaIdentifier(String token) {
// 字符串长度大于1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* @author 黄川 [email protected]
* @date: 2020/12/12
* 2020/12/12
*/
@Getter
public class MethodSignature {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* @author 黄川 [email protected]
* @date: 2023/3/15
* 2023/3/15
*/
@Data
@AllArgsConstructor(staticName = "of")
Expand Down
Loading

0 comments on commit ecd19e9

Please sign in to comment.