FragmentRepository

interface FragmentRepository : JpaRepository<Fragment, Long>

Functions

Link copied to clipboard
abstract fun count(): Long
abstract fun <S : Fragment> count(example: Example<S>): Long
Link copied to clipboard
abstract fun delete(entity: Fragment)
Link copied to clipboard
abstract fun deleteAll()
abstract fun deleteAll(entities: MutableIterable<Fragment>)
Link copied to clipboard
abstract fun deleteAllById(ids: MutableIterable<Long>)
Link copied to clipboard
Link copied to clipboard
abstract fun deleteAllInBatch()
abstract fun deleteAllInBatch(entities: MutableIterable<Fragment>)
Link copied to clipboard
abstract fun deleteById(id: Long)
Link copied to clipboard
Link copied to clipboard
abstract fun <S : Fragment> exists(example: Example<S>): Boolean
Link copied to clipboard
abstract fun existsById(id: Long): Boolean
Link copied to clipboard
abstract override fun <S : Fragment> findAll(example: Example<S>): MutableList<S>
abstract override fun <S : Fragment> findAll(example: Example<S>, sort: Sort): MutableList<S>
abstract override fun findAll(): MutableList<Fragment>
abstract override fun findAll(sort: Sort): MutableList<Fragment>
abstract fun findAll(pageable: Pageable): Page<Fragment>
abstract fun <S : Fragment> findAll(example: Example<S>, pageable: Pageable): Page<S>
Link copied to clipboard
abstract override fun findAllById(ids: MutableIterable<Long>): MutableList<Fragment>
Link copied to clipboard
@Query(value = "SELECT DISTINCT ON (runningid) * from Fragment WHERE variantid = :variantID AND open = :isOpen ORDER BY runningid DESC LIMIT :limit", nativeQuery = true)
abstract fun findAllRunningVersionsOfVariant(@Param(value = "variantID") variantID: String, @Param(value = "limit") limit: Int, @Param(value = "isOpen") isOpen: Boolean = false): List<Fragment>
Link copied to clipboard
abstract fun <S : Fragment, R : Any> findBy(example: Example<S>, queryFunction: Function<FluentQuery.FetchableFluentQuery<S>, R>): R
Link copied to clipboard
abstract fun findById(id: Long): Optional<Fragment>
Link copied to clipboard
abstract fun findFragmentByVariantID(variantID: String): List<Fragment>
Link copied to clipboard
abstract fun findFragmentByVariantIDAndVariantTime(variantID: String, variantTime: Timestamp): List<Fragment>
Link copied to clipboard
abstract fun findFragmentByVariantTime(variantTime: Timestamp): List<Fragment>
@Query(value = "SELECT f.* from Fragment f WHERE f.variantID = :variantID AND f.runningID = :runningID AND f.instance_dataid is NULL AND f.open = :isOpen", nativeQuery = true)
abstract fun findModelOnlyFragmentWithVariantAndRunningIDFirstLazy(@Param(value = "variantID") variantID: String, @Param(value = "runningID") runningID: String, @Param(value = "isOpen") isOpen: Boolean = false): Fragment?
Link copied to clipboard
@Query(value = "SELECT DISTINCT ON (running_time, variantID) * from Fragment f WHERE f.variantID = :variantID AND running_time = ( SELECT MAX(running_time) FROM Fragment f1 WHERE f1.variantID = :variantID) AND f.open = :isOpen ORDER BY running_time DESC, variantID LIMIT 1", nativeQuery = true)
abstract fun findMostRecentFragmentByVariantIDLazy(@Param(value = "variantID") variantID: String, @Param(value = "isOpen") isOpen: Boolean = false): Fragment?
Link copied to clipboard
@Query(value = "SELECT DISTINCT ON (running_time, variantID) f.* from Fragment f WHERE f.variant_name = :variantName AND running_time = ( SELECT MAX(running_time) FROM Fragment f1 WHERE f1.variant_name = :variantName) AND f.open = :isOpen ORDER BY running_time DESC, variantID LIMIT :limit", nativeQuery = true)
abstract fun findMostRecentFragmentsByVariantNameLazy(@Param(value = "variantName") variantName: String, @Param(value = "limit") limit: Int, @Param(value = "isOpen") isOpen: Boolean = false): List<Fragment>
Link copied to clipboard
@Query(value = "SELECT * from Fragment f WHERE f.variant_time = :variantTime AND running_time = ( SELECT MAX(running_time) FROM Fragment f1 WHERE f1.variant_time = :variantTime) AND f.open = :isOpen ORDER BY running_time DESC LIMIT :limit", nativeQuery = true)
abstract fun findMostRecentFragmentsByVariantTimeLazy(@Param(value = "variantTime") variantTime: Timestamp, @Param(value = "limit") limit: Int, @Param(value = "isOpen") isOpen: Boolean = false): List<Fragment>
Link copied to clipboard
abstract fun <S : Fragment> findOne(example: Example<S>): Optional<S>
Link copied to clipboard
@Query(value = "SELECT DISTINCT ON (variantID) * FROM Fragment f WHERE f.open = :isOpen limit :limit", nativeQuery = true)
abstract fun findOneFragmentOfEachVariantLazy(@Param(value = "limit") limit: Int, @Param(value = "isOpen") isOpen: Boolean = false): List<Fragment>
Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun getById(id: Long): Fragment
Link copied to clipboard
abstract fun getFragmentByDataID(dataID: Long): Fragment?
Link copied to clipboard
abstract fun getFragmentByRunningID(runningID: String): List<Fragment>
Link copied to clipboard
abstract fun getFragmentsByRunningTime(runningTime: Timestamp): List<Fragment>
Link copied to clipboard
abstract fun getOne(id: Long): Fragment
Link copied to clipboard
abstract fun getReferenceById(id: Long): Fragment
Link copied to clipboard
abstract fun <S : Fragment> save(entity: S): S
Link copied to clipboard
abstract override fun <S : Fragment> saveAll(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : Fragment> saveAllAndFlush(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : Fragment> saveAndFlush(entity: S): S