public interface ISqlNameStrategy
A set of rules for determining the query name to a set of methods (get, list, add, remove, update) from IRepository that don't have a query object as parameter. To change the strategy implements this interface and configure at persistence.xml one property called whinstone.repository.sqlnamestrategy.
Sample:
<properties>
<property name="jkniv.repository.namestrategy" value="com.acme.MyDefualtSqlNameStrategy" />
</properties>
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_NAME_STRATEGY |
| 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.
|
static final String PROPERTY_NAME_STRATEGY
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 persistedCopyright © 2015 jkniv. All rights reserved.