Create contents ids for contents of the data type and currently without

@param type
contents data type
@return newly created contents ids count
430214
public int createIds(String type) {

		List<String> tables = getMissing(type);

		for (String tableName : tables) {
			getOrCreate(tableName);
		}

		return tables.size();
	}
831130
public static <T> List<T> createList(final Class<T> type) {
        return new AbstractList<T>() {
            private ExtensionList<T> storage() {
                return Jenkins.getInstance().getExtensionList(type);
            }

            @Override
            public Iterator<T> iterator() {
                return storage().iterator();
            }

            public T get(int index) {
                return storage().get(index);
            }

            public int size() {
                return storage().size();
            }

            @Override
            public boolean add(T t) {
                return storage().add(t);
            }

            @Override
            public void add(int index, T t) {
                // index ignored
                storage().add(t);
            }

            @Override
            public T remove(int index) {
                return storage().remove(index);
            }

            @Override
            public boolean remove(Object o) {
                return storage().remove(o);
            }
        };
    }
711571
public int newLocal(final Type type) {
        Object t;
        switch (type.getSort()) {
        case Type.BOOLEAN:
        case Type.CHAR:
        case Type.BYTE:
        case Type.SHORT:
        case Type.INT:
            t = Opcodes.INTEGER;
            break;
        case Type.FLOAT:
            t = Opcodes.FLOAT;
            break;
        case Type.LONG:
            t = Opcodes.LONG;
            break;
        case Type.DOUBLE:
            t = Opcodes.DOUBLE;
            break;
        case Type.ARRAY:
            t = type.getDescriptor();
            break;
        // case Type.OBJECT:
        default:
            t = type.getInternalName();
            break;
        }
        int local = newLocalMapping(type);
        setLocalType(local, type);
        setFrameLocal(local, t);
        changed = true;
        return local;
    }
1142874
private Map<String, Object> buildSimpleModel(String type) {
        Map<String, Object> content = new HashMap<String, Object>();
        content.put(Attributes.TYPE, type);
        content.put(Attributes.ROOTPATH, "");
        // add any more keys here that need to have a default value to prevent need to perform null check in templates
        return content;
    }
671576
public BaseTypeId getBaseTypeId(final Class<? extends GraphObject> type) {

		final CMISInfo info = getCMISInfo(type);
		if (info != null) {

			return info.getBaseTypeId();
		}

		return null;
	}
554321
@NotNull
    public final EnhancedMimeType getDataContentType() {
        if (dataContentType == null) {
            dataContentType = EnhancedMimeType.create(dataContentTypeStr);
        }
        return dataContentType;
    }
321916
public void addImplements(String type) {
		if (!Strings.isEmpty(type)) {
			this.sarlClass.getImplements().add(newTypeRef(this.container, type));
		}
	}
553949
public Sections sections(String type) {
        Sections result = sectionsByType.get(type);
        if (result == null) {
            result = new Sections();
            sectionsByType.put(type,  result);
        }
        return result;
    }
281090
public static ContentData create(byte[] data, String type, @Nullable String name) {
        return new ContentData(RequestBody.create(MediaType.parse(type), data), name);
    }
622984
public static List<String> getTypeParameters(final String type) {
        if (type.charAt(0) != 'L')
            return emptyList();

        int lastStart = type.indexOf('<') + 1;
        final List<String> parameters = new ArrayList<>();

        if (lastStart > 0) {
            int depth = 0;
            for (int i = lastStart; i < type.length() - 2; i++) {
                final char c = type.charAt(i);
                if (c == '<')
                    depth++;
                else if (c == '>')
                    depth--;
                else if (c == ';' && depth == 0) {
                    parameters.add(type.substring(lastStart, i + 1));
                    lastStart = i + 1;
                }
            }
        }
        return parameters;
    }
117768
public List<CmsDetailPageInfo> getDetailPagesForType(String type) {

        List<CmsDetailPageInfo> result = new ArrayList<CmsDetailPageInfo>();
        CmsResourceTypeConfig typeConfig = getResourceType(type);
        if (type.startsWith(CmsDetailPageInfo.FUNCTION_PREFIX)
            || ((typeConfig != null) && !typeConfig.isDetailPagesDisabled())) {

            CmsDetailPageInfo defaultPage = null;
            for (CmsDetailPageInfo detailpage : getAllDetailPages(true)) {
                if (detailpage.getType().equals(type)) {
                    result.add(detailpage);
                } else if ((defaultPage == null)
                    && CmsADEManager.DEFAULT_DETAILPAGE_TYPE.equals(detailpage.getType())) {
                    defaultPage = detailpage;
                }
            }
            if (defaultPage != null) {
                // add default detail page last
                result.add(defaultPage);
            }
        }
        return result;
    }
1033542
public <T> Local<T> getThis(TypeId<T> type) {
        if (thisLocal == null) {
            throw new IllegalStateException("static methods cannot access 'this'");
        }
        return coerce(thisLocal, type);
    }
747805
public void addImplements(String type) {
		if (!Strings.isEmpty(type)) {
			this.sarlSkill.getImplements().add(newTypeRef(this.sarlSkill, type));
		}
	}
407776
protected List<String> getDetailPages(String type) {

        List<String> result = new ArrayList<String>();
        for (CmsADEConfigDataInternal configData : m_siteConfigurationsByPath.values()) {
            for (CmsDetailPageInfo pageInfo : wrap(configData).getDetailPagesForType(type)) {
                result.add(pageInfo.getUri());
            }
        }
        return result;
    }
388016
synchronized int id(Class<?> type) {
    Integer id = ids.get(type);
    if (id != null)
      return id;

    // If no ID was found for the given type, determine whether the type is an abstract type.
    Class<?> baseType = findBaseType(type, abstractFactories);
    if (baseType != null) {
      id = ids.get(baseType);
      if (id != null) {
        return id;
      }
    }
    return 0;
  }
719378
@Override
	public CreateOrUpdateStatus createOrUpdate(Contents contents)
			throws SQLException {
		verifyCreate(contents);
		return super.createOrUpdate(contents);
	}
29386
public static int contentTypeToFlickrContentTypeId(JinxConstants.ContentType contentType) {
        if (contentType == null) {
            return -1;
        }
        int ret;
        switch (contentType) {
            case photo:
                ret = 1;
                break;
            case screenshot:
                ret = 2;
                break;
            case other:
                ret = 3;
                break;
            case photos_and_screenshots:
                ret = 4;
                break;
            case screenshots_and_other:
                ret = 5;
                break;
            case photos_and_other:
                ret = 6;
                break;
            case all:
                ret = 7;
                break;
            default:
                ret = -1;
                break;
        }
        return ret;
    }