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

com.zuunr.restbed.repository.sqlserver.config.Config Maven / Gradle / Ivy

There is a newer version: 1.0.0.M7-59f711a
Show newest version
/*
 * Copyright 2018 Zuunr AB
 *
 * 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.
 */
package com.zuunr.restbed.repository.sqlserver.config;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

/**
 * 

Configuration for sqlserver runtime.

* * @author Mikael Ahlberg */ @ConfigurationProperties(prefix = "zuunr.repository.sqlserver") @Component @Validated public class Config { @NotNull(message = "You must set if every collection should be prefixed with the api name (default: false)") private Boolean prefixCollectionWithApiName; @NotNull(message = "You must set the default collection limit, used to limit responses in a get collection call (default: 25)") private Integer defaultGetCollectionLimit; @NotEmpty(message = "You must set which database schema to use for the tables, i.e. .somecollectiontable (default: collections)") private String schemaName; public boolean isPrefixCollectionWithApiName() { return prefixCollectionWithApiName; } public void setPrefixCollectionWithApiName(boolean prefixCollectionWithApiName) { this.prefixCollectionWithApiName = prefixCollectionWithApiName; } public int getDefaultGetCollectionLimit() { return defaultGetCollectionLimit; } public void setDefaultGetCollectionLimit(int defaultGetCollectionLimit) { this.defaultGetCollectionLimit = defaultGetCollectionLimit; } public String getSchemaName() { return schemaName; } public void setSchemaName(String schemaName) { this.schemaName = schemaName; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy