diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-18 18:43:48 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-18 18:43:48 +0200 |
| commit | 96352ac46ccb871783c63fd98efe034091214b7e (patch) | |
| tree | c8e0893784457974a8e005d27573e0c3b285f2d9 /Software/Visual_Studio/Tango.CodeGeneration | |
| parent | 4f4b5f052200fde6ccc6aa06094904cf9bf3106b (diff) | |
| download | Tango-96352ac46ccb871783c63fd98efe034091214b7e.tar.gz Tango-96352ac46ccb871783c63fd98efe034091214b7e.zip | |
Make android DAL observable !
Diffstat (limited to 'Software/Visual_Studio/Tango.CodeGeneration')
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFileJava.cshtml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFileJava.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFileJava.cshtml index aeba15b12..87c82395b 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFileJava.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFileJava.cshtml @@ -7,6 +7,8 @@ import com.raizlabs.android.dbflow.annotation.Table; import org.joda.time.DateTime; import com.twine.tango.dal.Entity; import com.twine.tango.dal.TangoDB; +import android.databinding.Bindable; +import com.twine.tango.dal.BR; @@Table(name = "@(Model.TableName)", database = TangoDB.class) @@ -40,7 +42,8 @@ import com.twine.tango.dal.TangoDB; * * return the @(prop.Name) */ - public @(prop.Type) @(prop.Type == "Boolean" ? "is" + prop.Name : "get" + prop.Name)() + @@Bindable + public @(prop.Type) @(prop.Type == "boolean" ? "is" + prop.Name : "get" + prop.Name)() { return @(prop.Description); } @@ -53,6 +56,7 @@ import com.twine.tango.dal.TangoDB; public void set@(prop.Name)(@(prop.Type) @(prop.Description)) { this.@(prop.Description) = @(prop.Description); + notifyPropertyChanged(BR.@(prop.Description)); } </div> } |
