<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_22) on Tue Nov 16 12:39:11 CET 2010 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
GenericService (RESThub framework 1.0 API)
</TITLE>

<META NAME="date" CONTENT="2010-11-16">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="GenericService (RESThub framework 1.0 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GenericService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/resthub/core/service/GenericResourceServiceImpl.html" title="class in org.resthub.core.service"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/resthub/core/service/GenericServiceImpl.html" title="class in org.resthub.core.service"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/resthub/core/service/GenericService.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="GenericService.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.resthub.core.service</FONT>
<BR>
Interface GenericService&lt;T,ID extends java.io.Serializable&gt;</H2>
<DL>
<DT><DT><B>Type Parameters:</B><DD><CODE>T</CODE> - Domain model class managed, must be an Entity<DD><CODE>PK</CODE> - Primary key class of T</DL>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../org/resthub/oauth2/provider/service/AuthorizationService.html" title="interface in org.resthub.oauth2.provider.service">AuthorizationService</A>, <A HREF="../../../../org/resthub/core/service/GenericResourceService.html" title="interface in org.resthub.core.service">GenericResourceService</A>&lt;T&gt;</DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/resthub/oauth2/provider/service/AuthorizationServiceImpl.html" title="class in org.resthub.oauth2.provider.service">AuthorizationServiceImpl</A>, <A HREF="../../../../org/resthub/core/service/GenericResourceServiceImpl.html" title="class in org.resthub.core.service">GenericResourceServiceImpl</A>, <A HREF="../../../../org/resthub/core/service/GenericServiceImpl.html" title="class in org.resthub.core.service">GenericServiceImpl</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>GenericService&lt;T,ID extends java.io.Serializable&gt;</B></DL>
</PRE>

<P>
Generic Service interface.
<P>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#count()">count</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Count all resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#create(T)">create</A></B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&nbsp;resource)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create new resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#delete(ID)">delete</A></B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">ID</A>&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete existing resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#delete(T)">delete</A></B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&nbsp;resource)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete existing resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#findAll()">findAll</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find all resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#findAll(java.lang.Integer, java.lang.Integer)">findAll</A></B>(java.lang.Integer&nbsp;offset,
        java.lang.Integer&nbsp;limit)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find all resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.synyx.hades.domain.Page&lt;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#findAll(org.synyx.hades.domain.Pageable)">findAll</A></B>(org.synyx.hades.domain.Pageable&nbsp;pageRequest)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find all resources (pageable).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#findById(ID)">findById</A></B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">ID</A>&nbsp;id)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find resource by id.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/resthub/core/service/GenericService.html#update(T)">update</A></B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&nbsp;resource)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update existing resource.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="create(java.lang.Object)"><!-- --></A><A NAME="create(T)"><!-- --></A><H3>
create</H3>
<PRE>
<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A> <B>create</B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&nbsp;resource)</PRE>
<DL>
<DD>Create new resource.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resource</CODE> - Resource to create
<DT><B>Returns:</B><DD>new resource</DL>
</DD>
</DL>
<HR>

<A NAME="update(java.lang.Object)"><!-- --></A><A NAME="update(T)"><!-- --></A><H3>
update</H3>
<PRE>
<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A> <B>update</B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&nbsp;resource)</PRE>
<DL>
<DD>Update existing resource.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resource</CODE> - Resource to update
<DT><B>Returns:</B><DD>resource updated</DL>
</DD>
</DL>
<HR>

<A NAME="delete(java.lang.Object)"><!-- --></A><A NAME="delete(T)"><!-- --></A><H3>
delete</H3>
<PRE>
void <B>delete</B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&nbsp;resource)</PRE>
<DL>
<DD>Delete existing resource.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resource</CODE> - Resource to delete</DL>
</DD>
</DL>
<HR>

<A NAME="delete(java.io.Serializable)"><!-- --></A><A NAME="delete(ID)"><!-- --></A><H3>
delete</H3>
<PRE>
void <B>delete</B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">ID</A>&nbsp;id)</PRE>
<DL>
<DD>Delete existing resource.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - Resource id</DL>
</DD>
</DL>
<HR>

<A NAME="findById(java.io.Serializable)"><!-- --></A><A NAME="findById(ID)"><!-- --></A><H3>
findById</H3>
<PRE>
<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A> <B>findById</B>(<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">ID</A>&nbsp;id)</PRE>
<DL>
<DD>Find resource by id.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - Resource id
<DT><B>Returns:</B><DD>resource</DL>
</DD>
</DL>
<HR>

<A NAME="findAll(java.lang.Integer, java.lang.Integer)"><!-- --></A><H3>
findAll</H3>
<PRE>
java.util.List&lt;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&gt; <B>findAll</B>(java.lang.Integer&nbsp;offset,
                          java.lang.Integer&nbsp;limit)</PRE>
<DL>
<DD>Find all resources.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - offset (default 0)<DD><CODE>limit</CODE> - limit (default 100)
<DT><B>Returns:</B><DD>resources.</DL>
</DD>
</DL>
<HR>

<A NAME="findAll()"><!-- --></A><H3>
findAll</H3>
<PRE>
java.util.List&lt;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&gt; <B>findAll</B>()</PRE>
<DL>
<DD>Find all resources.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a list of all resources.</DL>
</DD>
</DL>
<HR>

<A NAME="findAll(org.synyx.hades.domain.Pageable)"><!-- --></A><H3>
findAll</H3>
<PRE>
org.synyx.hades.domain.Page&lt;<A HREF="../../../../org/resthub/core/service/GenericService.html" title="type parameter in GenericService">T</A>&gt; <B>findAll</B>(org.synyx.hades.domain.Pageable&nbsp;pageRequest)</PRE>
<DL>
<DD>Find all resources (pageable).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pageRequest</CODE> - page request
<DT><B>Returns:</B><DD>resources</DL>
</DD>
</DL>
<HR>

<A NAME="count()"><!-- --></A><H3>
count</H3>
<PRE>
java.lang.Long <B>count</B>()</PRE>
<DL>
<DD>Count all resources.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>number of resources</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GenericService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/resthub/core/service/GenericResourceServiceImpl.html" title="class in org.resthub.core.service"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/resthub/core/service/GenericServiceImpl.html" title="class in org.resthub.core.service"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/resthub/core/service/GenericService.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="GenericService.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2009-2010. All Rights Reserved.
</BODY>
</HTML>
