Web implementation of the Gourmet Recipe Manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

97 lines
1.7 KiB

package com.mousetech.gourmetj;
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import com.mousetech.gourmetj.persistence.model.Recipe;
@Named
@SessionScoped
public class UserSession implements Serializable {
/**
* Serial version for session save/restore
*/
private static final long serialVersionUID =
7449440266704831598L;
private String lastSearch = "";
/**
* @return the lastSearch
*/
public String getLastSearch() {
return lastSearch;
}
/**
* @param lastSearch the lastSearch to set
*/
public void setLastSearch(String lastSearch) {
this.lastSearch = lastSearch;
}
private Long lastEdit;
/**
* @return the lastEdit
*/
public Long getLastEdit() {
return lastEdit;
}
/**
* @param lastEdit the lastEdit to set
*/
public void setLastEdit(Long lastEdit) {
this.lastEdit = lastEdit;
}
//***
/**
* Tab index to select when presenting editDetails.
* First tab is 0.
*/
private int detailTab;
/**
* @return the detailTab
*/
public int getDetailTab() {
return detailTab;
}
/**
* @param detailTab the detailTab to set
*/
public void setDetailTab(int detailTab) {
this.detailTab = detailTab;
}
//***
private Recipe recipe;
/**
* Recipe is set by the mainpage bean to a blank recipe
* before dispatching to the detailEdit page (new recipe).
* It is also set by the detail view page so that the
* detail view can be edited.
*
* In addition to detail editing, it's also used by the
* @see PictureController.
*
* @return Recipe selected.
*/
public Recipe getRecipe() {
return recipe;
}
/**
* @param recipe the recipe to set
*/
public void setRecipe(Recipe recipe) {
this.recipe = recipe;
}
}