com.silverpeas.interestCenter.ejb
Class InterestCenterDAO

java.lang.Object
  extended by com.silverpeas.interestCenter.ejb.InterestCenterDAO

public class InterestCenterDAO
extends Object


Field Summary
static String CREATE_IC_QUERY
          createIC sql query constant
static String CREATE_PDC_CONTEXT_QUERY
          appendPdcContext sql query constant
static String DATE_FORMAT
          Date format pattern constatnt.
static String GET_IC_BY_PK_QUERY
          getICByPK sql query constant
static String GET_IC_BY_USERID_QUERY
          getICByUserID sql query constant
static String ICENTER_AXES_TABLE_NAME
          Interest_Center_Axes table name
static String LOAD_PDC_PK_QUERY
          loadPdcContext sql query constant
static String REMOVE_IC_BY_PKS_LIST_QUERY
          removeICByPK sql query constant
static String REMOVE_IC_CONTEXT_QUERY
          removePdcContext sql query constant
static String UPDATE_IC_QUERY
          updateIC sql query constant
 
Constructor Summary
InterestCenterDAO()
           
 
Method Summary
static int[] appendPdcContext(Connection con, List<? extends Criteria> pdcContext, int icId)
          Appends a list of SearchCriteria to the InterestCenter by InterestCenterID
static int createIC(Connection con, InterestCenter interestCenter)
           
static InterestCenter getICByPK(Connection con, int icID)
           
static List<InterestCenter> getICByUserID(Connection con, int userid)
           
static List<Criteria> loadPdcContext(Connection con, int icId)
           
static void removeICByPK(Connection con, int removeID)
           
static void removeICByPK(Connection con, List<Integer> removePKList)
           
static void removePdcContext(Connection con, int icId)
          Remove all SearchCriterias for provided interestCenterID
static void updateIC(Connection con, InterestCenter interestCenter)
          perform updates of provided InterestCenter
static void updatePdcContext(Connection con, List<? extends Criteria> list, int icId)
          Updates SearchCriterias list for interestCenter by InterestCenterID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICENTER_AXES_TABLE_NAME

public static final String ICENTER_AXES_TABLE_NAME
Interest_Center_Axes table name

See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
Date format pattern constatnt. This patters is used in db operations

See Also:
Constant Field Values

GET_IC_BY_USERID_QUERY

public static final String GET_IC_BY_USERID_QUERY
getICByUserID sql query constant

See Also:
Constant Field Values

GET_IC_BY_PK_QUERY

public static final String GET_IC_BY_PK_QUERY
getICByPK sql query constant

See Also:
Constant Field Values

CREATE_IC_QUERY

public static final String CREATE_IC_QUERY
createIC sql query constant

See Also:
Constant Field Values

UPDATE_IC_QUERY

public static final String UPDATE_IC_QUERY
updateIC sql query constant

See Also:
Constant Field Values

REMOVE_IC_BY_PKS_LIST_QUERY

public static final String REMOVE_IC_BY_PKS_LIST_QUERY
removeICByPK sql query constant

See Also:
Constant Field Values

LOAD_PDC_PK_QUERY

public static final String LOAD_PDC_PK_QUERY
loadPdcContext sql query constant

See Also:
Constant Field Values

CREATE_PDC_CONTEXT_QUERY

public static final String CREATE_PDC_CONTEXT_QUERY
appendPdcContext sql query constant

See Also:
Constant Field Values

REMOVE_IC_CONTEXT_QUERY

public static final String REMOVE_IC_CONTEXT_QUERY
removePdcContext sql query constant

See Also:
Constant Field Values
Constructor Detail

InterestCenterDAO

public InterestCenterDAO()
Method Detail

getICByUserID

public static List<InterestCenter> getICByUserID(Connection con,
                                                 int userid)
                                          throws SQLException,
                                                 DAOException
Parameters:
con -
userid -
Returns:
a list of InterestCenters by user id provided
Throws:
SQLException
DAOException

getICByPK

public static InterestCenter getICByPK(Connection con,
                                       int icID)
                                throws SQLException,
                                       DAOException
Parameters:
icID - InterestCenter id
Returns:
InterestCenter by its id
Throws:
SQLException
DAOException

createIC

public static int createIC(Connection con,
                           InterestCenter interestCenter)
                    throws SQLException,
                           DAOException
Returns:
id of InterestCenter created
Throws:
SQLException
DAOException

updateIC

public static void updateIC(Connection con,
                            InterestCenter interestCenter)
                     throws SQLException,
                            DAOException
perform updates of provided InterestCenter

Throws:
SQLException
DAOException

removeICByPK

public static void removeICByPK(Connection con,
                                List<Integer> removePKList)
                         throws SQLException,
                                DAOException
Parameters:
removePKList - id's of InterestCenters to be deleted
Throws:
SQLException
DAOException

removeICByPK

public static void removeICByPK(Connection con,
                                int removeID)
                         throws SQLException,
                                DAOException
Parameters:
removeID - an id of InterestCenter to be deleted
Throws:
SQLException
DAOException

loadPdcContext

public static List<Criteria> loadPdcContext(Connection con,
                                            int icId)
                                     throws SQLException,
                                            DAOException
Returns:
list of SearchCriteria
Throws:
SQLException
DAOException

appendPdcContext

public static int[] appendPdcContext(Connection con,
                                     List<? extends Criteria> pdcContext,
                                     int icId)
                              throws SQLException,
                                     DAOException
Appends a list of SearchCriteria to the InterestCenter by InterestCenterID

Parameters:
icId - InterestCenterID
Throws:
SQLException
DAOException

updatePdcContext

public static void updatePdcContext(Connection con,
                                    List<? extends Criteria> list,
                                    int icId)
                             throws SQLException,
                                    DAOException
Updates SearchCriterias list for interestCenter by InterestCenterID

Parameters:
icId - InterestCenterID
Throws:
SQLException
DAOException

removePdcContext

public static void removePdcContext(Connection con,
                                    int icId)
                             throws SQLException,
                                    DAOException
Remove all SearchCriterias for provided interestCenterID

Parameters:
icId - InterestCenterID
Throws:
SQLException
DAOException


Copyright © 2016 Silverpeas. All Rights Reserved.