aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml
blob: 46bd6532c89756ae713dfc5a388dc0641e659d4e (plain)
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
package com.twine.tango.dal.dao;

import com.raizlabs.android.dbflow.sql.language.SQLite;
@foreach (var entity in Model.Entities)
{
    <div>import com.twine.tango.dal.entities.@(entity.Name);</div>
}
import java.util.List;

public class TangoDAO
{
@foreach (var entity in Model.Entities)
{
<div>
    /**
    * Gets all the @(entity.TableName) from database.
    *
    * @@return all @(entity.TableName)
    */
    public static List<@(entity.Name)> getAll@(entity.TableName)()
    {
        return SQLite.select().from(@(entity.Name).class).queryList();
    }

</div>
}
}