public interface QueryNameStrategy
A 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>
Modifier and Type | Method and Description |
---|---|
String |
toAddName(Object o)
Return the default query name at XML file to retrieve an object by 'add'
method.
|
String |
toGetName(Object o)
Return the default query name at XML file to retrieve an object by 'get'
method.
|
String |
toListName(Object o)
Return the default query name at XML file to retrieve an object by 'list'
method.
|
String |
toRemoveName(Object o)
Return the default query name at XML file to retrieve an object by
'remove' method.
|
String |
toUpdateName(Object o)
Return the default query name at XML file to retrieve an object by
'update' method.
|
String toGetName(Object o)
o
- instance of object that will be persistedString toAddName(Object o)
o
- instance of object that will be persistedString toRemoveName(Object o)
o
- instance of object that will be persistedString toUpdateName(Object o)
o
- instance of object that will be persistedString toListName(Object o)
o
- instance of object that will be persistedCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.