
org.broadleafcommerce.common.site.domain.SiteImpl Maven / Gradle / Ivy
/*
* Copyright 2008-2012 the original author or authors.
*
* 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 org.broadleafcommerce.common.site.domain;
import org.broadleafcommerce.common.presentation.AdminPresentation;
import org.broadleafcommerce.common.presentation.client.VisibilityEnum;
import org.broadleafcommerce.common.sandbox.domain.SandBox;
import org.broadleafcommerce.common.sandbox.domain.SandBoxImpl;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
/**
* Created by bpolster.
*/
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BLC_SITE")
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region="blCMSElements")
public class SiteImpl implements Site {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "SiteId", strategy = GenerationType.TABLE)
@TableGenerator(name = "SiteId", table = "SEQUENCE_GENERATOR", pkColumnName = "ID_NAME", valueColumnName = "ID_VAL", pkColumnValue = "SiteImpl", allocationSize = 10)
@Column(name = "SITE_ID")
protected Long id;
@Column (name = "NAME")
@AdminPresentation(friendlyName = "SiteImpl_Site_Name", order=1, group = "SiteImpl_Site")
protected String name;
@Column (name = "SITE_IDENTIFIER_TYPE")
@AdminPresentation(friendlyName = "SiteImpl_Site_Identifier_Type", order=2, group = "SiteImpl_Site")
protected String siteIdentifierType;
@Column (name = "SITE_IDENTIFIER_VALUE")
@AdminPresentation(friendlyName = "SiteImpl_Site_Identifier_Value", order=3, group = "SiteImpl_Site")
protected String siteIdentifierValue;
@ManyToOne(targetEntity = SandBoxImpl.class)
@JoinColumn(name = "PRODUCTION_SANDBOX_ID")
@AdminPresentation(friendlyName = "SiteImpl_Production_SandBox", order=4, group = "SiteImpl_Site", visibility = VisibilityEnum.HIDDEN_ALL)
protected SandBox productionSandbox;
@Override
public Long getId() {
return id;
}
@Override
public void setId(Long id) {
this.id = id;
}
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public String getSiteIdentifierType() {
return siteIdentifierType;
}
@Override
public void setSiteIdentifierType(String siteIdentifierType) {
this.siteIdentifierType = siteIdentifierType;
}
@Override
public String getSiteIdentifierValue() {
return siteIdentifierValue;
}
@Override
public void setSiteIdentifierValue(String siteIdentifierValue) {
this.siteIdentifierValue = siteIdentifierValue;
}
@Override
public SandBox getProductionSandbox() {
return productionSandbox;
}
@Override
public void setProductionSandbox(SandBox productionSandbox) {
this.productionSandbox = productionSandbox;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy