SHARE
TWEET

Untitled

a guest Aug 21st, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public enum USER_COLUMN {
  2.     ID("id"),
  3.     USERNAME("username"),
  4.     PASSWORD("password"),
  5.  
  6.     private final String name;
  7.     USER_COLUMN(String name) {this.name = name;}
  8.  
  9.     @Override
  10.     public String toString() {
  11.         return name;
  12.     }
  13. }
  14.      
  15. private void addColumnToSelect(USER_COLUMN col) {
  16.     addColumnToSelect(col.toString());
  17. }
  18.  
  19. private void addColumnToSelect(GENDER_COLUMN col) {
  20.     addColumnToSelect(col.toString());
  21. }
  22.  
  23. private void addColumnToSelect(ROLE_COLUMN col) { // Role is an other table
  24.     addColumnToSelect(col.toString());
  25. }
  26.  
  27. private void addColumnToSelect(String col_name) {...}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top