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

br.com.anteros.commons.services.rest.resource.v1.AccessTimeIntervalResource Maven / Gradle / Ivy

There is a newer version: 1.0.86
Show newest version
package br.com.anteros.commons.services.rest.resource.v1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.context.annotation.Lazy;

import br.com.anteros.security.store.sql.domain.AccessTimeInterval;
import br.com.anteros.commons.services.rest.service.AccessTimeIntervalService;
import br.com.anteros.persistence.session.service.SQLService;
import br.com.anteros.security.spring.AnterosSecurityManager;
import br.com.anteros.spring.web.resource.AbstractSQLResourceRest;
import br.com.anteros.persistence.session.repository.Page;
import br.com.anteros.persistence.session.repository.PageRequest;
import br.com.anteros.persistence.session.repository.Pageable;
import br.com.anteros.persistence.session.repository.impl.PageImpl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
*  Generated by Anteros Generator Maven Plugin at 29/12/2019 08:16:42
**/

@RestController
@RequestMapping(value = "/v1/accessTimeInterval")
public class AccessTimeIntervalResource extends AbstractSQLResourceRest {

	@Autowired
	@Lazy
	private AccessTimeIntervalService accessTimeIntervalService;

	@Autowired
	@Lazy
	protected AnterosSecurityManager anterosSecurityManager;

	@Override
	public SQLService getService() {
		return accessTimeIntervalService;
	}
	
	@Override
	protected Page createConcretePage(List content, PageRequest pageRequest,
			long totalElements) {
		return new PageAccessTimeInterval(content, pageRequest, totalElements);
	}

	class PageAccessTimeInterval extends PageImpl {
		public PageAccessTimeInterval(List content) {
			super(content);
		}

		public PageAccessTimeInterval(List content, Pageable pageable, long total) {
			super(content, pageable, total);
		}
	}
	
	@Override
	protected List createConcreteList(List result) {
		return new ListAccessTimeInterval(result);
	}
	
	class ListAccessTimeInterval extends ArrayList{
		public ListAccessTimeInterval(Collection c) {
			super(c);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy