1 package org.splat.dal.bo.som;
4 * @author Daniel Brunier-Coulin
5 * @copyright OPEN CASCADE 2012-2015
8 import org.splat.dal.bo.kernel.Persistent;
9 import org.splat.dal.bo.kernel.Relation;
12 public class ConvertsRelation extends Relation {
18 private boolean got; // For optimizing getDescription()
19 private String description; // Null if this is not described
21 // ==============================================================================================================================
23 // ==============================================================================================================================
25 // Database fetch constructor
26 protected ConvertsRelation () {
27 // -----------------------------
31 // Initialization constructors
32 protected ConvertsRelation (final Document from, final File to) {
33 // ---------------------------------------------------
37 this.description = null; // Conversion not described
39 public ConvertsRelation (final Document from, final File to, final String description) {
40 // -----------------------------------------------------------------------
44 this.description = description; // May be null
45 if (description != null) {
46 this.setAttribute( new DescriptionAttribute(this, description) );
50 // ==============================================================================================================================
51 // Public member functions
52 // ==============================================================================================================================
54 public String getDescription () {
55 // -------------------------------
57 DescriptionAttribute field = (DescriptionAttribute)this.getAttribute(DescriptionAttribute.class);
59 description = field.getValue();
61 got = true; // Don't need to be modified later as set and remove attribute functions are private to this class
63 return description; // May be null
67 public File getTo () {
68 // --------------------
73 public void setTo (final Persistent to) {
74 // ------------------------------------