Package com.knowgate.dataobjs

Examples of com.knowgate.dataobjs.DBPersist


  } // getListType

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

  public ListMember() {
    oMember = new DBPersist(DB.k_list_members, "ListMember");
  }
View Full Code Here


    ResultSet oRSet;
    ResultSetMetaData oMDat;
    Object oFld;
    int iCols;

    oMember = new DBPersist(DB.k_list_members, "ListMember");

      if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement(SELECT * FROM " + DB.k_x_list_members + " WHERE " + DB.gu_list + "='" + sListGUID + "' AND (" + DB.gu_contact + "='" + sMemberId + "' OR " + DB.gu_company + "='" + sMemberId + "' OR " + DB.tx_email + "='" + sMemberId + "'))");

      oStmt = oConn.prepareStatement("SELECT * FROM " + DB.k_x_list_members + " WHERE " + DB.gu_list + "=? AND (" + DB.gu_contact + "=? OR " + DB.gu_company + "=? OR " + DB.tx_email + "=?)", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

View Full Code Here

public class Warehouse extends Address {

  private DBPersist oWarehouse;

  public Warehouse() {
    oWarehouse = new DBPersist(DB.k_warehouses, "Warehouse");
  }
View Full Code Here

  public Warehouse() {
    oWarehouse = new DBPersist(DB.k_warehouses, "Warehouse");
  }

  public Warehouse(JDCConnection oConn, String sGuid) throws SQLException {
    oWarehouse = new DBPersist(DB.k_warehouses, "Warehouse");
  load(oConn, sGuid);
  }
View Full Code Here

   public static void main(String[] argv)
     throws SQLException, org.xml.sax.SAXException, java.io.IOException,
     ClassNotFoundException, IllegalAccessException, InstantiationException {

     DBPersist oJob;
     DBBind oDBB;
     JDCConnection oCon;

     if (argv.length!=4 && argv.length!=5)
       printUsage();
     else
       if (!argv[0].equals("create"))
         printUsage();

      else if (!argv[1].equalsIgnoreCase("MAIL") && !argv[1].equalsIgnoreCase("FAX") &&
                !argv[1].equalsIgnoreCase("SAVE") && !argv[1].equalsIgnoreCase("FTP") &&
                !argv[1].equalsIgnoreCase("SEND") )
        printUsage();

      else {
         oDBB = new DBBind(argv[2]);

         oCon = oDBB.getConnection("job_main");
         oCon.setAutoCommit(true);

         oJob = new DBPersist(DB.k_jobs, argv[1]);

         oJob.parseXML(argv[3]);

         if (argv.length==5)
           oJob.replace (DB.gu_job, argv[4]);

         else if (!oJob.getItemMap().containsKey(DB.gu_job))
           oJob.put (DB.gu_job, com.knowgate.misc.Gadgets.generateUUID());

         oJob.store(oCon);

         oCon.close();

         oDBB.close();

         System.out.println("gu_job:"+oJob.getString(DB.gu_job));
      } // fi

   } // main
View Full Code Here

 
  /**
   * Default constructor for an empty calendar
   */
  public WorkingCalendar() {
    oCalendarInfo = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    oCalendarInfo.put(DB.nm_calendar,"");
    aDates = null;
    aDescs = null;
    aWorkingTimes = null;
    aStartHour1 = aStartHour2 = aEndHour1 = aEndHour2 = null;
View Full Code Here

  /**
   * Create empty calendar with given GUID
   */
  public WorkingCalendar(String sGuCalendar) {
    oCalendarInfo = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
  oCalendarInfo.put(DB.gu_calendar, sGuCalendar);
    oCalendarInfo.put(DB.nm_calendar,"");
    aDates = null;
    aDescs = null;
    aWorkingTimes = null;
View Full Code Here

   * Create calendar and load it from the database
   * @throws SQLException
   */
  public WorkingCalendar(JDCConnection oConn, String sGuCalendar)
    throws SQLException {
    oCalendarInfo = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    aDates = null;
    aDescs = null;
    aWorkingTimes = null;
    aStartHour1 = aStartHour2 = aEndHour1 = aEndHour2 = null;
    aStartMin1 = aStartMin2 = aEndMin1 = aEndMin2 = null;
View Full Code Here

  // --------------------------------------------------------------------------
 
  protected WorkingCalendar(int nDays, String sNmCalendar, Date dtFrom, Date dtTo) {
    if (DebugFile.trace) DebugFile.writeln("new WorkingCalendar("+String.valueOf(nDays)+","+sNmCalendar+","+dtFrom+","+dtTo+")");
    oCalendarInfo = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    oCalendarInfo.put(DB.nm_calendar,sNmCalendar);
  oCalendarInfo.put(DB.dt_from, dtFrom);
  oCalendarInfo.put(DB.dt_to, dtTo);
  if (nDays==0) {
      aDates = null;
View Full Code Here

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

  public static DBSubset byGroup(JDCConnection oConn, int iDomainId, String sWorkAreaId)
    throws SQLException,NullPointerException {
    DBPersist oWCal = new DBPersist(DB.k_working_calendar,"WorkingCalendar");
    DBSubset oCalendarsByGroup = new DBSubset(DB.k_working_calendar + " c",
                        oWCal.getTable(oConn).getColumnsStr(),
                            DB.gu_workarea+"=? AND "+DB.id_domain+"=? AND "+
                            DB.gu_acl_group+" IS NOT NULL ORDER BY "+DB.nm_calendar, 10);
         
    oCalendarsByGroup.load(oConn, new Object[]{new Integer(iDomainId),sWorkAreaId});
    return oCalendarsByGroup;
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.