s2.spring.automate.data.S2SpringDataConfigurerAdapter.kt Maven / Gradle / Ivy
package s2.spring.automate.data
import org.springframework.data.repository.CrudRepository
import s2.automate.core.persist.AutomatePersister
import s2.dsl.automate.Evt
import s2.dsl.automate.S2Automate
import s2.dsl.automate.S2State
import s2.dsl.automate.model.WithS2Id
import s2.dsl.automate.model.WithS2State
import s2.spring.automate.S2ConfigurerAdapter
import s2.spring.automate.data.persister.SpringDataAutomatePersister
import s2.spring.automate.executor.S2AutomateExecutorSpring
abstract class S2SpringDataConfigurerAdapter(
private val aggregateRepository: CrudRepository,
) : S2ConfigurerAdapter() where
STATE : S2State,
ENTITY : WithS2State,
ENTITY : WithS2Id,
AGGREGATE : S2AutomateExecutorSpring {
override fun aggregateRepository(): AutomatePersister {
return SpringDataAutomatePersister(
aggregateRepository
)
}
}