net.groupbuy.entity.Parameter.java Source code

Java tutorial

Introduction

Here is the source code for net.groupbuy.entity.Parameter.java

Source

/*
 * Copyright 2005-2013 shopxx.net. All rights reserved.
 * Support: http://www.shopxx.net
 * License: http://www.shopxx.net/license
 */
package net.groupbuy.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Entity - ?
 * 
 * @author SHOP++ Team
 * @version 3.0
 */
@Entity
@Table(name = "xx_parameter")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_parameter_sequence")
public class Parameter extends OrderEntity {

    private static final long serialVersionUID = -5833568086582136314L;

    /** ?? */
    private String name;

    /** ? */
    private ParameterGroup parameterGroup;

    /**
     * ???
     * 
     * @return ??
     */
    @JsonProperty
    @NotEmpty
    @Length(max = 200)
    @Column(nullable = false)
    public String getName() {
        return name;
    }

    /**
     * ??
     * 
     * @param name
     *            ??
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    public ParameterGroup getParameterGroup() {
        return parameterGroup;
    }

    /**
     * ?
     * 
     * @param parameterGroup
     *            ?
     */
    public void setParameterGroup(ParameterGroup parameterGroup) {
        this.parameterGroup = parameterGroup;
    }

}