|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.instantbank.component.parameter.ejb.ParameterDAO
This class has JDBC calls required by EJB Parameter for implementing its services
Field Summary | |
(package private) java.lang.String |
companyId
current company |
private javax.sql.DataSource |
datasource
datasource corresponding to the database |
private java.sql.Connection |
dbConnection
connection with the database |
private Debug |
debug
|
private java.lang.String |
expressionNumC
Regular Exprsision |
private java.lang.String |
expressionNumInt
|
private java.lang.String |
expressionNumP
|
private java.lang.String |
expressionSeqInt
|
private org.apache.regexp.RE |
regularExpressionNumC
|
private org.apache.regexp.RE |
regularExpressionNumInt
|
private org.apache.regexp.RE |
regularExpressionNumP
|
private org.apache.regexp.RE |
regularExpressionSeqInt
|
(package private) java.lang.Long |
userId
current user |
Constructor Summary | |
ParameterDAO(java.lang.String companyId,
java.lang.Long userId)
Constructor: searchs the DataSource in the InitialContext |
Method Summary | |
java.util.ArrayList |
applyItemsParamLevel1Points(java.util.ArrayList items)
Applies a set of changes in the values of parameter level 1 of the current company in DatabaseNames.SV_LEVEL1_POINT table. |
java.util.ArrayList |
applyItemsParamLevel2Points(java.util.ArrayList items)
Applies a set of changes in the values of parameter level 2 of the current company in DatabaseNames.SV_LEVEL2_POINT table. |
private java.util.ArrayList |
auxListParamRestrictions(java.sql.PreparedStatement ps,
java.sql.ResultSet rs)
Auxiliary for load a parameter restrictions from DB. |
private Header[] |
buildHeader(java.lang.String order2,
java.lang.String skip2,
java.lang.String skip3,
java.lang.String level_1_2,
java.lang.String level_1_any,
java.lang.String level_any_2,
java.lang.String level_any_any)
Auxiliary for load a set parameter values from DB. |
private int[] |
buildOrder(java.lang.String order2)
Auxiliary for load a set parameter values from DB and build the array with the order search. |
java.util.Hashtable |
buildParmValue(java.util.ArrayList level1Point,
java.util.ArrayList level2Point,
java.util.Hashtable pointValue)
Auxiliary for load a set parameter values from DB and build a Hashtable with point1+"|"+point2 as the Key and ValueRow as the Value. |
CodeDescription[] |
listParamLevel1Points()
Loads all [code, value] of the values of parameter level 1 of the current company from DatabaseNames.SV_LEVEL1_POINT table. |
CodeDescription[] |
listParamLevel2Points()
Loads all [code, value] of the values of parameter level 2 of the current company from DatabaseNames.SV_LEVEL2_POINT table. |
java.util.ArrayList |
listParamRestrictions()
Loads the set parameters restrictions(group name, code parameter name parameter, description, warning, level_1_2, level_1_any level_any_2 and level_any_any) of the current company for each group parameter from DatabaseNames.SV_PARAMETER_GROUP, DatabaseNames.SV_PARAMETER and DatabaseNames.SV_PARM_RESTRICTION tables. |
ParameterModel |
listParamValues(java.lang.String codeParameter)
Loads the set parameters values of the current company for the parameter without warning colors from DatabaseNames.COMPANIES, DatabaseNames.SV_PARAMETER, DatabaseNames.SV_PARMETER_VALUE, DatabaseNames.SV_PARM_RESTRICTION, DatabaseNames.SV_LEVEL1_POINT, DatabaseNames.SV_LEVEL2_POINT tables. |
java.util.Hashtable |
loadLevel1Code()
Loads the value an code of level 1 point from DatabaseNames.SV_LEVEL1_POINT table. |
java.util.Hashtable |
loadLevel2Code()
Loads the value an code of level 2 point from DatabaseNames.SV_LEVEL2_POINT table. |
java.util.ArrayList |
loadParamLevelsName()
Loads parameters levels names of the current company from DatabaseNames.COMPANIES table. |
java.util.ArrayList |
loadParamSearchValues()
Loads parameters search order of the current company from DatabaseNames.COMPANIES. |
private ParameterModel |
setColor(ParameterModel parameterModel)
Auxiliary for load a set parameter values from DB and set warning colors to ParameterModel object of the current company for the parameter. |
java.util.ArrayList |
updateParamLevelsName(java.util.ArrayList items)
Applies a set of updates in the parameters levels names of the current company in DatabaseNames.COMPANIES table. |
java.util.ArrayList |
updateParamRestrictions(java.util.Hashtable items)
Applies a set of updates in the parameters restrictions in the current company in DatabaseNames.SV_PARM_RESTRICTION table. |
java.util.ArrayList |
updateParamSearchValues(java.util.ArrayList items)
Applies a set of updates in the parameters search order of the current company in DatabaseNames.COMPANIES. |
java.lang.String |
updateParamValues(ParameterValue items,
java.util.Hashtable level1code,
java.util.Hashtable level2code)
Applies a set of updates in the parameters values in the current company in DatabaseNames.SV_PARAMETER_VALUE table. |
private ValueRow |
verifyCellsColor(int[] order,
ValueRow valueRow,
Header[] header)
Auxiliary for load a set parameter values from DB veryfy the conditions over parameter restrictions and assign the warning color. |
private java.util.Hashtable |
verifyColor(java.util.Hashtable parmValue,
Header[] header,
int[] order)
Auxiliary for load a set parameter values from DB veryfy the conditions over parameter restrictions and assign the warning color. |
private Header[] |
verifyHeaderColor(Header[] header)
Auxiliary for load a set parameter values from DB veryfy the conditions over parameter restrictions and assign the warning color. |
ParameterModel |
verifyParamValues(ParameterValue items)
Check the parameters values and set warning colors to ParameterModel object of the current company for the parameter. |
private java.lang.String |
verifyValue(java.lang.String value,
java.lang.String type)
Auxiliary for update a set parameter values from DB veryfy the condition over parameter value |
private java.lang.String |
verifyWarning(java.lang.String level_1_2,
java.lang.String level_1_any,
java.lang.String level_any_2,
java.lang.String level_any_any)
Auxiliary for load a parameter restrictions from DB and veryfy the conditions over parameter restrictions |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.String companyId
java.lang.Long userId
private java.sql.Connection dbConnection
private javax.sql.DataSource datasource
private Debug debug
private java.lang.String expressionNumC
private java.lang.String expressionNumP
private java.lang.String expressionNumInt
private java.lang.String expressionSeqInt
private org.apache.regexp.RE regularExpressionNumC
private org.apache.regexp.RE regularExpressionNumP
private org.apache.regexp.RE regularExpressionNumInt
private org.apache.regexp.RE regularExpressionSeqInt
Constructor Detail |
public ParameterDAO(java.lang.String companyId, java.lang.Long userId) throws DAOException
companyId
- current companyuserId
- current userDAOException
- Description of the ExceptionMethod Detail |
public java.util.ArrayList loadParamLevelsName() throws DAOException
DAOException
- Description of the Exceptionpublic java.util.ArrayList updateParamLevelsName(java.util.ArrayList items) throws DAOException
items
- ArrayList with 2 elements of type String
representing the attributes of items to apply param name of
level 1 and level 2.DAOException
- Description of the Exceptionpublic CodeDescription[] listParamLevel1Points() throws DAOException
DAOException
- Description of the Exceptionpublic java.util.ArrayList applyItemsParamLevel1Points(java.util.ArrayList items) throws DAOException
items
- ArrayList with 3 elements of
type String[] representing the attributes of items to apply code,
value and status. Status indicates if the item is for inserting,
deleting or updating (ServicingGlobals.INSERT,
ServicingGlobals.DELETE, ServicingGlobals.UPDATE)DAOException
- Description of the Exceptionpublic CodeDescription[] listParamLevel2Points() throws DAOException
DAOException
- Description of the Exceptionpublic java.util.ArrayList applyItemsParamLevel2Points(java.util.ArrayList items) throws DAOException
items
- ArrayList with 3 elements of
type String[] representing the attributes of items to apply code,
value and status. Status indicates if the item is for inserting,
deleting or updating (ServicingGlobals.INSERT,
ServicingGlobals.DELETE, ServicingGlobals.UPDATE)DAOException
- Description of the Exceptionpublic java.util.ArrayList loadParamSearchValues() throws DAOException
DAOException
- Description of the Exceptionpublic java.util.ArrayList updateParamSearchValues(java.util.ArrayList items) throws DAOException
items
- ArrayList with 2 elements of type String
representing the attributes of items to apply
parameters search order.DAOException
- Description of the Exceptionpublic java.util.ArrayList listParamRestrictions() throws DAOException
DAOException
- Description of the Exceptionpublic java.util.ArrayList updateParamRestrictions(java.util.Hashtable items) throws DAOException
items
- Hashtable with (n) elements of type ParmRestrictionUpdate.
When each element is representing the attributes of parameter
restrictions.DAOException
- Description of the Exceptionpublic ParameterModel listParamValues(java.lang.String codeParameter) throws DAOException
codeParameter
- The value of code parameter.DAOException
- Description of the Exceptionpublic java.util.Hashtable loadLevel1Code() throws DAOException
DAOException
- Description of the Exceptionpublic java.util.Hashtable loadLevel2Code() throws DAOException
DAOException
- Description of the Exceptionpublic java.lang.String updateParamValues(ParameterValue items, java.util.Hashtable level1code, java.util.Hashtable level2code) throws DAOException
items
- ParameterValue object with the value of code parameter,
type of parameter and a Hashtable with the point1+"|"+point2 as
the Key and the value of parameter as the Value.level1code
- Description of the Parameterlevel2code
- Description of the ParameterDAOException
- Description of the Exceptionpublic ParameterModel verifyParamValues(ParameterValue items) throws DAOException
items
- ParameterValue object with the value of code parameter,
type of parameter and a Hashtable with the point1+"|"+point2 as
the Key and the value of parameter as the Value.DAOException
- Description of the Exceptionprivate java.util.ArrayList auxListParamRestrictions(java.sql.PreparedStatement ps, java.sql.ResultSet rs) throws java.lang.Exception
ps
- auxiliary PreparedStatement.rs
- auxiliary ResultSet.java.lang.Exception
- Description of the Exceptionprivate java.lang.String verifyWarning(java.lang.String level_1_2, java.lang.String level_1_any, java.lang.String level_any_2, java.lang.String level_any_any) throws java.lang.Exception
level_1_2
- value of restriction.level_1_any
- value of restriction.level_any_2
- value of restriction.level_any_any
- value of restriction.java.lang.Exception
- Description of the Exceptionprivate int[] buildOrder(java.lang.String order2) throws java.lang.Exception
order2
- the value of search order 2.java.lang.Exception
- Description of the Exceptionprivate Header[] buildHeader(java.lang.String order2, java.lang.String skip2, java.lang.String skip3, java.lang.String level_1_2, java.lang.String level_1_any, java.lang.String level_any_2, java.lang.String level_any_any) throws java.lang.Exception
order2
- the value of search order 2.skip2
- if the coordinate is skip or not .skip3
- if the coordinate is skip or not .level_1_2
- the value of parameter restriction.level_1_any
- the value of parameter restriction.level_any_2
- the value of parameter restriction.level_any_any
- the value of parameter restriction.java.lang.Exception
- Description of the Exceptionpublic java.util.Hashtable buildParmValue(java.util.ArrayList level1Point, java.util.ArrayList level2Point, java.util.Hashtable pointValue) throws java.lang.Exception
level1Point
- ArrayList with the all points of level1level2Point
- ArrayList with the all points of level2pointValue
- The Hashtable with the all values of the parameter.java.lang.Exception
- Description of the Exceptionprivate ParameterModel setColor(ParameterModel parameterModel) throws java.lang.Exception
parameterModel
- The ParameterModel object with all values for
the parameter without warning colors.java.lang.Exception
- Description of the Exceptionprivate Header[] verifyHeaderColor(Header[] header) throws java.lang.Exception
header
- Description of the Parameterjava.lang.Exception
- Description of the Exceptionprivate java.util.Hashtable verifyColor(java.util.Hashtable parmValue, Header[] header, int[] order) throws java.lang.Exception
parmValue
- The Hashtable with the all values of the parameter
without warning colors.header
- The Header object.order
- The int array with the order search.java.lang.Exception
- Description of the Exceptionprivate ValueRow verifyCellsColor(int[] order, ValueRow valueRow, Header[] header) throws java.lang.Exception
order
- The int array with the order search.valueRow
- The ValueRow objectheader
- The Header object.java.lang.Exception
- Description of the Exceptionprivate java.lang.String verifyValue(java.lang.String value, java.lang.String type) throws java.lang.Exception
value
- The value of the parameter.type
- The type of the parameter.java.lang.Exception
- Description of the Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |