<commit_before>package com.github.aureliano.evtbridge.core.jdbc;

import com.github.aureliano.evtbridge.annotation.validation.NotEmpty;

public class JdbcConnectionModel {

	private String user;
	private String password;
	private String driver;
	private String sql;
	private String url;
	private String table;
	
	public JdbcConnectionModel() {
		super();
	}
	
	@NotEmpty
	public String getUser() {
		return user;
	}

	public JdbcConnectionModel withUser(String user) {
		this.user = user;
		return this;
	}

	public String getPassword() {
		return password;
	}

	public JdbcConnectionModel withPassword(String password) {
		this.password = password;
		return this;
	}
	
	public String getSql() {
		return sql;
	}
	
	public JdbcConnectionModel withSql(String sql) {
		this.sql = sql;
		return this;
	}
	
	@NotEmpty
	public String getDriver() {
		return driver;
	}
	
	public JdbcConnectionModel withDriver(String driver) {
		this.driver = driver;
		return this;
	}
	
	@NotEmpty
	public String getUrl() {
		return url;
	}
	
	public JdbcConnectionModel withUrl(String url) {
		this.url = url;
		return this;
	}
	
	public String getTable() {
		return table;<commit_msg>Add doc annotations to jdbc connection model.<commit_after>package com.github.aureliano.evtbridge.core.jdbc;

import com.github.aureliano.evtbridge.annotation.doc.SchemaConfiguration;
import com.github.aureliano.evtbridge.annotation.doc.SchemaProperty;
import com.github.aureliano.evtbridge.annotation.validation.NotEmpty;

@SchemaConfiguration(
	title = "Java Database Connection model.",
	type = "object"
)
public class JdbcConnectionModel {

	private String user;
	private String password;
	private String driver;
	private String sql;
	private String url;
	private String table;
	
	public JdbcConnectionModel() {
		super();
	}
	
	@NotEmpty
	@SchemaProperty(
		property = "user",
		types = "string",
		description = "User name for database connection.",
		required = true
	)
	public String getUser() {
		return user;
	}

	public JdbcConnectionModel withUser(String user) {
		this.user = user;
		return this;
	}

	@SchemaProperty(
		property = "password",
		types = "string",
		description = "User password for database connection.",
		required = false
	)
	public String getPassword() {
		return password;
	}

	public JdbcConnectionModel withPassword(String password) {
		this.password = password;
		return this;
	}

	@SchemaProperty(
		property = "sql",
		types = "string",
		description = "SQL command to be executed in order to get data. Required when reading."
	)
	public String getSql() {
		return sql;
	}
	
	public JdbcConnectionModel withSql(String sql) {
		this.sql = sql;
		return this;
	}
	
	@NotEmpty
	@SchemaProperty(
		property = "driver",
		types = "string",
		description = "Fully qualified DBMS driver class name.",
		required = true
	)
	public String getDriver() {
		return driver;
	}
	
	public JdbcConnectionModel withDriver(String driver) {
		this.driver = driver;
		return this;
	}
	
	@NotEmpty
	@SchemaProperty(
		property = "url",
		types = "string",
		description = "Connection URL: jdbc:<sgdb>://<server_host>:<port>/<database>",
		required = true
	)
	public String getUrl() {
		return url;
	}
	
	public JdbcConnectionModel withUrl(String url) {
		this.url = url;
		return this;
	}

	@SchemaProperty(
		property = "table",
		types = "string",
		description = "Target table name. Required when writing."
	)
	public String getTable() {
		return table;
{'fraction_non_alphanumeric': 0.10005817335660268, 'fraction_numerical': 0.0, 'mean_word_length': 4.042521994134898, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6004815', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1058, 'n_words': 301}