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

nosi.webapps.igrp.dao.Config Maven / Gradle / Ivy

Go to download

IGRP Framework is a powerful and highly customizable platform developed by the Operational Nucleus for the Information Society (NOSi) to create web applications, it provides out of box, several modules to make easy to create stand-alone, production-grade web applications: authentication and access-control, business processes automation, reporting, page builder with automatic code generation and incorporation of the Once-Only-Principle, written in Java. IGRP Framework WAR - Contains some keys resources that give UI to IGRP Framework and others supports files.

There is a newer version: 2.0.0.241121-RCM
Show newest version
package nosi.webapps.igrp.dao;
/*
  @author: Emanuel Pereira
 * 29 Jun 2017
 */
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Table(name="tbl_config")
public class Config extends IGRPBaseActiveRecord implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3187302633317523568L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	@Column(nullable=false,unique=true)
	private String name;
	@Column(nullable=false)
	private String value;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name="env_fk",foreignKey=@ForeignKey(name="CONFIG_FK"),nullable=true)
	private Application application;
	
	public Config(){}
	
	public Config(String name, String value) {
		super();
		this.name = name;
		this.value = value;
	}

	public Application getApplication() {
		return application;
	}

	public void setApplication(Application application) {
		this.application = application;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	public static String getBaseUrlActiviti() {
		return new Config().find().andWhere("name", "=", "url_ativiti_connection").one().getValue();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy