LogEntryBase.as
4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**
* Generated by Gas3 v2.2.0 (Granite Data Services).
*
* WARNING: DO NOT CHANGE THIS FILE. IT MAY BE OVERWRITTEN EACH TIME YOU USE
* THE GENERATOR. INSTEAD, EDIT THE INHERITED CLASS (LogEntry.as).
*/
package fi.insomnia.bortal.model {
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
import flash.utils.IExternalizable;
import org.granite.collections.IPersistentCollection;
import org.granite.meta;
use namespace meta;
[Bindable]
public class LogEntryBase implements IExternalizable, ModelInterface {
private var __initialized:Boolean = true;
private var __detachedState:String = null;
private var _description:String;
private var _id:Number;
private var _jpaVersionField:int;
private var _parentEvent:LanEvent;
private var _time:Date;
private var _type:LogEntryType;
private var _user:User;
meta function isInitialized(name:String = null):Boolean {
if (!name)
return __initialized;
var property:* = this[name];
return (
(!(property is LogEntry) || (property as LogEntry).meta::isInitialized()) &&
(!(property is IPersistentCollection) || (property as IPersistentCollection).isInitialized())
);
}
public function set description(value:String):void {
_description = value;
}
public function get description():String {
return _description;
}
public function set id(value:Number):void {
_id = value;
}
public function get id():Number {
return _id;
}
public function set jpaVersionField(value:int):void {
_jpaVersionField = value;
}
public function get jpaVersionField():int {
return _jpaVersionField;
}
public function set parentEvent(value:LanEvent):void {
_parentEvent = value;
}
public function get parentEvent():LanEvent {
return _parentEvent;
}
public function set time(value:Date):void {
_time = value;
}
public function get time():Date {
return _time;
}
public function set type(value:LogEntryType):void {
_type = value;
}
public function get type():LogEntryType {
return _type;
}
public function set user(value:User):void {
_user = value;
}
public function get user():User {
return _user;
}
public function readExternal(input:IDataInput):void {
__initialized = input.readObject() as Boolean;
__detachedState = input.readObject() as String;
if (meta::isInitialized()) {
_description = input.readObject() as String;
_id = function(o:*):Number { return (o is Number ? o as Number : Number.NaN) } (input.readObject());
_jpaVersionField = input.readObject() as int;
_parentEvent = input.readObject() as LanEvent;
_time = input.readObject() as Date;
_type = input.readObject() as LogEntryType;
_user = input.readObject() as User;
}
else {
_id = function(o:*):Number { return (o is Number ? o as Number : Number.NaN) } (input.readObject());
}
}
public function writeExternal(output:IDataOutput):void {
output.writeObject(__initialized);
output.writeObject(__detachedState);
if (meta::isInitialized()) {
output.writeObject(_description);
output.writeObject(_id);
output.writeObject(_jpaVersionField);
output.writeObject(_parentEvent);
output.writeObject(_time);
output.writeObject(_type);
output.writeObject(_user);
}
else {
output.writeObject(_id);
}
}
}
}