Package net.sf.jkniv.sqlegance
Interface QueryNameStrategy
-
- All Known Implementing Classes:
DotQueryNameStrategy,HashQueryNameStrategy
public interface QueryNameStrategyA set of rules for determining the query name to a set of methods (get, list, add, remove, update) from Repository that don't have a query object as parameter. To change the strategy implements this interface and configure at persistence.xml one property called
jkniv.repository.query_namestrategy.Sample:
<properties> <property name="jkniv.repository.query_namestrategy" value="com.acme.MyQueryNameStrategy" /> </properties>- Since:
- 0.5.0
- Author:
- Alisson Gomes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringtoAddName(Object o)Return the default query name at XML file to retrieve an object by 'add' method.StringtoGetName(Object o)Return the default query name at XML file to retrieve an object by 'get' method.StringtoListName(Object o)Return the default query name at XML file to retrieve an object by 'list' method.StringtoRemoveName(Object o)Return the default query name at XML file to retrieve an object by 'remove' method.StringtoUpdateName(Object o)Return the default query name at XML file to retrieve an object by 'update' method.
-
-
-
Method Detail
-
toGetName
String toGetName(Object o)
Return the default query name at XML file to retrieve an object by 'get' method.- Parameters:
o- instance of object that will be persisted- Returns:
- name of query method
-
toAddName
String toAddName(Object o)
Return the default query name at XML file to retrieve an object by 'add' method.- Parameters:
o- instance of object that will be persisted- Returns:
- name of query method
-
toRemoveName
String toRemoveName(Object o)
Return the default query name at XML file to retrieve an object by 'remove' method.- Parameters:
o- instance of object that will be persisted- Returns:
- name of query method
-
toUpdateName
String toUpdateName(Object o)
Return the default query name at XML file to retrieve an object by 'update' method.- Parameters:
o- instance of object that will be persisted- Returns:
- name of query method
-
-