Package java.sql

Examples of java.sql.Timestamp.after()


   
            if (eli != null) {
                GenericValue ohpp;
                while (((ohpp = (GenericValue) eli.next()) != null)) {
                    Timestamp orderDate = ohpp.getTimestamp("orderDate");
                    if (orderDate.after(dayStart) && orderDate.before(dayEnd)) {
                        String pmt = ohpp.getString("paymentMethodTypeId");
                        BigDecimal amt = ohpp.getBigDecimal("maxAmount");
   
                        if ("CASH".equals(pmt)) {
                            cashTotal = cashTotal.add(amt);
View Full Code Here


                if (subscriptions != null) {
                    Iterator si = subscriptions.iterator();
                    while (si.hasNext()) {
                        GenericValue subscription = (GenericValue) si.next();
                        Timestamp thruDate = subscription.getTimestamp("thruDate");
                        if (thruDate == null || thruDate.after(now)) {
                            subscription.set("thruDate", now);
                            try {
                                delegator.store(subscription);
                            } catch (GenericEntityException e) {
                                Debug.logError(e, module);
View Full Code Here

                    Calendar cal = Calendar.getInstance();
                    cal.setTimeInMillis(authTime.getTime());
                    cal.add(Calendar.DAY_OF_YEAR, days);
                    Timestamp validTime = new Timestamp(cal.getTimeInMillis());
                    Timestamp nowTime = UtilDateTime.nowTimestamp();
                    if (nowTime.after(validTime)) {
                        return false;
                    }
                }
            }
        }
View Full Code Here

            if (productPromoCode == null) {
                return "The promotion code [" + productPromoCodeId + "] is not valid.";
            }
            Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
            if (productPromoCode.getTimestamp("thruDate") != null) {
                if (nowTimestamp.after(productPromoCode.getTimestamp("thruDate"))) {
                    return "The promotion code [" + productPromoCodeId + "] is expired in: " + productPromoCode.getTimestamp("thruDate");
                }
            }
            if (productPromoCode.getTimestamp("fromDate") != null) {
                if (nowTimestamp.before(productPromoCode.getTimestamp("fromDate"))) {
View Full Code Here

    public static boolean isSellable(GenericValue product, Timestamp atTime) {
        if (product != null) {
            Timestamp introDate = product.getTimestamp("introductionDate");
            Timestamp discDate = product.getTimestamp("salesDiscontinuationDate");
            if (introDate == null || introDate.before(atTime)) {
                if (discDate == null || discDate.after(atTime)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

    }

    protected Timestamp getNextRunEndTime() {
        long syncSplit = this.isOfflineSync ? offlineSyncSplitMillis : syncSplitMillis;
        Timestamp nextRunEndTime = new Timestamp(this.currentRunStartTime.getTime() + syncSplit);
        if (nextRunEndTime.after(this.syncEndStamp)) {
            nextRunEndTime = this.syncEndStamp;
        }
        return nextRunEndTime;
    }
View Full Code Here

        for (ModelEntity modelEntity: entityModelToUseList) {
            int insertBefore = 0;

            // first test to see if we know that there are no records for this entity in this time period...
            Timestamp knownNextCreateTime = this.nextEntityCreateTxTime.get(modelEntity.getEntityName());
            if (knownNextCreateTime != null && (knownNextCreateTime.equals(currentRunEndTime) || knownNextCreateTime.after(currentRunEndTime))) {
                //Debug.logInfo("In assembleValuesToCreate found knownNextCreateTime [" + knownNextCreateTime + "] after currentRunEndTime [" + currentRunEndTime + "], so skipping time per period for entity [" + modelEntity.getEntityName() + "]", module);
                entitiesSkippedForKnownNext++;
                continue;
            }
View Full Code Here

        for (ModelEntity modelEntity: entityModelToUseList) {
            int insertBefore = 0;

            // first test to see if we know that there are no records for this entity in this time period...
            Timestamp knownNextUpdateTime = this.nextEntityUpdateTxTime.get(modelEntity.getEntityName());
            if (knownNextUpdateTime != null && (knownNextUpdateTime.equals(currentRunEndTime) || knownNextUpdateTime.after(currentRunEndTime))) {
                entitiesSkippedForKnownNext++;
                continue;
            }

            boolean beganTransaction = false;
View Full Code Here

    // get system time
    Timestamp now = new Timestamp(System.currentTimeMillis());
    if (da != null) {
      da.closeConnection();
    }
    if (now.after(time)) {
      throw new SOTProxyExpiredException();
    }
    return return_flg;
  }
View Full Code Here

            .get(EXPIRE_TIME.toUpperCase());
      Timestamp now = new Timestamp(System.currentTimeMillis());
      if (da != null) {
        da.closeConnection();
      }
      if (now.after(time)) {
        throw new SOTProxyExpiredException();
      }
      return dbText;
    } else {
      if (da != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.