Java tutorial
/*$Id: SubSchemaData.java 14740 2010-02-03 09:16:34Z jens $*/ /* **************************************************************************** * * * (c) Copyright 2009 ABM-utvikling * * * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 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 General * * Public License for more details. http://www.gnu.org/licenses/gpl.html * * * **************************************************************************** */ package no.abmu.questionnaire.domain.data; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import no.abmu.questionnaire.domain.metadata.SubSchema; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.annotations.Index; /** * SubSchemaData. * * @author Aase Mestad * @author $Author: jens $ * @version $Rev: 14740 $ * @date $Date: 2010-02-03 10:16:34 +0100 (Wed, 03 Feb 2010) $ * @copyright ABM-Utvikling */ @SuppressWarnings("serial") @Entity public class SubSchemaData extends SchemaDataImpl { private static final Log logger = (Log) LogFactory.getLog(SubSchemaData.class); private SubSchema subSchema; private SubSchemaDataList subSchemaDataList; private int orderIdx; public SubSchemaData() { } public SubSchemaData(SubSchema subSchema) { super(subSchema); } @ManyToOne(targetEntity = SubSchemaDataList.class) @Index(name = "subSchemaData_subSchemaDataList_idx") public SubSchemaDataList getSubSchemaDataList() { return subSchemaDataList; } public void setSubSchemaDataList(SubSchemaDataList subSchemaDataList) { this.subSchemaDataList = subSchemaDataList; } @ManyToOne(targetEntity = SubSchema.class, cascade = CascadeType.ALL) @JoinColumn(name = "FK_SUBSCHEMA_ID") public SubSchema getSubSchema() { return subSchema; } public void setSubSchema(SubSchema subSchema) { this.subSchema = subSchema; } public int getOrderIdx() { return orderIdx; } public void setOrderIdx(int orderIdx) { this.orderIdx = orderIdx; } }