/* Copyright (c) 2009 The Regents of the University of California. All rights reserved. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.. */ package org.clothocad.hibernate.data; // Generated Jun 1, 2010 8:47:54 PM by Hibernate Tools 3.2.1.GA import java.util.Date; import java.util.HashSet; import java.util.Set; import org.clothocore.api.data.Format; import org.clothocore.api.data.Format.FormatDatum; import org.clothocore.api.data.ObjBase; import org.clothocore.api.data.ObjBase.ObjBaseDatum; import org.clothocore.api.data.ObjType; import org.clothocad.hibernate.hibernateDatum; /** * FormatTable generated by hbm2java */ public class FormatTable implements java.io.Serializable, hibernateDatum { public static ObjType getType( Enum field ) { if ( field.getDeclaringClass() != Format.Fields.class ) { return null; } Format.Fields f = (Format.Fields) field; switch ( f ) { case VECTORS: return ObjType.VECTOR; case PARTS: return ObjType.PART; case PLASMIDS: return ObjType.PLASMID; default: return null; } } public FormatTable( Format f ) { this.idformat = f.getUUID(); this.name = f.getName(); this.description = f.getShortDescription(); this.dateCreated = f.getDateCreated(); this.lastModified = f.getLastModified(); this.pluginDownloadLink = f.getPluginDownloadLink(); this.pluginHelpLink = f.getPluginHelpLink(); this.pluginId = f.getPluginId(); } @Override public void runSecondaryProcessing(ObjBase obj) { } @Override public boolean needsSecondaryProcessing() { return false; } @Override public ObjBase getObject() { Format.FormatDatum d = (FormatDatum) getObjBaseDatum(); Format f = new Format( d ); return f; } @Override public ObjBaseDatum getObjBaseDatum() { Format.FormatDatum d = new Format.FormatDatum(); d.uuid = idformat; d.name = name; d.dateCreated = dateCreated; d.lastModified = lastModified; d._shortDescription = description; d._pluginDownloadLink = pluginDownloadLink; d._pluginHelpLink = pluginHelpLink; d._pluginId = pluginId; return d; } @Override public String getUUID() { return idformat; } public static String translate( Enum field ) { if ( field.getDeclaringClass() != Format.Fields.class ) { return null; } Format.Fields f = (Format.Fields) field; switch ( f ) { case NAME: return "name"; case DATE_CREATED: return "dateCreated"; case LAST_MODIFIED: return "lastModifed"; case DOWNLOAD_LINK: return "pluginDownloadLink"; case HELP_LINK: return "pluginHelpLink"; case SHORT_DESCRIPTION: return "description"; case PLUGIN_ID: return "pluginId"; case VECTORS: return "vectorTables"; case PARTS: return "partTables"; case PLASMIDS: return "plasmidTables"; default: return null; } } /***** AUTO-GENERATED CODE *****/ private String idformat; private String name; private String pluginHelpLink; private String pluginDownloadLink; private String description; private String pluginId; private Date dateCreated; private Date lastModified; private Set vectorTables = new HashSet( 0 ); private Set partTables = new HashSet( 0 ); private Set plasmidTables = new HashSet( 0 ); public FormatTable() { } public FormatTable( String idformat ) { this.idformat = idformat; } public FormatTable( String idformat, String name, String pluginHelpLink, String pluginDownloadLink, String description, String pluginId, Date dateCreated, Date lastModified, Set vectorTables, Set partTables, Set plasmidTables ) { this.idformat = idformat; this.name = name; this.pluginHelpLink = pluginHelpLink; this.pluginDownloadLink = pluginDownloadLink; this.description = description; this.pluginId = pluginId; this.dateCreated = dateCreated; this.lastModified = lastModified; this.vectorTables = vectorTables; this.partTables = partTables; this.plasmidTables = plasmidTables; } public String getIdformat() { return this.idformat; } public void setIdformat( String idformat ) { this.idformat = idformat; } public String getName() { return this.name; } public void setName( String name ) { this.name = name; } public String getPluginHelpLink() { return this.pluginHelpLink; } public void setPluginHelpLink( String pluginHelpLink ) { this.pluginHelpLink = pluginHelpLink; } public String getPluginDownloadLink() { return this.pluginDownloadLink; } public void setPluginDownloadLink( String pluginDownloadLink ) { this.pluginDownloadLink = pluginDownloadLink; } public String getDescription() { return this.description; } public void setDescription( String description ) { this.description = description; } public String getPluginId() { return this.pluginId; } public void setPluginId( String pluginId ) { this.pluginId = pluginId; } public Date getDateCreated() { return this.dateCreated; } public void setDateCreated( Date dateCreated ) { this.dateCreated = dateCreated; } public Date getLastModified() { return this.lastModified; } public void setLastModified( Date lastModified ) { this.lastModified = lastModified; } public Set getVectorTables() { return this.vectorTables; } public void setVectorTables( Set vectorTables ) { this.vectorTables = vectorTables; } public Set getPartTables() { return this.partTables; } public void setPartTables( Set partTables ) { this.partTables = partTables; } public Set getPlasmidTables() { return this.plasmidTables; } public void setPlasmidTables( Set plasmidTables ) { this.plasmidTables = plasmidTables; } }