-
Notifications
You must be signed in to change notification settings - Fork 25
/
a.java
187 lines (165 loc) · 4.39 KB
/
a.java
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.fitbit.data.repo;
import com.fitbit.data.domain.Entity;
import com.fitbit.data.repo.mem.d;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
// Referenced classes of package com.fitbit.data.repo:
// ao, ap
public abstract class a
implements ao
{
private List listeners;
public a()
{
listeners = new ArrayList();
}
public void add(Entity entity)
{
prepareEntity(entity);
doAdd(entity);
informListeners();
}
public void addAll(List list)
{
for (list = list.iterator(); list.hasNext(); add((Entity)list.next())) { }
}
public void addListener(ap ap1)
{
List list = listeners;
list;
JVM INSTR monitorenter ;
Iterator iterator = listeners.iterator();
_L2:
ap ap2;
do
{
if (!iterator.hasNext())
{
break MISSING_BLOCK_LABEL_60;
}
ap2 = (ap)((WeakReference)iterator.next()).get();
} while (ap2 == null);
if (!ap2.equals(ap1)) goto _L2; else goto _L1
_L1:
list;
JVM INSTR monitorexit ;
return;
listeners.add(new WeakReference(ap1));
list;
JVM INSTR monitorexit ;
return;
ap1;
list;
JVM INSTR monitorexit ;
throw ap1;
}
public void deleteAll(Iterable iterable)
{
for (iterable = iterable.iterator(); iterable.hasNext(); delete((Entity)iterable.next())) { }
}
protected abstract void doAdd(Entity entity);
public Entity getById(long l)
{
throw new UnsupportedOperationException();
}
public List getPendingEntries()
{
return d.a(getAll(), new com.fitbit.data.repo.mem.d.a() {
final a a;
public boolean a(Entity entity)
{
return entity.getEntityStatus() == com.fitbit.data.domain.Entity.EntityStatus.PENDING_OPERATION || entity.getEntityStatus() == com.fitbit.data.domain.Entity.EntityStatus.PENDING_DELETE;
}
public volatile boolean a(Object obj)
{
return a((Entity)obj);
}
{
a = a.this;
super();
}
});
}
public void informListeners()
{
List list = listeners;
list;
JVM INSTR monitorenter ;
Iterator iterator = listeners.iterator();
_L1:
ap ap1;
if (!iterator.hasNext())
{
break MISSING_BLOCK_LABEL_73;
}
ap1 = (ap)((WeakReference)iterator.next()).get();
if (ap1 != null)
{
break MISSING_BLOCK_LABEL_60;
}
iterator.remove();
goto _L1
Exception exception;
exception;
list;
JVM INSTR monitorexit ;
throw exception;
ap1.b(getName());
goto _L1
list;
JVM INSTR monitorexit ;
}
protected void prepareEntity(Entity entity)
{
if (entity.getUuid() == null)
{
entity.setUuid(UUID.randomUUID());
}
Date date = new Date();
if (entity.getTimeCreated() == null)
{
entity.setTimeCreated(date);
}
if (entity.getTimeUpdated() == null)
{
entity.setTimeUpdated(date);
}
}
public void removeListener(ap ap1)
{
List list = listeners;
list;
JVM INSTR monitorenter ;
Iterator iterator = listeners.iterator();
_L2:
ap ap2;
do
{
if (!iterator.hasNext())
{
break MISSING_BLOCK_LABEL_68;
}
ap2 = (ap)((WeakReference)iterator.next()).get();
} while (ap2 != null && ap2 != ap1);
iterator.remove();
if (true) goto _L2; else goto _L1
_L1:
ap1;
list;
JVM INSTR monitorexit ;
throw ap1;
list;
JVM INSTR monitorexit ;
}
public void saveAll(Iterable iterable)
{
for (iterable = iterable.iterator(); iterable.hasNext(); save((Entity)iterable.next())) { }
}
}