Examples of ViewType


Examples of com.dotmarketing.portlets.dashboard.model.ViewType

      Logger.error(this,e.getMessage(),e);
    }
    Date now = new Date();
    Date fromDate = null;
    Date toDate = null;
    ViewType vt = ViewType.getViewType(viewType);

    if(vt.equals(ViewType.DAY)){
      Calendar c1 = Calendar.getInstance();
      c1.setTime(now);
      c1.set(c1.get(Calendar.YEAR), c1.get(Calendar.MONTH), c1.get(Calendar.DAY_OF_MONTH), 0, 0);
      c1.add(Calendar.DATE,-2);
      fromDate = c1.getTime();

    }else if(vt.equals(ViewType.WEEK)){
      Calendar c1 = Calendar.getInstance();
      c1.setTime(now);
      c1.set(c1.get(Calendar.YEAR), c1.get(Calendar.MONTH), c1.get(Calendar.DAY_OF_MONTH), 0, 0);
      c1.add(Calendar.DATE,-8);
      fromDate = c1.getTime();

    }else if(vt.equals(ViewType.MONTH)){
      Calendar c1 = Calendar.getInstance();
      c1.setTime(now);
      c1.set(c1.get(Calendar.YEAR), c1.get(Calendar.MONTH), c1.get(Calendar.DAY_OF_MONTH), 0, 0);
      c1.add(Calendar.DATE,-31);
      fromDate = c1.getTime();
View Full Code Here

Examples of com.salesforce.phoenix.schema.PTable.ViewType

        KeyValue disableWALKv = tableKeyValues[DISABLE_WAL_INDEX];
        boolean disableWAL = disableWALKv == null ? PTable.DEFAULT_DISABLE_WAL : Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(disableWALKv.getBuffer(), disableWALKv.getValueOffset(), disableWALKv.getValueLength()));
        KeyValue multiTenantKv = tableKeyValues[MULTI_TENANT_INDEX];
        boolean multiTenant = multiTenantKv == null ? false : Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(multiTenantKv.getBuffer(), multiTenantKv.getValueOffset(), multiTenantKv.getValueLength()));
        KeyValue viewTypeKv = tableKeyValues[VIEW_TYPE_INDEX];
        ViewType viewType = viewTypeKv == null ? null : ViewType.fromSerializedValue(viewTypeKv.getBuffer()[viewTypeKv.getValueOffset()]);
        KeyValue baseSchemaNameKv = tableKeyValues[BASE_SCHEMA_NAME_INDEX];
        PName baseSchemaName = baseSchemaNameKv != null ? newPName(baseSchemaNameKv.getBuffer(), baseSchemaNameKv.getValueOffset(), baseSchemaNameKv.getValueLength()) : null;
        KeyValue baseTableNameKv = tableKeyValues[BASE_TABLE_NAME_INDEX];
        PName baseTableName = baseTableNameKv != null ? newPName(baseTableNameKv.getBuffer(), baseTableNameKv.getValueOffset(), baseTableNameKv.getValueLength()) : null;
       
View Full Code Here

Examples of com.salesforce.phoenix.schema.PTable.ViewType

            return false;
        }
        if (ptr.getLength() == 0) {
            return true;
        }
        ViewType viewType = ViewType.fromSerializedValue(ptr.get()[ptr.getOffset()]);
        ptr.set(viewType.getBytes());
        return true;
    }
View Full Code Here

Examples of com.salesforce.phoenix.schema.PTable.ViewType

        final PhoenixConnection connection = statement.getConnection();
        ColumnResolver resolver = FromCompiler.getResolver(create, connection);
        PTableType type = create.getTableType();
        PhoenixConnection connectionToBe = connection;
        PTable parentToBe = null;
        ViewType viewTypeToBe = null;
        Scan scan = new Scan();
        final StatementContext context = new StatementContext(statement, resolver, statement.getParameters(), scan);
        ExpressionCompiler expressionCompiler = new ExpressionCompiler(context);
        ParseNode whereNode = create.getWhereClause();
        Expression where = null;
        if (type == PTableType.VIEW) {
            TableRef tableRef = resolver.getTables().get(0);
            parentToBe = tableRef.getTable();
            viewTypeToBe = parentToBe.getViewType() == ViewType.MAPPED ? ViewType.MAPPED : ViewType.UPDATABLE;
            if (whereNode != null) {
                if (whereNode.isStateless()) {
                    throw new SQLExceptionInfo.Builder(SQLExceptionCode.VIEW_WHERE_IS_CONSTANT)
                        .build().buildException();
                }
                whereNode = StatementNormalizer.normalize(whereNode, resolver);
                where = whereNode.accept(expressionCompiler);
                if (expressionCompiler.isAggregate()) {
                    throw new SQLExceptionInfo.Builder(SQLExceptionCode.AGGREGATE_IN_WHERE).build().buildException();
                }
                if (viewTypeToBe != ViewType.MAPPED) {
                    Long scn = connection.getSCN();
                    connectionToBe = scn != null ? connection :
                        // If we haved no SCN on our connection, freeze the SCN at when
                        // the base table was resolved to prevent any race condition on
                        // the error checking we do for the base table. The only potential
                        // issue is if the base table lives on a different region server
                        // than the new table will, then we're relying here on the system
                        // clocks being in sync.
                        new PhoenixConnection(
                            // When the new table is created, we still want to cache it
                            // on our connection.
                            new DelegateConnectionQueryServices(connection.getQueryServices()) {
                                @Override
                                public PMetaData addTable(PTable table) throws SQLException {
                                    return connection.addTable(table);
                                }
                            },
                            connection, tableRef.getTimeStamp());
                    ViewWhereExpressionVisitor visitor = new ViewWhereExpressionVisitor();
                    where.accept(visitor);
                    viewTypeToBe = visitor.isUpdatable() ? ViewType.UPDATABLE : ViewType.READ_ONLY;
                }
            }
        }
        final Expression viewExpression = where;
        final ViewType viewType = viewTypeToBe;
        List<ParseNode> splitNodes = create.getSplitNodes();
        final byte[][] splits = new byte[splitNodes.size()][];
        ImmutableBytesWritable ptr = context.getTempPtr();
        for (int i = 0; i < splits.length; i++) {
            ParseNode node = splitNodes.get(i);
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewType

        AbstractComponent component = context.getProperty(PolicyContext.PropertyName.TARGET_COMPONENT.getName(), AbstractComponent.class);       
        if (!checkArguments(context, component))
            return trueResult; // pass it over to the next policy in the chain       

        ViewType viewType = context
                .getProperty(PolicyContext.PropertyName.VIEW_TYPE.getName(), ViewType.class);
        ViewInfo targetViewInfo = context.getProperty(PolicyContext.PropertyName.TARGET_VIEW_INFO.getName(), ViewInfo.class);
        if (viewType == ViewType.OBJECT || viewType == ViewType.CENTER) {
                if (DropboxCanvasView.class.isAssignableFrom(targetViewInfo.getViewClass()) ||
                        targetViewInfo.getViewName().equals("Info"))
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewType

        ExecutionResult trueResult = new ExecutionResult(context, true, EM_STR);
        TelemetryDataTaxonomyComponent component = context.getProperty(PolicyContext.PropertyName.TARGET_COMPONENT.getName(), TelemetryDataTaxonomyComponent.class);
        if (component == null || component != rootComponent)
            return trueResult;
       
        ViewType viewType = context.getProperty(PolicyContext.PropertyName.VIEW_TYPE.getName(), ViewType.class);
        return viewType != ViewType.OBJECT ? trueResult : new ExecutionResult(context, false, EM_STR);
    }
View Full Code Here

Examples of net.ftlines.wicket.fullcalendar.ViewType

  }

  @Override
  protected void respond(AjaxRequestTarget target) {
    Request r = target.getPage().getRequest();
    ViewType type = ViewType.forCode(r.getRequestParameters().getParameterValue("view").toString());
    DateTimeFormatter fmt = ISODateTimeFormat.dateTimeParser().withZone(DateTimeZone.UTC);
    DateMidnight start = fmt.parseDateTime(r.getRequestParameters().getParameterValue("start").toString())
      .toDateMidnight();
    DateMidnight end = fmt.parseDateTime(r.getRequestParameters().getParameterValue("end").toString())
      .toDateMidnight();
View Full Code Here

Examples of net.ftlines.wicket.fullcalendar.ViewType

  }

  @Override
  protected void respond(final AjaxRequestTarget target) {
    final Request r = target.getPage().getRequest();
    final ViewType type = ViewType.forCode(r.getRequestParameters().getParameterValue("view").toString());
    final DateTimeFormatter fmt = ISODateTimeFormat.dateTimeParser().withZone(PFUserContext.getDateTimeZone());
    final DateMidnight start = fmt.parseDateTime(r.getRequestParameters().getParameterValue("start").toString())
        .toDateMidnight();
    final DateMidnight end = fmt.parseDateTime(r.getRequestParameters().getParameterValue("end").toString())
        .toDateMidnight();
View Full Code Here

Examples of net.sf.mpxj.ViewType

      {
         view = new SplitView9(file, fixedData, varData);
      }
      else
      {
         ViewType type = ViewType.getInstance(MPPUtility.getShort(fixedData, 112));
         switch (type)
         {
            case GANTT_CHART :
            {
               view = new GanttChartView9(file, fixedMeta, fixedData, varData, fontBases);
View Full Code Here

Examples of net.sf.mpxj.ViewType

      {
         view = new SplitView9(file, fixedData, varData);
      }
      else
      {
         ViewType type = ViewType.getInstance(MPPUtility.getShort(fixedData, 112));
         switch (type)
         {
            case GANTT_CHART :
            {
               view = new GanttChartView14(file, fixedMeta, fixedData, varData, fontBases);
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.