FieldTestServiceImplEntityServiceImpl.java
package io.github.jhipster.sample.service.impl;
/*-
* #%L
* Jhipster Sample Application
* %%
* Copyright (C) 2017 Osgiliath
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import io.github.jhipster.sample.service.FieldTestServiceImplEntityService;
import io.github.jhipster.sample.domain.FieldTestServiceImplEntity;
import io.github.jhipster.sample.repository.FieldTestServiceImplEntityRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Service Implementation for managing FieldTestServiceImplEntity.
*/
@Service
@Transactional
public class FieldTestServiceImplEntityServiceImpl implements FieldTestServiceImplEntityService{
private final Logger log = LoggerFactory.getLogger(FieldTestServiceImplEntityServiceImpl.class);
private final FieldTestServiceImplEntityRepository fieldTestServiceImplEntityRepository;
public FieldTestServiceImplEntityServiceImpl(FieldTestServiceImplEntityRepository fieldTestServiceImplEntityRepository) {
this.fieldTestServiceImplEntityRepository = fieldTestServiceImplEntityRepository;
}
/**
* Save a fieldTestServiceImplEntity.
*
* @param fieldTestServiceImplEntity the entity to save
* @return the persisted entity
*/
@Override
public FieldTestServiceImplEntity save(FieldTestServiceImplEntity fieldTestServiceImplEntity) {
log.debug("Request to save FieldTestServiceImplEntity : {}", fieldTestServiceImplEntity);
return fieldTestServiceImplEntityRepository.save(fieldTestServiceImplEntity);
}
/**
* Get all the fieldTestServiceImplEntities.
*
* @return the list of entities
*/
@Override
@Transactional(readOnly = true)
public List<FieldTestServiceImplEntity> findAll() {
log.debug("Request to get all FieldTestServiceImplEntities");
return fieldTestServiceImplEntityRepository.findAll();
}
/**
* Get one fieldTestServiceImplEntity by id.
*
* @param id the id of the entity
* @return the entity
*/
@Override
@Transactional(readOnly = true)
public FieldTestServiceImplEntity findOne(Long id) {
log.debug("Request to get FieldTestServiceImplEntity : {}", id);
return fieldTestServiceImplEntityRepository.findOne(id);
}
/**
* Delete the fieldTestServiceImplEntity by id.
*
* @param id the id of the entity
*/
@Override
public void delete(Long id) {
log.debug("Request to delete FieldTestServiceImplEntity : {}", id);
fieldTestServiceImplEntityRepository.delete(id);
}
}