Examples of NSTimestamp


Examples of com.webobjects.foundation.NSTimestamp

    if (minute % 15 > 7)
      minute = 15;
    else
      minute = 0;
    cal.set(Calendar.MINUTE, (base * 15) + minute);
    return new NSTimestamp(cal.getTime());
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

  public static NSTimestamp set(NSTimestamp timestamp, int calendarField, int value) {
    Calendar cal = Calendar.getInstance();
    cal.setTime(timestamp);
    cal.set(calendarField, value);
    return new NSTimestamp(cal.getTime());
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

  public static NSTimestamp add(NSTimestamp timestamp, int calendarField, int value) {
    Calendar cal = Calendar.getInstance();
    cal.setTime(timestamp);
    cal.add(calendarField, value);
    return new NSTimestamp(cal.getTime());
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

  public AjaxBusyIndicatorExample(WOContext context) {
        super(context);
    }
   
  public NSTimestamp now() {
    return new NSTimestamp();
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

    super.appendToResponse(response, context);
    MTAjaxUtils.addStylesheetResourceInHead(context, response, "app", "datepicker_dashboard/datepicker_dashboard.css");
  }
 
  private void _updateTime() {
    _today = new NSTimestamp();
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

  public WOActionResults createAction() throws Throwable {
    TaskInfo taskInfo = ERXEOControlUtilities.createAndInsertObject(editingContext(), TaskInfo.class);
    taskInfo.setDuration(Long.valueOf(15000));
    taskInfo.setStartNumber(Utilities.newStartNumber());
    taskInfo.setStartTime(new NSTimestamp());

    editingContext().saveChanges();
   
    T10RestEOFTask taskInfoGID = new T10RestEOFTask();
    taskInfoGID.setTaskGID(taskInfo.__globalID());
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

    _helloAjaxWorld = "Hello Ajax WOrld!";
  }

  @Override
  public void appendToResponse(WOResponse woresponse, WOContext wocontext) {
    _timestamp = new NSTimestamp();
    super.appendToResponse(woresponse, wocontext);
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

  public UpdateTriggerExample(WOContext context) {
    super(context);
  }

  public NSTimestamp now() {
    return new NSTimestamp();
  }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

    ec.lock();
    try {
      Random random = new Random(12);
      for (int i = 0; i < 100; i++) {
        EOEnterpriseObject eo = EOUtilities.createAndInsertInstance(ec, "LuceneAsset");
        eo.takeValueForKey(new NSTimestamp().timestampByAddingGregorianUnits(0, 0, -random.nextInt(2500), 0, 0, 0), "creationDate");
        eo.takeValueForKey(ERXLoremIpsumGenerator.randomSentence(), "contents");
        eo.takeValueForKey(random.nextDouble(), "price");
        eo.takeValueForKey(Long.valueOf(random.nextInt(2500)), "userCount");
      }
      ec.saveChanges();
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp

  }

  private NSMutableArray sampleData() {
    NSData data = new NSData(application().resourceManager().bytesForResourceNamed("AjaxGridExampleTestData.plist", null, NSArray.EmptyArray));
    NSMutableArray sampleData = new NSMutableArray((NSArray) NSPropertyListSerialization.propertyListFromData(data, CharEncoding.UTF_8));
    Random random = new Random(new NSTimestamp().getNanos());
    for (int i = 0; i < sampleData.count(); i++) {
      NSMutableDictionary<String,Object> row = (NSMutableDictionary<String,Object>) sampleData.objectAtIndex(i);
      row.setObjectForKey(Integer.valueOf(random.nextInt()), "number");
      row.setObjectForKey(new NSTimestamp(random.nextLong()), "date");
      row.setObjectForKey(Integer.valueOf(i + 1).toString(), "level");
    }

    return sampleData;
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.