使用Random来作为Field内容, 并重写toString, 便于在debug时分辨出名称相同的对象, 如:
某类: Employee: [ AS实现]:
/** * Constractor */ public function Employee(name_:String = null) { _name = name_; objectID = Math.random(); } //--------------------------toString----------------- public function toString():String { return name + " - " + objectID; }
未加id及覆盖toString前的输出信息:
[DEBUG] Controler Current Selceted Employee: [object Employee]
[DEBUG] Controler Current Selceted Employee: [object Employee]
[DEBUG] Controler Current Selceted Employee: [object Employee]
[DEBUG] Controler Current Selceted Employee: [object Employee]
加上之后:
[DEBUG] Controler Current Selceted Employee: Tom – 0.9672538451850414
[DEBUG] Controler Current Selceted Employee: Tom – 0.5573517205193639
[DEBUG] Controler Current Selceted Employee: Tom – 0.9672538451850414
[DEBUG] Controler Current Selceted Employee: Tom – 0.5573517205193639
JDBC中Preparedstatement使用小结 及JDBC插入数据后获得Last insert ID <->
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.