Created
July 20, 2010 12:25
-
-
Save dagi3d/482889 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
public class Post { | |
public static final int STATUS_DRAFT = 0; | |
public static final int STATUS_PENDING_REVIEW = 1; | |
public static final int STATUS_PUBLISHED = 2; | |
private int status = STATUS_DRAFT; | |
public String getStatus() | |
{ | |
String message = ""; | |
switch (this.status) { | |
case STATUS_DRAFT: message = "Borrador"; break; | |
case STATUS_PENDING_REVIEW: message = "Pendiente de revisión"; break; | |
case STATUS_PUBLISHED: message = "Publicado"; break; | |
} | |
return message; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
100% GPL