Package com.knowgate.dataobjs

Examples of com.knowgate.dataobjs.DBPersist


  // --------------------------------------------------------------------------

  public static DBSubset byUser(JDCConnection oConn, int iDomainId, String sWorkAreaId)
    throws SQLException,NullPointerException {
    DBPersist oWCal = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    DBSubset oCalendarsByUser = new DBSubset(DB.k_working_calendar + " c",
                        oWCal.getTable(oConn).getColumnsStr(),
                            DB.gu_workarea+"=? AND "+DB.id_domain+"=? AND "+
                            DB.gu_user+" IS NOT NULL ORDER BY "+DB.nm_calendar, 100);
         
    oCalendarsByUser.load(oConn, new Object[]{new Integer(iDomainId),sWorkAreaId});
    return oCalendarsByUser;
View Full Code Here


  // --------------------------------------------------------------------------

  public static DBSubset byCountry(JDCConnection oConn, int iDomainId, String sWorkAreaId, String sLanguage)
    throws SQLException,NullPointerException {
    DBPersist oWCal = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    DBPersist oCntr = new DBPersist(DB.k_lu_countries,"Countries");
    String sTrCol;
    if (oCntr.getTable(oConn).getColumnsStr().indexOf(DB.tr_+sLanguage)>=0)
      sTrCol = DB.tr_+"country_"+sLanguage;
    else
      sTrCol = DB.tr_+"country_"+"en";

    DBSubset oCalendarsByCountry = new DBSubset(DB.k_working_calendar + " c",
View Full Code Here

  // --------------------------------------------------------------------------

  public static DBSubset byState(JDCConnection oConn, int iDomainId, String sWorkAreaId, String sCountryId)
    throws SQLException,NullPointerException {
    DBPersist oWCal = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    DBSubset oCalendarsByState = new DBSubset(DB.k_working_calendar + " c",
                        oWCal.getTable(oConn).getColumnsStr()+", NULL AS "+DB.nm_state,
                            DB.gu_workarea+"=? AND "+DB.id_domain+"=? AND "+
                            DB.id_country+"=? AND "+DB.id_state+" IS NOT NULL", 50);
         
    int nCals = oCalendarsByState.load(oConn, new Object[]{new Integer(iDomainId),sWorkAreaId,sCountryId});
    PreparedStatement oStmt = oConn.prepareStatement("SELECT "+DB.nm_state+" FROM "+DB.k_lu_states+" WHERE "+DB.id_country+"='"+sCountryId+"' AND "+DB.id_state+"=?",
View Full Code Here

TOP

Related Classes of com.knowgate.dataobjs.DBPersist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.