EagerForeignCollection.smali
.class public Lcom/j256/ormlite/dao/EagerForeignCollection;
.super Lcom/j256/ormlite/dao/BaseForeignCollection;
.source "SourceFile"
# interfaces
.implements Lcom/j256/ormlite/dao/CloseableWrappedIterable;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"ID:",
"Ljava/lang/Object;",
">",
"Lcom/j256/ormlite/dao/BaseForeignCollection<",
"TT;TID;>;",
"Lcom/j256/ormlite/dao/CloseableWrappedIterable<",
"TT;>;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = -0x2304b05d8755d8d9L
# instance fields
.field private results:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lcom/j256/ormlite/dao/Dao;Ljava/lang/Object;Ljava/lang/Object;Lcom/j256/ormlite/field/FieldType;Ljava/lang/String;Z)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/j256/ormlite/dao/Dao<",
"TT;TID;>;",
"Ljava/lang/Object;",
"Ljava/lang/Object;",
"Lcom/j256/ormlite/field/FieldType;",
"Ljava/lang/String;",
"Z)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/sql/SQLException;
}
.end annotation
.line 1
invoke-direct/range {p0 .. p6}, Lcom/j256/ormlite/dao/BaseForeignCollection;-><init>(Lcom/j256/ormlite/dao/Dao;Ljava/lang/Object;Ljava/lang/Object;Lcom/j256/ormlite/field/FieldType;Ljava/lang/String;Z)V
if-nez p3, :cond_d
.line 2
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
goto :goto_17
.line 3
:cond_d
invoke-virtual {p0}, Lcom/j256/ormlite/dao/BaseForeignCollection;->getPreparedQuery()Lcom/j256/ormlite/stmt/PreparedQuery;
move-result-object p2
invoke-interface {p1, p2}, Lcom/j256/ormlite/dao/Dao;->query(Lcom/j256/ormlite/stmt/PreparedQuery;)Ljava/util/List;
move-result-object p1
iput-object p1, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
:goto_17
return-void
.end method
.method public static synthetic access$000(Lcom/j256/ormlite/dao/EagerForeignCollection;)Ljava/util/List;
.registers 1
iget-object p0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
return-object p0
.end method
# virtual methods
.method public add(Ljava/lang/Object;)Z
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)Z"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 2
invoke-super {p0, p1}, Lcom/j256/ormlite/dao/BaseForeignCollection;->add(Ljava/lang/Object;)Z
move-result p1
return p1
:cond_d
const/4 p1, 0x0
return p1
.end method
.method public addAll(Ljava/util/Collection;)Z
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"+TT;>;)Z"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
move-result v0
if-eqz v0, :cond_d
.line 2
invoke-super {p0, p1}, Lcom/j256/ormlite/dao/BaseForeignCollection;->addAll(Ljava/util/Collection;)Z
move-result p1
return p1
:cond_d
const/4 p1, 0x0
return p1
.end method
.method public close()V
.registers 1
return-void
.end method
.method public closeLastIterator()V
.registers 1
return-void
.end method
.method public closeableIterator()Lcom/j256/ormlite/dao/CloseableIterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/j256/ormlite/dao/CloseableIterator<",
"TT;>;"
}
.end annotation
const/4 v0, -0x1
.line 1
invoke-virtual {p0, v0}, Lcom/j256/ormlite/dao/EagerForeignCollection;->iteratorThrow(I)Lcom/j256/ormlite/dao/CloseableIterator;
move-result-object v0
return-object v0
.end method
.method public closeableIterator(I)Lcom/j256/ormlite/dao/CloseableIterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/j256/ormlite/dao/CloseableIterator<",
"TT;>;"
}
.end annotation
const/4 p1, -0x1
.line 2
invoke-virtual {p0, p1}, Lcom/j256/ormlite/dao/EagerForeignCollection;->iteratorThrow(I)Lcom/j256/ormlite/dao/CloseableIterator;
move-result-object p1
return-object p1
.end method
.method public contains(Ljava/lang/Object;)Z
.registers 3
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method public containsAll(Ljava/util/Collection;)Z
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"*>;)Z"
}
.end annotation
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->containsAll(Ljava/util/Collection;)Z
move-result p1
return p1
.end method
.method public equals(Ljava/lang/Object;)Z
.registers 3
.line 1
instance-of v0, p1, Lcom/j256/ormlite/dao/EagerForeignCollection;
if-nez v0, :cond_6
const/4 p1, 0x0
return p1
.line 2
:cond_6
check-cast p1, Lcom/j256/ormlite/dao/EagerForeignCollection;
.line 3
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
iget-object p1, p1, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method public getWrappedIterable()Lcom/j256/ormlite/dao/CloseableWrappedIterable;
.registers 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/j256/ormlite/dao/CloseableWrappedIterable<",
"TT;>;"
}
.end annotation
return-object p0
.end method
.method public getWrappedIterable(I)Lcom/j256/ormlite/dao/CloseableWrappedIterable;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/j256/ormlite/dao/CloseableWrappedIterable<",
"TT;>;"
}
.end annotation
return-object p0
.end method
.method public hashCode()I
.registers 2
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->hashCode()I
move-result v0
return v0
.end method
.method public isEager()Z
.registers 2
const/4 v0, 0x1
return v0
.end method
.method public isEmpty()Z
.registers 2
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
move-result v0
return v0
.end method
.method public iterator()Lcom/j256/ormlite/dao/CloseableIterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/j256/ormlite/dao/CloseableIterator<",
"TT;>;"
}
.end annotation
const/4 v0, -0x1
.line 2
invoke-virtual {p0, v0}, Lcom/j256/ormlite/dao/EagerForeignCollection;->iteratorThrow(I)Lcom/j256/ormlite/dao/CloseableIterator;
move-result-object v0
return-object v0
.end method
.method public iterator(I)Lcom/j256/ormlite/dao/CloseableIterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/j256/ormlite/dao/CloseableIterator<",
"TT;>;"
}
.end annotation
.line 3
invoke-virtual {p0, p1}, Lcom/j256/ormlite/dao/EagerForeignCollection;->iteratorThrow(I)Lcom/j256/ormlite/dao/CloseableIterator;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic iterator()Ljava/util/Iterator;
.registers 2
.line 1
invoke-virtual {p0}, Lcom/j256/ormlite/dao/EagerForeignCollection;->iterator()Lcom/j256/ormlite/dao/CloseableIterator;
move-result-object v0
return-object v0
.end method
.method public iteratorThrow()Lcom/j256/ormlite/dao/CloseableIterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/j256/ormlite/dao/CloseableIterator<",
"TT;>;"
}
.end annotation
const/4 v0, -0x1
.line 1
invoke-virtual {p0, v0}, Lcom/j256/ormlite/dao/EagerForeignCollection;->iteratorThrow(I)Lcom/j256/ormlite/dao/CloseableIterator;
move-result-object v0
return-object v0
.end method
.method public iteratorThrow(I)Lcom/j256/ormlite/dao/CloseableIterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/j256/ormlite/dao/CloseableIterator<",
"TT;>;"
}
.end annotation
.line 2
new-instance p1, Lcom/j256/ormlite/dao/EagerForeignCollection$1;
invoke-direct {p1, p0}, Lcom/j256/ormlite/dao/EagerForeignCollection$1;-><init>(Lcom/j256/ormlite/dao/EagerForeignCollection;)V
return-object p1
.end method
.method public refreshAll()I
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/sql/SQLException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v1, 0x0
:goto_7
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_19
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
.line 2
iget-object v3, p0, Lcom/j256/ormlite/dao/BaseForeignCollection;->dao:Lcom/j256/ormlite/dao/Dao;
invoke-interface {v3, v2}, Lcom/j256/ormlite/dao/Dao;->refresh(Ljava/lang/Object;)I
move-result v2
add-int/2addr v1, v2
goto :goto_7
:cond_19
return v1
.end method
.method public refreshCollection()I
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/sql/SQLException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/BaseForeignCollection;->dao:Lcom/j256/ormlite/dao/Dao;
invoke-virtual {p0}, Lcom/j256/ormlite/dao/BaseForeignCollection;->getPreparedQuery()Lcom/j256/ormlite/stmt/PreparedQuery;
move-result-object v1
invoke-interface {v0, v1}, Lcom/j256/ormlite/dao/Dao;->query(Lcom/j256/ormlite/stmt/PreparedQuery;)Ljava/util/List;
move-result-object v0
iput-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
.line 2
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
return v0
.end method
.method public remove(Ljava/lang/Object;)Z
.registers 4
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_20
iget-object v0, p0, Lcom/j256/ormlite/dao/BaseForeignCollection;->dao:Lcom/j256/ormlite/dao/Dao;
if-nez v0, :cond_e
goto :goto_20
.line 2
:cond_e
:try_start_e
invoke-interface {v0, p1}, Lcom/j256/ormlite/dao/Dao;->delete(Ljava/lang/Object;)I
move-result p1
:try_end_12
.catch Ljava/sql/SQLException; {:try_start_e .. :try_end_12} :catch_17
const/4 v0, 0x1
if-ne p1, v0, :cond_16
const/4 v1, 0x1
:cond_16
return v1
:catch_17
move-exception p1
.line 3
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Could not delete data element from dao"
invoke-direct {v0, v1, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
:cond_20
:goto_20
return v1
.end method
.method public removeAll(Ljava/util/Collection;)Z
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"*>;)Z"
}
.end annotation
.line 1
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object p1
const/4 v0, 0x0
:cond_5
:goto_5
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_17
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
.line 2
invoke-virtual {p0, v1}, Lcom/j256/ormlite/dao/EagerForeignCollection;->remove(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_5
const/4 v0, 0x1
goto :goto_5
:cond_17
return v0
.end method
.method public retainAll(Ljava/util/Collection;)Z
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"*>;)Z"
}
.end annotation
invoke-super {p0, p1}, Lcom/j256/ormlite/dao/BaseForeignCollection;->retainAll(Ljava/util/Collection;)Z
move-result p1
return p1
.end method
.method public size()I
.registers 2
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
return v0
.end method
.method public toArray()[Ljava/lang/Object;
.registers 2
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->toArray()[Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public toArray([Ljava/lang/Object;)[Ljava/lang/Object;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">([TE;)[TE;"
}
.end annotation
.line 2
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public updateAll()I
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/sql/SQLException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/j256/ormlite/dao/EagerForeignCollection;->results:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v1, 0x0
:goto_7
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_19
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
.line 2
iget-object v3, p0, Lcom/j256/ormlite/dao/BaseForeignCollection;->dao:Lcom/j256/ormlite/dao/Dao;
invoke-interface {v3, v2}, Lcom/j256/ormlite/dao/Dao;->update(Ljava/lang/Object;)I
move-result v2
add-int/2addr v1, v2
goto :goto_7
:cond_19
return v1
.end method