/******************************************************************************* * Copyright 2006 - 2012 Vienna University of Technology, * Department of Software Technology and Interactive Systems, IFS * * 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 eu.scape_project.planning.model; import java.io.Serializable; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.OneToOne; /** * Gives information on the collection in question for the preservation plan. * * @author Hannes Kulovits */ @Entity public class CollectionProfile implements Serializable { private static final long serialVersionUID = -7231372100700050878L; public CollectionProfile() { } @Id @GeneratedValue private int id; /** * Hibernate note: standard length for a string column is 255 validation is * broken because we use facelet templates (issue resolved in Seam 2.0) * therefore allow "long" entries */ @Lob private String collectionID; /** * Hibernate note: standard length for a string column is 255 validation is * broken because we use facelet templates (issue resolved in Seam 2.0) * therefore allow "long" entries */ @Lob private String description; /** * Hibernate note: standard length for a string column is 255 validation is * broken because we use facelet templates (issue resolved in Seam 2.0) * therefore allow "long" entries */ @Lob private String typeOfObjects; /** * Hibernate note: standard length for a string column is 255 validation is * broken because we use facelet templates (issue resolved in Seam 2.0) * therefore allow "long" entries */ @Lob private String numberOfObjects; /** * Hibernate note: standard length for a string column is 255 validation is * broken because we use facelet templates (issue resolved in Seam 2.0) * therefore allow "long" entries */ @Lob private String expectedGrowthRate; /** * Hibernate note: standard length for a string column is 255 validation is * broken because we use facelet templates (issue resolved in Seam 2.0) * therefore allow "long" entries */ @Lob private String retentionPeriod; @OneToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH, CascadeType.DETACH}) private DigitalObject profileDigitalObject; public String getRetentionPeriod() { return retentionPeriod; } public void setRetentionPeriod(String retentionPeriod) { this.retentionPeriod = retentionPeriod; } public String getCollectionID() { return collectionID; } public void setCollectionID(String collectionID) { this.collectionID = collectionID; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getExpectedGrowthRate() { return expectedGrowthRate; } public void setExpectedGrowthRate(String expectedGrowthRate) { this.expectedGrowthRate = expectedGrowthRate; } public String getNumberOfObjects() { return numberOfObjects; } public void setNumberOfObjects(String numberOfObjects) { this.numberOfObjects = numberOfObjects; } public String getTypeOfObjects() { return typeOfObjects; } public void setTypeOfObjects(String typeOfObjects) { this.typeOfObjects = typeOfObjects; } public int getId() { return id; } public void setId(int id) { this.id = id; } /** * @return the profile */ public DigitalObject getProfile() { return profileDigitalObject; } /** * @param profile * the profile to set */ public void setProfile(DigitalObject profile) { this.profileDigitalObject = profile; } }