/* * * Copyright (C) 2007-2015 Licensed to the Comunes Association (CA) under * one or more contributor license agreements (see COPYRIGHT for details). * The CA licenses this file to you under the GNU Affero General Public * License version 3, (the "License"); you may not use this file except in * compliance with the License. This file is part of kune. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package cc.kune.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Indexed; import cc.kune.domain.utils.HasId; // TODO: Auto-generated Javadoc /** * GlobalizeCountries generated by hbm2java from original rails globalize schema * * More info: http://en.wikipedia.org/wiki/Date_and_time_notation_by_country * http://en.wikipedia.org/wiki/Common_Locale_Data_Repository * * @author vjrj@ourproject.org (Vicente J. Ruiz Jurado) */ @Entity @Indexed @Table(name = "globalize_countries") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class I18nCountry implements HasId { /** The code. */ @org.hibernate.annotations.Index(name = "code") @Column(name = "code", length = 2) private String code; /** The currency code. */ @Column(name = "currency_code", length = 3) private String currencyCode; /** The currency decimal sep. */ @Column(name = "currency_decimal_sep", length = 2) private String currencyDecimalSep; /** The currency format. */ @Column(name = "currency_format") private String currencyFormat; /** The date format. */ @Column(name = "date_format") private String dateFormat; /** The decimal sep. */ @Column(name = "decimal_sep", length = 2) private String decimalSep; /** The english name. */ @org.hibernate.annotations.Index(name = "english_name") @Column(name = "english_name") private String englishName; /** The id. */ @Id // Is not a @GeneratedValue similar to I18nLanguage (we have already ids) @DocumentId @Column(name = "id", unique = true, nullable = false) private Long id; /** The number grouping scheme. */ @Column(name = "number_grouping_scheme") private String numberGroupingScheme; /** The thousands sep. */ @Column(name = "thousands_sep", length = 2) private String thousandsSep; /** * Instantiates a new i18n country. */ public I18nCountry() { this(null, null, null, null, null, null, null, null, null, null); } /** * Instantiates a new i18n country. * * @param id * the id * @param code * the code * @param currencyCode * the currency code * @param currencyDecimalSep * the currency decimal sep * @param currencyFormat * the currency format * @param dateFormat * the date format * @param decimalSep * the decimal sep * @param englishName * the english name * @param numberGroupingScheme * the number grouping scheme * @param thousandsSep * the thousands sep */ public I18nCountry(final Long id, final String code, final String currencyCode, final String currencyDecimalSep, final String currencyFormat, final String dateFormat, final String decimalSep, final String englishName, final String numberGroupingScheme, final String thousandsSep) { this.id = id; this.code = code; this.englishName = englishName; this.dateFormat = dateFormat; this.currencyFormat = currencyFormat; this.currencyCode = currencyCode; this.thousandsSep = thousandsSep; this.decimalSep = decimalSep; this.currencyDecimalSep = currencyDecimalSep; this.numberGroupingScheme = numberGroupingScheme; } /** * Gets the code. * * @return the code */ public String getCode() { return this.code; } /** * Gets the currency code. * * @return the currency code */ public String getCurrencyCode() { return this.currencyCode; } /** * Gets the currency decimal sep. * * @return the currency decimal sep */ public String getCurrencyDecimalSep() { return this.currencyDecimalSep; } /** * Gets the currency format. * * @return the currency format */ public String getCurrencyFormat() { return this.currencyFormat; } /** * Gets the date format. * * @return the date format */ public String getDateFormat() { return this.dateFormat; } /** * Gets the decimal sep. * * @return the decimal sep */ public String getDecimalSep() { return this.decimalSep; } /** * Gets the english name. * * @return the english name */ public String getEnglishName() { return this.englishName; } /* * (non-Javadoc) * * @see cc.kune.domain.utils.HasId#getId() */ @Override public Long getId() { return this.id; } /** * Gets the number grouping scheme. * * @return the number grouping scheme */ public String getNumberGroupingScheme() { return this.numberGroupingScheme; } /** * Gets the thousands sep. * * @return the thousands sep */ public String getThousandsSep() { return this.thousandsSep; } /** * Sets the code. * * @param code * the new code */ public void setCode(final String code) { this.code = code; } /** * Sets the currency code. * * @param currencyCode * the new currency code */ public void setCurrencyCode(final String currencyCode) { this.currencyCode = currencyCode; } /** * Sets the currency decimal sep. * * @param currencyDecimalSep * the new currency decimal sep */ public void setCurrencyDecimalSep(final String currencyDecimalSep) { this.currencyDecimalSep = currencyDecimalSep; } /** * Sets the currency format. * * @param currencyFormat * the new currency format */ public void setCurrencyFormat(final String currencyFormat) { this.currencyFormat = currencyFormat; } /** * Sets the date format. * * @param dateFormat * the new date format */ public void setDateFormat(final String dateFormat) { this.dateFormat = dateFormat; } /** * Sets the decimal sep. * * @param decimalSep * the new decimal sep */ public void setDecimalSep(final String decimalSep) { this.decimalSep = decimalSep; } /** * Sets the english name. * * @param englishName * the new english name */ public void setEnglishName(final String englishName) { this.englishName = englishName; } /* * (non-Javadoc) * * @see cc.kune.domain.utils.HasId#setId(java.lang.Long) */ @Override public void setId(final Long id) { this.id = id; } /** * Sets the number grouping scheme. * * @param numberGroupingScheme * the new number grouping scheme */ public void setNumberGroupingScheme(final String numberGroupingScheme) { this.numberGroupingScheme = numberGroupingScheme; } /** * Sets the thousands sep. * * @param thousandsSep * the new thousands sep */ public void setThousandsSep(final String thousandsSep) { this.thousandsSep = thousandsSep; } }