Skip to content

Instantly share code, notes, and snippets.

@asicfr
Created October 15, 2012 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asicfr/3891757 to your computer and use it in GitHub Desktop.
Save asicfr/3891757 to your computer and use it in GitHub Desktop.
struts2RestJpaBootstrap - action book
package org.demo.action.book;
import java.util.List;
import org.demo.action.GenericAction;
import org.demo.business.service.BookServices;
import org.demo.business.service.IServices;
import org.demo.vo.bean.Book;
public class Actions extends GenericAction<Book, Integer>
{
private static final long serialVersionUID = 1L;
private IServices<Book, Integer> service = new BookServices();
public Actions() {
super();
if (LOG.isDebugEnabled()) {
LOG.debug("=== ACTION CONSTRUCTOR");
}
}
/*
* @see org.demo.action.GenericAction#getServices()
*/
protected IServices<Book, Integer> getServices() {
return this.service;
}
/**
* @return
*/
public Integer getRestid() {
if (LOG.isDebugEnabled()) LOG.debug("getRestid");
return restid;
}
/**
* @param id
*/
public void setRestid(Integer id) {
if (LOG.isDebugEnabled()) LOG.debug("setRestid");
this.restid = id;
}
/**
* @return
*/
public Book getCurrent() {
if (LOG.isDebugEnabled()) LOG.debug("getCurrent");
return current;
}
/**
* @param current
*/
public void setCurrent(Book current) {
if (LOG.isDebugEnabled()) LOG.debug("setCurrent");
this.current = current;
}
/**
* @return
*/
public List<Book> getSearchResult() {
if (LOG.isDebugEnabled()) LOG.debug("getSearchResult");
return searchResult;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment