-
-
Save Danny-Hoang/42ad7dab31f37748cfca20f00ae18d53 to your computer and use it in GitHub Desktop.
Revisions
-
namkyu revised this gist
Oct 17, 2017 . 1 changed file with 25 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ public interface MemberRepository extends JpaRepository<SpringMember, Integer> { SpringMember findBySeqAndName(int seq, String name); List<SpringMember> findTop3ByNameLike(String name); SpringMember readBySeq(int seq); SpringMember readByName(String name); SpringMember queryBySeq(int seq); long countByNameLike(String name); long countByName(String name); @Query(value = "SELECT seq, name FROM SPRING_DATA_MEMBER", nativeQuery = true) List<SpringMember> nativeQuery(); @Query(value = "SELECT seq, name FROM SPRING_DATA_MEMBER WHERE name = :name", nativeQuery = true) SpringMember nativeQueryByName(@Param(value = "name") String name); @Async CompletableFuture<List<SpringMember>> readAllBy(); } -
namkyu revised this gist
Oct 17, 2017 . No changes.There are no files selected for viewing
-
namkyu revised this gist
Oct 12, 2017 . 1 changed file with 23 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,3 +3,26 @@ public interface ProductsRepository extends JpaRepository<ProductsEntity, Intege } @Getter @Setter @ToString(exclude = {"associateCompanies"}) @Entity @Table(name = "Products") @Access(value = AccessType.FIELD) public class ProductsEntity { @Id private int productId; private String productName; @Convert(converter = SaleStatusEnumConverter.class) private SaleStatus saleStatus; @Convert(converter = OffsetDateTimeConverter.class) private OffsetDateTime changed; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "AssociateCompanyId") private AssociateCompaniesEntity associateCompanies; } -
namkyu created this gist
Oct 12, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ public interface ProductsRepository extends JpaRepository<ProductsEntity, Integer> { ProductsEntity findTopByOrderByProductIdDesc(); }