1 //!-- UTF8 2 /* 3 Oregano Multiuser Server - Version 1.2.0 - January 4th, 2005 4 5 Web: www.oregano-server.org 6 Mail: info@oregano-server.org 7 8 Copyright 2003 - 2004 - 2004 Jens Halm / Cologne, Germany 9 10 This library is free software; you can redistribute it and/or 11 modify it under the terms of the GNU Lesser General Public 12 License as published by the Free Software Foundation; either 13 version 2.1 of the License, or (at your option) any later version. 14 15 This library is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 Lesser General Public License for more details. 19 20 You should have received a copy of the GNU Lesser General Public 21 License along with this library; if not, write to the Free Software 22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 25 /* 26 ------------------------------------------- 27 Classe RemoveRow 28 29 @description : 30 Gère la mise à jour des données d'une Table. 31 32 33 @author Jens Halm copyright http://www.spicefactory.org/ 34 @author erixtekila copyleft http://www.v-i-a.net 35 ------------------------------------------- 36 version history : 37 1.2.0 : 17/01/05 38 - Portage en actionscript 2 pour le 39 compile time type checking 40 ------------------------------------------- 41 */ 42 43 import org.omus.data.Table; 44 45 /** 46 * Portion de UpdateSequence. 47 * 48 * @see org.omus.data.UpdateSequence 49 * 50 * @author Jens Halm copyright http://www.spicefactory.org/ 51 * @author erixtekila copyleft http://www.v-i-a.net 52 * @version 1.2.0 53 */ 54 class org.omus.data.RemoveRow 55 { 56 //-------------------- 57 // PROPRIETES 58 //-------------------- 59 /** 60 * Identifiant. 61 */ 62 private var rowID:Number; 63 64 //-------------------- 65 // CONSTRUCTEUR 66 //-------------------- 67 /** 68 * 69 * @param id Identifiant de l'enregistrement. 70 */ 71 public function RemoveRow(id:Number) 72 { 73 // Proppriétés. 74 rowID = id; 75 76 // trace(this+ " installé."); 77 } 78 79 //-------------------- 80 // METHODES PUBLIQUES 81 //-------------------- 82 /** 83 * Utilisé dans un contexte littéral 84 * @return Une chaine définissant l'objet 85 */ 86 public function toString ():String 87 { 88 return "org.omus.data.RemoveRow - rowID = " + rowID; 89 } 90 91 /** 92 * Initialisation des valeurs à mettre à jour. 93 * 94 * @param table Une référence à la Table à mettre à jour. 95 * @param clientReq true si c'est le client qui effectue la requette, false si cela vient d'un autre utilisateur. 96 */ 97 public function execute (table:Table, clientReq:Boolean):Void 98 { 99 table.removeEvent(rowID, clientReq); 100 } 101 102 /** 103 * Encodage. 104 * 105 * @return Une chaîne encodée. 106 */ 107 public function getMarshalledSequence ():String 108 { 109 // TODO : Passer la constante dans cette classe. 110 return "#p" + org.omus.data.UpdateSequence.REMOVE_ROW + "#x" + rowID + "#x#z"; 111 } 112 113 //-------------------- 114 // METHODES PRIVEES 115 //-------------------- 116 /** 117 * Formatage d'une chaine d'informations sur cet objet. 118 * 119 * @return Une chaine formatée. 120 */ 121 private function format ():String 122 { 123 return "[Object RemoveRow]"; 124 } 125 126 //-------------------- 127 // METHODES STATIQUES 128 //-------------------- 129 /** 130 * Utilisé dans un contexte littéral 131 * @return Une chaine définissant l'objet 132 */ 133 public static function toLog():String 134 { 135 return "[Object RemoveRow]"; 136 } 137 }