Last active
December 10, 2015 00:18
-
-
Save maxammann/4349849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@DatabaseTable(name = "table") | |
public class Person implements TableObject { | |
@DatabaseColumn(position = 1, databaseName = "id", id = true) | |
private int id; | |
private String name; | |
@DatabaseColumn(position = 3, databaseName = "age") | |
private int age; | |
public Person() | |
{ | |
} | |
@DatabaseColumnSetter(position = 2, databaseName = "name") | |
public void setFormattedName(String name) | |
{ | |
if (name != null) { | |
this.name = name.toUpperCase(); | |
} | |
} | |
@DatabaseColumnGetter(databaseName = "name") | |
public String getFormattedName() | |
{ | |
return name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment