[
https://issues.apache.org/jira/browse/ROL-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033930#comment-14033930
]
Greg Huber edited comment on ROL-1997 at 6/17/14 3:37 PM:
----------------------------------------------------------
{code:xml}
public boolean isPublished() {
return getStatus().equals(PUBLISHED);
}
{code}
If we have an enum here it would make life more difficult.....I find enums are
useful for shuffling around parameter checks and alike, as they have no "real"
value?
eg
{code:xml}
public static enum ViewTypes {
EVENT, MANUFACTURER
}
method parameter > Enum<ViewTypes> viewType
if (viewType != null && viewType.equals(ViewTypes.EVENT)) {
.. do something
}
{code}
was (Author: gregh99):
{code:xml}
public boolean isPublished() {
return getStatus().equals(PUBLISHED);
}
{code}
If we have an enum here it would make life more difficult.....I find enums are
only useful for shuffling around parameter checks and alike, as they have no
"real" value?
eg
{code:xml}
public static enum ViewTypes {
EVENT, MANUFACTURER
}
method parameter > Enum<ViewTypes> viewType
if (viewType != null && viewType.equals(ViewTypes.EVENT)) {
.. do something
}
{code}
> Switch WeblogEntry's pub status fields (DRAFT, PUBLISHED, PENDING, SCHEDULED)
> to an enum type
> ---------------------------------------------------------------------------------------------
>
> Key: ROL-1997
> URL: https://issues.apache.org/jira/browse/ROL-1997
> Project: Apache Roller
> Issue Type: Task
> Reporter: Glen Mazza
> Assignee: Roller Unassigned
> Priority: Minor
>
> ...and have that enum type used for the get/setStatus() in
> WeblogEntrySearchCriteria.
--
This message was sent by Atlassian JIRA
(v6.2#6252)