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>
}
}
an> System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; using Tango.BL.Entities; using Tango.MachineStudio.Common.Notifications; using Tango.SharedUI; namespace Tango.MachineStudio.DB.ViewModels { public class MachinesViewVM : DbTableViewModel<Machine> { public MachinesViewVM(INotificationProvider notification) : base(notification) { } protected override void InitializeEntity(Machine entity) { base.InitializeEntity(entity); entity.ProductionDate = DateTime.UtcNow; } } }