Create a size parameter.
Override it if needed. Set a default value for example.

@param context {@link Pageable} parameter context
@return The size parameter
480942
protected Parameter createSizeParameter(ParameterContext context) {
        ModelReference intModel = createModelRefFactory(context).apply(resolver.resolve(Integer.TYPE));
        return new ParameterBuilder()
            .name(getSizeName())
            .parameterType(SIZE_TYPE)
            .modelRef(intModel)
            .description(SIZE_DESCRIPTION)
            .build();
    }
863152
public long size()
    {
    	if(size==null)
    	{
	    	ODatabaseDocument db = OrientDbWebSession.get().getDatabase();
	    	OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<ODocument>(queryManager.getCountSql());
	    	List<ODocument> ret = db.query(enhanceContextByVariables(query), prepareParams());
	    	if(ret!=null && ret.size()>0)
	    	{
	    		Number sizeNumber = ret.get(0).field("count");
	    		size = sizeNumber!=null?sizeNumber.longValue():0;
	    	}
	    	else
	    	{
	    		size = 0L;
	    	}
    	}
    	return size;
    }
393605
public static Map createParamMap(PageContext pContext)
    {
        final HttpServletRequest request =
                (HttpServletRequest) pContext.getRequest();
        return new EnumeratedMap()
        {
            public Enumeration enumerateKeys()
            {
                return request.getParameterNames();
            }

            public Object getValue(Object pKey)
            {
                if (pKey instanceof String) {
                    return request.getParameter((String) pKey);
                } else {
                    return null;
                }
            }

            public boolean isMutable()
            {
                return false;
            }
        };
    }
345797
public static ImageView createImageInstance(Context context) {
        if (sImageClass != null) {
            if (imageViewConstructor == null) {
                try {
                    imageViewConstructor = sImageClass.getConstructor(Context.class);
                } catch (NoSuchMethodException e) {
                    e.printStackTrace();
                }
            }
            if (imageViewConstructor != null) {
                try {
                    return (ImageView) imageViewConstructor.newInstance(context);
                } catch (InstantiationException e) {
                    e.printStackTrace();
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                } catch (InvocationTargetException e) {
                    e.printStackTrace();
                }
            }
        }
        return null;
    }
765769
public static PagingInfo getPageInfos(final HttpServletRequest request, final int defaultPageSize) {
		PagingInfo info = new PagingInfo();
		info.setKey(getPageKey(request));
		info.setUrl(getUrl(request));
		info.setTotal(getTotal(request));
		info.setPageIndex(getPageIndex(request));
		info.setPageSize(getPageSize(request, defaultPageSize));
		return info;
	}
849706
@Override
	public synchronized Table<String> setSize(TerminalSize size) {
		setVisibleRows(size.getRows() - 1);
		return super.setSize(size);
	}
609480
@Override
	public int getVariableSize()
	{
		int size = 0;
		for (MappedConst mc : con)
		{
			int m = max(mc.getInds());
			if (m > size) size = m;
		}
		return size + 1;
	}
28687
@NonNull
    public IconicsDrawable sizeDpX(@Dimension(unit = DP) int sizeDp) {
        return sizePxX(Utils.convertDpToPx(mContext, sizeDp));
    }
506140
public Criteria size(int size) {
        this.criteriaType = RelationalOperator.SIZE;
        this.right = ValueNode.toValueNode(size);
        return this;
    }
913656
def GetSizeHint(self, context=None, **unused_kwargs):
    
    context_state = getattr(context, 'state', {})

    subcontext = context_state.get('context', None)
    if not subcontext:
      mapped_values = context_state.get('mapped_values', None)
      subcontext = DataTypeMapContext(values={
          type(mapped_values).__name__: mapped_values})

    size_hint = 0
    for data_type_map in self._data_type_maps:
      data_type_size = data_type_map.GetSizeHint(context=subcontext)
      if data_type_size is None:
        break

      size_hint += data_type_size

    return size_hint
500522
public void setLength(long size) throws IOException, RepositoryException
   {
      if (!changed)
      {
         internalData = createEditableCopy(this.getInternalData());
      }

      ((EditableValueData)internalData).setLength(size);
      invalidateStream();
   }
716892
public static Query setPageParameter(Query query, Pageable pageable){
		if( notNull( pageable ) ){
			query.setFirstResult( (pageable.getPageNumber()-1) * pageable.getPageSize() );
			query.setMaxResults(pageable.getPageSize());
		}
		return query;
	}
868565
public static int getScreenWidth(Context context) {
        DisplayMetrics metrics = context.getResources().getDisplayMetrics();
        return metrics.widthPixels;
    }
750760
public static Map createInitParamMap(PageContext pContext)
    {
        final ServletContext context = pContext.getServletContext();

        return new EnumeratedMap()
        {
            public Enumeration enumerateKeys()
            {
                return context.getInitParameterNames();
            }

            public Object getValue(Object pKey)
            {
                if (pKey instanceof String) {
                    return context.getInitParameter((String) pKey);
                } else {
                    return null;
                }
            }

            public boolean isMutable()
            {
                return false;
            }
        };
    }
619725
public Cell<C,T> size (float size) {
		size(new FixedValue<C, T>(layout.toolkit, size));
		return this;
	}
872494
public void serviceParameter(String pParameter, PageContext pPageContext) throws ServletException, IOException {
        Object param = pPageContext.getRequest().getAttribute(pParameter);

        if (param != null) {
            if (param instanceof Param) {
                ((Param) param).service(pPageContext);
            }
            else {
                pPageContext.getOut().print(param);
            }
        }
        else {
            // Try to get value from parameters
            Object obj = pPageContext.getRequest().getParameter(pParameter);

            // Print parameter or default value
            pPageContext.getOut().print((obj != null) ? obj : "");
        }
    }
1218667
public static JRTIndex instance(Context context) {
        try {
            JRTIndex instance = context.get(JRTIndex.class);
            if (instance == null)
                context.put(JRTIndex.class, instance = new JRTIndex());
            return instance;
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }