All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.komamitsu.spring.data.sqlite.SqliteRepositoryImpl Maven / Gradle / Ivy

The newest version!
package org.komamitsu.spring.data.sqlite;

import org.springframework.data.jdbc.core.JdbcAggregateOperations;
import org.springframework.data.jdbc.core.convert.JdbcConverter;
import org.springframework.data.jdbc.repository.support.SimpleJdbcRepository;
import org.springframework.data.mapping.PersistentEntity;

/**
 * Default implementation of {@link org.springframework.data.repository.CrudRepository} and ${@link
 * SqliteRepository} interface in the integration of Spring Data and SQLite.
 */
public class SqliteRepositoryImpl extends SimpleJdbcRepository
    implements SqliteRepository {
  private final JdbcAggregateOperations entityOperation;

  public SqliteRepositoryImpl(
      JdbcAggregateOperations entityOperations,
      PersistentEntity entity,
      JdbcConverter converter) {
    super(entityOperations, entity, converter);
    this.entityOperation = entityOperations;
  }

  @Override
  public T insert(T instance) {
    return entityOperation.insert(instance);
  }

  @Override
  public T update(T instance) {
    return entityOperation.update(instance);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy