From afc7a07d285e08d905c58dd5978441c155b2f296 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 19 Dec 2017 10:25:40 +0200 Subject: MERGE. --- .../Templates/TangoDAOJavaFile.cshtml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml (limited to 'Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml') diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml new file mode 100644 index 000000000..46bd6532c --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml @@ -0,0 +1,27 @@ +package com.twine.tango.dal.dao; + +import com.raizlabs.android.dbflow.sql.language.SQLite; +@foreach (var entity in Model.Entities) +{ +
import com.twine.tango.dal.entities.@(entity.Name);
+} +import java.util.List; + +public class TangoDAO +{ +@foreach (var entity in Model.Entities) +{ +
+ /** + * 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(); + } + +
+} +} -- cgit v1.3.1