Package overit.geocall.da
Interface DAOAnnotatedValueExtractor
public interface DAOAnnotatedValueExtractor
Service useful for extracting values from a
DAO instance based on its annotations.-
Method Summary
Modifier and TypeMethodDescriptionReturns aStringabout the name of the field of the table in which is stored thebranch IDvalue for the providedDAOinstance, set with theDAO.Branchannotation.getCode(@NotNull DAO dao, CommandContext commandContext) String[]getEncrypt(@NotNull DAO dao) getFactory(@NotNull DAO dao) Returns aStringabout the name of the field of the table in which is stored thefactory IDvalue for the providedDAOinstance, set with theDAO.Factoryannotation.String[]getGroup(@NotNull DAO dao, CommandContext commandContext) Returns the name of the field of the table in which is stored thelevelvalue for the providedDAOinstance, so that the optimistic lock can be managed.String[]getSequence(@NotNull DAO dao) String[]getStar(@NotNull DAO dao, CommandContext commandContext) Returns the array that contains the field list for all the select queries generated by the providedDAOinstance.getTable(@NotNull DAO dao, CommandContext commandContext) getTransaction(@NotNull DAO dao) Returns aStringabout the name of the transaction for the providedDAOinstance, set with theDAO.Transactionannotation.booleanisDistinct(@NotNull DAO dao, CommandContext commandContext) Returns the boolean value, extracted from the providedDAOinstance, that determines whether the queries use theDISTINCTclause or not.booleanReturns the boolean value, extracted from the providedDAOinstance, that determines whether connection extraction takes place from thestandard poolor theservice pool.
-
Method Details
-
getPool
-
getTable
- Parameters:
dao- theDAOinstance from which extract thetablevalue.commandContext- theCommandContextinstance associated to the providedDAOinstance.- Returns:
- a
Stringabout thetablevalue extracted from the providedDAOinstance.
-
getCode
- Parameters:
dao- theDAOinstance from which extract thecodevalue.commandContext- theCommandContextinstance associated to the providedDAOinstance.- Returns:
- a
Stringabout thecodevalue extracted from the providedDAOinstance.
-
getSequence
-
getPk
-
isService
Returns the boolean value, extracted from the providedDAOinstance, that determines whether connection extraction takes place from thestandard poolor theservice pool.- Parameters:
dao- theDAOinstance from which extract the boolean value.- Returns:
falsefor ordinary connection extraction,trueforServicePoolextraction.
-
isDistinct
Returns the boolean value, extracted from the providedDAOinstance, that determines whether the queries use theDISTINCTclause or not.- Parameters:
dao- theDAOinstance from which extract the boolean value.commandContext- theCommandContextinstance associated to the providedDAOinstance.- Returns:
trueif the queries use theDISTINCT,falseotherwise.
-
getStar
Returns the array that contains the field list for all the select queries generated by the providedDAOinstance.- Parameters:
dao- theDAOinstance from which extract the field list.commandContext- theCommandContextinstance associated to the providedDAOinstance.- Returns:
- the array of strings that represents the names of the columns to be extracted for all the select queries generated by the provided
DAOinstance; the default value is the array consisting of a single element, the character*.
-
getLevel
Returns the name of the field of the table in which is stored thelevelvalue for the providedDAOinstance, so that the optimistic lock can be managed. -
getEncrypt
-
getFactory
Returns aStringabout the name of the field of the table in which is stored thefactory IDvalue for the providedDAOinstance, set with theDAO.Factoryannotation. -
getBranch
Returns aStringabout the name of the field of the table in which is stored thebranch IDvalue for the providedDAOinstance, set with theDAO.Branchannotation. -
getTransaction
Returns aStringabout the name of the transaction for the providedDAOinstance, set with theDAO.Transactionannotation. -
getGroup
Returns aString[] about the names of the columns on which we want to group the results of the queries, extracted from the providedDAOinstance.- Parameters:
commandContext- theCommandContextinstance associated to the providedDAOinstance.- Returns:
- a
String[] about the names of the columns on which we want to group the results of the queries, extracted from the providedDAOinstance.
-