Package io.kestra.jdbc.repository
Class AbstractJdbcFlowRepository
java.lang.Object
io.kestra.jdbc.repository.AbstractJdbcRepository
io.kestra.jdbc.repository.AbstractJdbcFlowRepository
- All Implemented Interfaces:
io.kestra.core.repositories.FlowRepositoryInterface
@Singleton
public abstract class AbstractJdbcFlowRepository
extends AbstractJdbcRepository
implements io.kestra.core.repositories.FlowRepositoryInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractJdbcRepository<io.kestra.core.models.flows.Flow> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractJdbcFlowRepository(AbstractJdbcRepository<io.kestra.core.models.flows.Flow> jdbcRepository, io.micronaut.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionio.kestra.core.models.flows.FlowWithSourcecreate(io.kestra.core.models.flows.Flow flow, String flowSource, io.kestra.core.models.flows.Flow flowWithDefaults) io.kestra.core.models.flows.Flowdelete(io.kestra.core.models.flows.Flow flow) io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.flows.Flow>find(io.micronaut.data.model.Pageable pageable, String query, String tenantId, String namespace, Map<String, String> labels) List<io.kestra.core.models.flows.Flow>List<io.kestra.core.models.flows.Flow>Optional<io.kestra.core.models.flows.Flow>findById(String tenantId, String namespace, String id, Optional<Integer> revision, Boolean allowDeleted) Optional<io.kestra.core.models.flows.FlowWithSource>findByIdWithSource(String tenantId, String namespace, String id, Optional<Integer> revision, Boolean allowDeleted) List<io.kestra.core.models.flows.Flow>findByNamespace(String tenantId, String namespace) protected abstract org.jooq.ConditionfindCondition(String query, Map<String, String> labels) findDistinctNamespace(String tenantId) List<io.kestra.core.models.flows.FlowWithSource>findRevisions(String tenantId, String namespace, String id) io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.SearchResult<io.kestra.core.models.flows.Flow>>findSourceCode(io.micronaut.data.model.Pageable pageable, String query, String tenantId, String namespace) protected abstract org.jooq.ConditionfindSourceCodeCondition(String query) List<io.kestra.core.models.flows.FlowWithSource>protected org.jooq.Table<org.jooq.Record>fromLastRevision(boolean asterisk) protected org.jooq.ConditionrevisionDefaultFilter(String tenantId) io.kestra.core.models.flows.FlowWithSourceupdate(io.kestra.core.models.flows.Flow flow, io.kestra.core.models.flows.Flow previous, String flowSource, io.kestra.core.models.flows.Flow flowWithDefaults) Methods inherited from class io.kestra.jdbc.repository.AbstractJdbcRepository
buildTenantCondition, defaultFilter, defaultFilter, field, field, groupByFields, groupByFieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.kestra.core.repositories.FlowRepositoryInterface
findByExecution, findById, findById, findByIdWithSource, findByIdWithSource
-
Field Details
-
jdbcRepository
-
-
Constructor Details
-
AbstractJdbcFlowRepository
public AbstractJdbcFlowRepository(AbstractJdbcRepository<io.kestra.core.models.flows.Flow> jdbcRepository, io.micronaut.context.ApplicationContext applicationContext)
-
-
Method Details
-
findById
public Optional<io.kestra.core.models.flows.Flow> findById(String tenantId, String namespace, String id, Optional<Integer> revision, Boolean allowDeleted) - Specified by:
findByIdin interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
fromLastRevision
protected org.jooq.Table<org.jooq.Record> fromLastRevision(boolean asterisk) -
revisionDefaultFilter
-
findByIdWithSource
public Optional<io.kestra.core.models.flows.FlowWithSource> findByIdWithSource(String tenantId, String namespace, String id, Optional<Integer> revision, Boolean allowDeleted) - Specified by:
findByIdWithSourcein interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findRevisions
public List<io.kestra.core.models.flows.FlowWithSource> findRevisions(String tenantId, String namespace, String id) - Specified by:
findRevisionsin interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findAll
- Specified by:
findAllin interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findAllForAllTenants
- Specified by:
findAllForAllTenantsin interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findByNamespace
- Specified by:
findByNamespacein interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findCondition
-
find
public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.flows.Flow> find(io.micronaut.data.model.Pageable pageable, @Nullable String query, @Nullable String tenantId, @Nullable String namespace, @Nullable Map<String, String> labels) - Specified by:
findin interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findWithSource
public List<io.kestra.core.models.flows.FlowWithSource> findWithSource(@Nullable String query, @Nullable String tenantId, @Nullable String namespace, @Nullable Map<String, String> labels) - Specified by:
findWithSourcein interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findSourceCodeCondition
-
findSourceCode
public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.SearchResult<io.kestra.core.models.flows.Flow>> findSourceCode(io.micronaut.data.model.Pageable pageable, @Nullable String query, @Nullable String tenantId, @Nullable String namespace) - Specified by:
findSourceCodein interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
create
public io.kestra.core.models.flows.FlowWithSource create(io.kestra.core.models.flows.Flow flow, String flowSource, io.kestra.core.models.flows.Flow flowWithDefaults) throws javax.validation.ConstraintViolationException - Specified by:
createin interfaceio.kestra.core.repositories.FlowRepositoryInterface- Throws:
javax.validation.ConstraintViolationException
-
update
public io.kestra.core.models.flows.FlowWithSource update(io.kestra.core.models.flows.Flow flow, io.kestra.core.models.flows.Flow previous, String flowSource, io.kestra.core.models.flows.Flow flowWithDefaults) throws javax.validation.ConstraintViolationException - Specified by:
updatein interfaceio.kestra.core.repositories.FlowRepositoryInterface- Throws:
javax.validation.ConstraintViolationException
-
delete
public io.kestra.core.models.flows.Flow delete(io.kestra.core.models.flows.Flow flow) - Specified by:
deletein interfaceio.kestra.core.repositories.FlowRepositoryInterface
-
findDistinctNamespace
- Specified by:
findDistinctNamespacein interfaceio.kestra.core.repositories.FlowRepositoryInterface
-