-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from KPMP/develop
Prep for release 2.0
- Loading branch information
Showing
26 changed files
with
446 additions
and
749 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package org.kpmp.file; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "ar_file_info") | ||
public class ARFileInfo { | ||
@Id | ||
private int arFileInfoId; | ||
private int fileId; | ||
private int releaseVersion; | ||
private int releaseSunsetVersion; | ||
private int metadataTypeId; | ||
|
||
public int getMetadataTypeId() { | ||
return metadataTypeId; | ||
} | ||
|
||
public void setMetadataTypeId(int metadataTypeId) { | ||
this.metadataTypeId = metadataTypeId; | ||
} | ||
|
||
public int getArFileInfoId() { | ||
return arFileInfoId; | ||
} | ||
|
||
public void setArFileInfoId(int arFileInfoId) { | ||
this.arFileInfoId = arFileInfoId; | ||
} | ||
|
||
public int getFileId() { | ||
return fileId; | ||
} | ||
|
||
public void setFileId(int fileId) { | ||
this.fileId = fileId; | ||
} | ||
|
||
public int getReleaseVersion() { | ||
return releaseVersion; | ||
} | ||
|
||
public void setReleaseVersion(int releaseVersion) { | ||
this.releaseVersion = releaseVersion; | ||
} | ||
|
||
public int getReleaseSunsetVersion() { | ||
return releaseSunsetVersion; | ||
} | ||
|
||
public void setReleaseSunsetVersion(int releaseSunsetVersion) { | ||
this.releaseSunsetVersion = releaseSunsetVersion; | ||
} | ||
|
||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.kpmp.file; | ||
|
||
import org.springframework.cache.annotation.Cacheable; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
interface ARFileInfoRepository extends CrudRepository<ARFileInfo, Integer>{ | ||
|
||
@Cacheable("totalFileCount") | ||
@Query(value = "select count(distinct(file_id)) from ar_file_info where release_sunset_version is null" , nativeQuery = true) | ||
Long getTotalFileCount(); | ||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.kpmp.file; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ARFileInfoService { | ||
|
||
private ARFileInfoRepository repository; | ||
|
||
@Autowired | ||
public ARFileInfoService (ARFileInfoRepository repository) { | ||
this.repository = repository; | ||
} | ||
|
||
public Long getRepositoryTotalFileCount() { | ||
return repository.getTotalFileCount(); | ||
} | ||
|
||
} |
Oops, something went wrong.