/*
* Licensed to csti consulting
* You may obtain a copy of the License at
*
* http://www.csticonsulting.com
* Copyright (c) 2006-Aug 24, 2010 Consultation CS-TI inc.
*
* 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 com.salesmanager.core.entity.reference;
import java.util.Set;
import com.salesmanager.core.util.FileUtil;
/**
* DynamicLabel generated by hbm2java
*/
public class DynamicLabel implements java.io.Serializable {
// Fields
private long dynamicLabelId;
private int merchantId;
private int sectionId;
private java.lang.Integer sortOrder;
private boolean visible;
private String title = "";
private java.lang.Integer position;
private String image;
private Set descriptions;
// Constructors
/** default constructor */
public DynamicLabel() {
}
/** full constructor */
public DynamicLabel(long dynamicLabelId, int merchantId, int sectionId,
Integer sortOrder, boolean visible, String title, Integer position) {
this.dynamicLabelId = dynamicLabelId;
this.merchantId = merchantId;
this.sectionId = sectionId;
this.sortOrder = sortOrder;
this.visible = visible;
this.title = title;
this.position = position;
}
// Property accessors
public long getDynamicLabelId() {
return this.dynamicLabelId;
}
public void setDynamicLabelId(long dynamicLabelId) {
this.dynamicLabelId = dynamicLabelId;
}
public int getMerchantId() {
return this.merchantId;
}
public void setMerchantId(int merchantId) {
this.merchantId = merchantId;
}
public int getSectionId() {
return this.sectionId;
}
public void setSectionId(int sectionId) {
this.sectionId = sectionId;
}
public Set getDescriptions() {
return descriptions;
}
public void setDescriptions(Set descriptions) {
this.descriptions = descriptions;
}
public DynamicLabelDescription getDynamicLabelDescription() {
DynamicLabelDescription desc = null;
if (this.getDescriptions() != null && this.getDescriptions().size() > 0) {
DynamicLabelDescription[] descArray = (DynamicLabelDescription[]) this
.getDescriptions().toArray(
new DynamicLabelDescription[this.getDescriptions()
.size()]);
if (descArray != null && descArray.length > 0) {
desc = descArray[0];
}
}
return desc;
}
public String getLabelImagePath() {
return new StringBuilder().append(FileUtil.getBinServerUrl(this.getMerchantId(),true)).append(this.getImage()).toString();
}
public java.lang.Integer getSortOrder() {
return sortOrder;
}
public void setSortOrder(java.lang.Integer sortOrder) {
this.sortOrder = sortOrder;
}
public boolean isVisible() {
return visible;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
public java.lang.Integer getPosition() {
return position;
}
public void setPosition(java.lang.Integer position) {
this.position = position;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
}