Changes the type of a table

@param session Session
@param newType int
@return boolean
545022
public boolean setTableType(Session session, int newType) {

        int currentType = table.getTableType();

        if (currentType == newType) {
            return false;
        }

        switch (newType) {

            case TableBase.CACHED_TABLE :
                break;

            case TableBase.MEMORY_TABLE :
                break;

            default :
                return false;
        }

        Table tn;

        try {
            tn = table.moveDefinition(session, newType, null, null, null, -1,
                                      0, emptySet, emptySet);

            tn.moveData(session, table, -1, 0);
            updateConstraints(tn, emptySet);
        } catch (HsqlException e) {
            return false;
        }

        setNewTableInSchema(tn);
        database.persistentStoreCollection.releaseStore(table);

        table = tn;

        database.schemaManager.recompileDependentObjects(table);

        return true;
    }
831491
public void setType(Type type) {
		this.type = type;
		LOGGER.trace("Changed the Action Button type to: {}", getType());
		setSize(getType().getSize());
	}
757300
function Table(type, length) {
    if (!(this instanceof Table))
        return new Table(type, length);
    this.type = type;
    this.length = length;
}
335152
def is_sqlatype_date(coltype: TypeEngine) -> bool:
    
    coltype = _coltype_to_typeengine(coltype)
    # No longer valid in SQLAlchemy 1.2.11:
    # return isinstance(coltype, sqltypes._DateAffinity)
    return (
        isinstance(coltype, sqltypes.DateTime) or
        isinstance(coltype, sqltypes.Date)
    )
355728
public void setTableTypes(String tableTypes) {
    if (tableTypes != null && tableTypes.length() > 0) {
      StringTokenizer tokenizer = new StringTokenizer(tableTypes, ",", false);
      this.tableTypes = new ArrayList<String>();
      while (tokenizer.hasMoreTokens()) {
        String tableType = tokenizer.nextToken();
        this.tableTypes.add(tableType.trim().toUpperCase());
      }
    }
  }
618969
func ChangeType(ctx context.Context, ts *topo.Server, tabletAlias *topodatapb.TabletAlias, newType topodatapb.TabletType) (*topodatapb.Tablet, error) {
	return ts.UpdateTabletFields(ctx, tabletAlias, func(tablet *topodatapb.Tablet) error {
		tablet.Type = newType
		return nil
	})
}
898258
def setTableType( self, tableType ):
        
        self.detailWidget().setTableType(tableType)
        self.queryWidget().setTableType(tableType)
884801
def is_sqlatype_integer(coltype: Union[TypeEngine, VisitableType]) -> bool:
    
    coltype = _coltype_to_typeengine(coltype)
    return isinstance(coltype, sqltypes.Integer)
1337672
@Pure
	public static boolean isSupportedType(DBaseFieldType type) {
		return	(type != DBaseFieldType.BINARY)
				&& (type != DBaseFieldType.GENERAL)
				&& (type != DBaseFieldType.MEMORY)
				&& (type != DBaseFieldType.PICTURE)
				&& (type != DBaseFieldType.VARIABLE);
	}
1045366
public JDBCAppendTableSinkBuilder setParameterTypes(TypeInformation<?>... types) {
		int[] ty = new int[types.length];
		for (int i = 0; i < types.length; ++i) {
			ty[i] = JDBCTypeUtil.typeInformationToSqlType(types[i]);
		}
		this.parameterTypes = ty;
		return this;
	}
278938
public boolean recordType(JSTypeExpression type) {
    if (type != null && !hasAnyTypeRelatedTags()) {
      currentInfo.setType(type);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
1111833
void changedSearchType() {

        SearchType type = (SearchType)m_searchType.getValue();

        m_property.setVisible(type.isPropertySearch());
        m_searchPattern.setVisible(
            (!type.equals(SearchType.resourcetype)) & (!type.equals(SearchType.renameContainer)));
        m_resourceSearch.setVisible(type.equals(SearchType.resourcetype) | type.equals(SearchType.renameContainer));
        if ((!type.equals(SearchType.resourcetype)) & (!type.equals(SearchType.renameContainer))) {
            m_ignoreSubSites.setValue(Boolean.FALSE);
            m_ignoreSubSites.setVisible(false);
        } else {
            m_ignoreSubSites.setVisible(true);
        }

        m_searchIndex.setVisible(type.isSolrSearch());
        m_solrQuery.setVisible(type.isSolrSearch());
        updateReplace();
        m_xPath.setVisible(type.isContentValuesOnly());
        m_locale.setVisible(type.isContentValuesOnly());

        m_resourceType.setVisible(
            !type.isPropertySearch()
                & !type.equals(SearchType.resourcetype)
                & !type.equals(SearchType.renameContainer));

        IndexedContainer types = (IndexedContainer)m_resourceType.getContainerDataSource();
        types.removeAllContainerFilters();
        types.addContainerFilter(
            type.isContentValuesOnly() ? CmsVaadinUtils.FILTER_XML_CONTENTS : CmsVaadinUtils.FILTER_NO_FOLDERS);
    }
482573
public static Type preserveType(Type currentType, Type newType) {
        Type result = newType;
        if (newType != null && currentType != null &&
            currentType.getObjectClass() == newType.getObjectClass()) {
            if (newType.getGenericType().getGenericType() instanceof Class &&
                !(currentType.getGenericType().getGenericType() instanceof Class)) {
                if (newType.isNonNull() && !currentType.isNonNull()) {
                    result = currentType.toNonNull();
                }
                else if (!newType.isNonNull() && currentType.isNonNull()) {
                    result = currentType.toNullable();
                }
            }
        }

        return result;
    }
727449
def in_resource(cls, session_type):
        
        if cls.resources is AllSessionTypes:
            return True
        return session_type in cls.resources
522168
public static boolean isSupportedJDKType(TypeName typeName) {
		if (typeName.isPrimitive()) {
			return getPrimitiveTransform(typeName) != null;
		}

		String name = typeName.toString();

		if (name.startsWith("java.lang")) {
			return getLanguageTransform(typeName) != null;
		}

		if (name.startsWith("java.util")) {
			return getUtilTransform(typeName) != null;
		}

		if (name.startsWith("java.math")) {
			return getMathTransform(typeName) != null;
		}

		if (name.startsWith("java.net")) {
			return getNetTransform(typeName) != null;
		}

		if (name.startsWith("java.sql")) {
			return getSqlTransform(typeName) != null;
		}

		return false;
	}
257321
void resolveTypesForCaseWhen(Session session) {

        if (dataType != null) {
            return;
        }

        Expression expr = this;

        while (expr.opType == OpTypes.CASEWHEN) {
            expr.nodes[LEFT].resolveTypes(session, expr);

            if (expr.nodes[LEFT].isParam) {
                expr.nodes[LEFT].dataType = Type.SQL_BOOLEAN;
            }

            expr.nodes[RIGHT].nodes[LEFT].resolveTypes(session, nodes[RIGHT]);
            expr.nodes[RIGHT].nodes[RIGHT].resolveTypes(session, nodes[RIGHT]);

            expr = expr.nodes[RIGHT].nodes[RIGHT];
        }

        expr = this;

        while (expr.opType == OpTypes.CASEWHEN) {
            dataType =
                Type.getAggregateType(expr.nodes[RIGHT].nodes[LEFT].dataType,
                                      dataType);
            dataType =
                Type.getAggregateType(expr.nodes[RIGHT].nodes[RIGHT].dataType,
                                      dataType);
            expr = expr.nodes[RIGHT].nodes[RIGHT];
        }

        expr = this;

        while (expr.opType == OpTypes.CASEWHEN) {
            if (expr.nodes[RIGHT].nodes[LEFT].dataType == null) {
                expr.nodes[RIGHT].nodes[LEFT].dataType = dataType;
            }

            if (expr.nodes[RIGHT].nodes[RIGHT].dataType == null) {
                expr.nodes[RIGHT].nodes[RIGHT].dataType = dataType;
            }

            if (expr.nodes[RIGHT].dataType == null) {
                expr.nodes[RIGHT].dataType = dataType;
            }

            expr = expr.nodes[RIGHT].nodes[RIGHT];
        }

        if (dataType == null) {
            throw Error.error(ErrorCode.X_42567);
        }
    }
1324438
def is_sqlatype_numeric(coltype: Union[TypeEngine, VisitableType]) -> bool:
    
    coltype = _coltype_to_typeengine(coltype)
    return isinstance(coltype, sqltypes.Numeric)