1 /* 2 * sbxb library, part of ULMgen product 3 * Copyright (C) 2003,2005 Thierry Beigbeder 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 /* 20 * $Header: $ 21 * $Revision: $ 22 * $Date: $ 23 * 24 * History : 25 * Who yyyy/mm/dd Action 26 * -------- ---------- ------ 27 */ 28 29 30 package org.otvl.sbxbsamp.abcref; 31 32 33 // Insert here additional imports 34 35 36 import org.otvl.sbxb.reference.XmlReferencee; 37 38 39 /*** 40 * 41 * @author 42 * @version 43 */ 44 45 46 public abstract class BaseRefee 47 implements XmlReferencee 48 49 { 50 /*------------------------------------------------------------------------- 51 * Attributes declaration 52 *-------------------------------------------------------------------------*/ 53 54 55 /*------------------------------------------------------------------------- 56 * Associations declaration 57 *-------------------------------------------------------------------------*/ 58 59 60 /*------------------------------------------------------------------------- 61 * Operations 62 *-------------------------------------------------------------------------*/ 63 /*** 64 * Provides a unique reference for the current object. 65 * The class implementing the reference must implement hashcode/equals. 66 * @return Object 67 */ 68 public Object getSbxbReference() 69 { 70 Object vGetSbxbReference; 71 72 vGetSbxbReference = doGetReference(); 73 return vGetSbxbReference; 74 75 } 76 /*** 77 * Provides a unique reference for the current object. 78 * The class implementing the reference must implement hashcode/equals. 79 * @return Object 80 */ 81 protected abstract Object doGetReference() 82 ; 83 /*** 84 * Called when a reference has been instantiated and updated after successful parsing. 85 * May be implemented by a referencee to update its state from the state of the reference. 86 * @param ref 87 */ 88 public void setSbxbReference( 89 Object ref 90 ) 91 { 92 93 doSetSbxbReference(ref); 94 95 } 96 /*** 97 * Called when a reference has been instantiated and updated after successful parsing. 98 * May be implemented by a referencee to update its state from the state of the reference. 99 * @param ref 100 * @return void 101 */ 102 public abstract void doSetSbxbReference( 103 Object ref 104 ) 105 ; 106 107 108 /*------------------------------------------------------------------------- 109 * Attribute accessors 110 *-------------------------------------------------------------------------*/ 111 112 113 /*------------------------------------------------------------------------- 114 * Association accessors 115 *-------------------------------------------------------------------------*/ 116 117 }