/*
*
* 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.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import cc.kune.domain.utils.HasId;
// TODO: Auto-generated Javadoc
/**
* The Class ContentTranslation.
*
* @author danigb@gmail.com
* @author vjrj@ourproject.org (Vicente J. Ruiz Jurado)
*/
@Entity
@Table(name = "content_translations")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ContentTranslation implements HasId {
/** The content id. */
private Long contentId;
/** The id. */
@Id
@GeneratedValue
private Long id;
/** The language. */
@ManyToOne(fetch = FetchType.LAZY)
private I18nLanguage language;
public ContentTranslation() {
}
/**
* Gets the content id.
*
* @return the content id
*/
public Long getContentId() {
return contentId;
}
/*
* (non-Javadoc)
*
* @see cc.kune.domain.utils.HasId#getId()
*/
@Override
public Long getId() {
return id;
}
/**
* Gets the language.
*
* @return the language
*/
public I18nLanguage getLanguage() {
return language;
}
/**
* Sets the content id.
*
* @param contentId
* the new content id
*/
public void setContentId(final Long contentId) {
this.contentId = contentId;
}
/*
* (non-Javadoc)
*
* @see cc.kune.domain.utils.HasId#setId(java.lang.Long)
*/
@Override
public void setId(final Long id) {
this.id = id;
}
/**
* Sets the language.
*
* @param language
* the new language
*/
public void setLanguage(final I18nLanguage language) {
this.language = language;
}
}