Examples of BareDate


Examples of com.quantcomponents.core.model.BareDate

    ContractBean bean = new ContractBean();
    bean.setSymbol(rs.getString(7));
    bean.setSecurityType(SecurityType.valueOf(rs.getString(8)));
    String expiryDateRepr = rs.getString(9);
    if (expiryDateRepr != null) {
      bean.setExpiryDate(new BareDate(expiryDateRepr));
    }
    bean.setStrike(rs.getDouble(10));
    String optRight = rs.getString(11);
    if (optRight != null) {
      bean.setOptionRight(OptionRight.valueOf(optRight));
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

    return expiryEdit.getYear();
  }

  public BareDate getExpiry() {
    if (getExpiryDay() > 0 && getExpiryYear() > 0) {
      return new BareDate(getExpiryYear(), getExpiryMonth(), getExpiryDay());
    } else {
      return null;
    }
  }
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

  }
  public TimeZone timezone(String code) {
    return TimeZone.getTimeZone(code);
  }
  public BareDate baredate(String arg) {
    return new BareDate(arg);
  }
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

  }
  public BareDate baredate(String arg) {
    return new BareDate(arg);
  }
  public BareDate baredate(int year, int month, int day) {
    return new BareDate(year, month, day);
  }
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

    TableViewerColumn viewColExpiry = new TableViewerColumn(contractListViewer, SWT.NONE);
    viewColExpiry.setLabelProvider(new ColumnLabelProvider() {
      @Override
      public String getText(Object element) {
        IContract c = (IContract)element;
        BareDate expiryDate = c.getExpiryDate();
        if (expiryDate != null) {
          return sdf.format(expiryDate.getDate(TimeZone.getDefault()));
        } else {
          return "";
        }
      }});
    TableColumn columnExpiry = viewColExpiry.getColumn();
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

    cal.set(2000, 11, 31, 23, 0, 0);
    bean.setStartDate(cal.getTime());
    cal.set(2100, 11, 31, 0, 0, 0);
    bean.setEndDate(cal.getTime());
    Set<BareDate> closingDays = new HashSet<BareDate>();
    closingDays.add(new BareDate(2012, 12, 25));
    closingDays.add(new BareDate(2012, 12, 31));
    closingDays.add(new BareDate(2011, 1, 1));
    bean.setClosingDays(closingDays);
    Set<WeekTradingDay> weekTradingDays = new HashSet<WeekTradingDay>();
    TradingPeriodBean tpBeanUnique = new TradingPeriodBean();
    tpBeanUnique.setStartHour(10);
    tpBeanUnique.setStartMinute(0);
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

public class XmlBareDateAdapter extends XmlAdapter<String, BareDate> {

  @Override
  public BareDate unmarshal(String v) throws Exception {
    return new BareDate(v);
  }
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

    calendar.setTime(date);
    calendar.set(Calendar.MILLISECOND, 0);
    calendar.set(Calendar.SECOND, 0);
    calendar.set(Calendar.MINUTE, 0);
    calendar.set(Calendar.HOUR_OF_DAY, 0);
    BareDate bareDate = new BareDate(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));
    ITradingDay specialDay = getSpecialTradingDays().get(bareDate.getDateRepr());
    if (specialDay != null) {
      return specialDay;
    }
    if (getClosingDays().contains(bareDate)) {
      return BANK_HOLIDAY;
View Full Code Here

Examples of com.quantcomponents.core.model.BareDate

  @Override
  public BareDate getExpiryDate() {
    if (iBContract.m_expiry == null) {
      return null;
    } else {
      return new BareDate(iBContract.m_expiry);
    }
  }
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.