Skip to content

Commit

Permalink
ref[orm]: use generic type interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Jul 1, 2024
1 parent d9e0728 commit a2832e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions orm/src/main/java/com/zfoo/orm/query/IQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*
* @author godotg
*/
public interface IQuery<PK extends Comparable<PK>, E extends IEntity<PK>> {
public interface IQuery {

IQueryBuilder<PK, E> builder(Class<E> entityClazz);
<PK extends Comparable<PK>, E extends IEntity<PK>> IQueryBuilder<PK, E> builder(Class<E> entityClazz);

}
4 changes: 2 additions & 2 deletions orm/src/main/java/com/zfoo/orm/query/MongodbQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
/**
* @author godotg
*/
public class MongodbQuery<PK extends Comparable<PK>, E extends IEntity<PK>> implements IQuery<PK, E> {
public class MongodbQuery implements IQuery {

@Override
public IQueryBuilder<PK, E> builder(Class<E> entityClazz) {
public <PK extends Comparable<PK>, E extends IEntity<PK>> IQueryBuilder<PK, E> builder(Class<E> entityClazz) {
return new MongoQueryBuilder<PK, E>(entityClazz);
}

Expand Down

0 comments on commit a2832e6

Please sign in to comment.