A command about a MEntity that returns a list of mentities

Introduced properties

init defaultinit(model: Model, filter: nullable ModelFilter, mentity: nullable MEntity, mentity_name: nullable String, limit: nullable Int, page: nullable Int, count: nullable Int, max: nullable Int)

nitc :: CmdEntityList :: defaultinit

Redefined properties

redef type SELF: CmdEntityList

nitc $ CmdEntityList :: SELF

Type of this instance, automatically specialized in every class
redef fun http_init(req: HttpRequest): CmdMessage

nitc :: commands_http $ CmdEntityList :: http_init

FIXME avoid linearization conflict
redef fun init_command: CmdMessage

nitc $ CmdEntityList :: init_command

Initialize the command
redef fun to_json: nullable Serializable

nitc :: json_commands $ CmdEntityList :: to_json

Return a JSON Serializable representation of self results

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type ITEM: Object

nitc :: CmdList :: ITEM

Type of result
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _count: nullable Int

nitc :: CmdList :: _count

Total number of ret
private var _filter: nullable ModelFilter

nitc :: DocCommand :: _filter

ModelFilter to apply if any
private var _limit: nullable Int

nitc :: CmdList :: _limit

Limit the items in the list
private var _max: nullable Int

nitc :: CmdList :: _max

Total number of pages
private var _mentity: nullable MEntity

nitc :: CmdEntity :: _mentity

MEntity this command is about
private var _mentity_name: nullable String

nitc :: CmdEntity :: _mentity_name

Name of the mentity this command is about
private var _model: Model

nitc :: DocCommand :: _model

Model to retrieve data for
private var _page: nullable Int

nitc :: CmdList :: _page

Page to display
private var _results: nullable Array[ITEM]

nitc :: CmdList :: _results

Items in the list
private var _sorter: nullable Comparator

nitc :: CmdList :: _sorter

Comparator used to sort the list
private var _sorter: nullable Comparator

nitc :: CmdEntities :: _sorter

protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun cmd_filter: ModelFilter

nitc :: DocCommand :: cmd_filter

Return a new filter for that command execution.
fun count: nullable Int

nitc :: CmdList :: count

Total number of ret
fun count=(count: nullable Int)

nitc :: CmdList :: count=

Total number of ret
init defaultinit(model: Model, filter: nullable ModelFilter)

nitc :: DocCommand :: defaultinit

init defaultinit(model: Model, filter: nullable ModelFilter, mentity: nullable MEntity, mentity_name: nullable String)

nitc :: CmdEntity :: defaultinit

init defaultinit(model: Model, filter: nullable ModelFilter, mentity: nullable MEntity, mentity_name: nullable String, limit: nullable Int, page: nullable Int, count: nullable Int, max: nullable Int)

nitc :: CmdEntityList :: defaultinit

init defaultinit(model: Model, filter: nullable ModelFilter, limit: nullable Int, page: nullable Int, count: nullable Int, max: nullable Int)

nitc :: CmdList :: defaultinit

init defaultinit(model: Model, filter: nullable ModelFilter, limit: nullable Int, page: nullable Int, count: nullable Int, max: nullable Int)

nitc :: CmdEntities :: defaultinit

abstract fun execute(no_color: nullable Bool)

nitc :: DocCommand :: execute

fun filter: nullable ModelFilter

nitc :: DocCommand :: filter

ModelFilter to apply if any
protected fun filter=(filter: nullable ModelFilter)

nitc :: DocCommand :: filter=

ModelFilter to apply if any
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun http_init(req: HttpRequest): CmdMessage

nitc :: DocCommand :: http_init

Init the command from an HTTPRequest
init init

core :: Object :: init

fun init_command: CmdMessage

nitc :: DocCommand :: init_command

Initialize the command
fun init_mentity: CmdMessage

nitc :: CmdEntity :: init_mentity

Initialize the command mentity.
fun init_results: CmdMessage

nitc :: CmdList :: init_results

Initialize the results list
fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun limit: nullable Int

nitc :: CmdList :: limit

Limit the items in the list
fun limit=(limit: nullable Int)

nitc :: CmdList :: limit=

Limit the items in the list
fun max: nullable Int

nitc :: CmdList :: max

Total number of pages
fun max=(max: nullable Int)

nitc :: CmdList :: max=

Total number of pages
fun mentity: nullable MEntity

nitc :: CmdEntity :: mentity

MEntity this command is about
fun mentity=(mentity: nullable MEntity)

nitc :: CmdEntity :: mentity=

MEntity this command is about
fun mentity_name: nullable String

nitc :: CmdEntity :: mentity_name

Name of the mentity this command is about
fun mentity_name=(mentity_name: nullable String)

nitc :: CmdEntity :: mentity_name=

Name of the mentity this command is about
fun model: Model

nitc :: DocCommand :: model

Model to retrieve data for
protected fun model=(model: Model)

nitc :: DocCommand :: model=

Model to retrieve data for
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun page: nullable Int

nitc :: CmdList :: page

Page to display
fun page=(page: nullable Int)

nitc :: CmdList :: page=

Page to display
fun paginate

nitc :: CmdList :: paginate

Paginate the results
fun parser_init(arg: String, options: CmdOptions): CmdMessage

nitc :: DocCommand :: parser_init

Initialize the command from the CommandParser data
fun print_list(list_title: nullable String, list_items: nullable Array[MEntity], no_color: nullable Bool)

nitc :: CmdList :: print_list

fun results: nullable Array[ITEM]

nitc :: CmdList :: results

Items in the list
fun results=(results: nullable Array[ITEM])

nitc :: CmdList :: results=

Items in the list
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
fun sort

nitc :: CmdList :: sort

Sort mentities with sorter
fun sorter: nullable Comparator

nitc :: CmdList :: sorter

Comparator used to sort the list
fun sorter=(sorter: nullable Comparator)

nitc :: CmdList :: sorter=

Comparator used to sort the list
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_html: Writable

nitc :: DocCommand :: to_html

Render results as a HTML string
abstract fun to_json: nullable Serializable

nitc :: DocCommand :: to_json

Return a JSON Serializable representation of self results
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_md: Writable

nitc :: DocCommand :: to_md

Render results as a Markdown string
fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram nitc::CmdEntityList CmdEntityList nitc::CmdEntity CmdEntity nitc::CmdEntityList->nitc::CmdEntity nitc::CmdEntities CmdEntities nitc::CmdEntityList->nitc::CmdEntities nitc::DocCommand DocCommand nitc::CmdEntity->nitc::DocCommand nitc::CmdList CmdList nitc::CmdEntities->nitc::CmdList ...nitc::DocCommand ... ...nitc::DocCommand->nitc::DocCommand ...nitc::CmdList ... ...nitc::CmdList->nitc::CmdList nitc::CmdInheritance CmdInheritance nitc::CmdInheritance->nitc::CmdEntityList nitc::CmdFeatures CmdFeatures nitc::CmdFeatures->nitc::CmdEntityList nitc::CmdMains CmdMains nitc::CmdMains->nitc::CmdEntityList nitc::CmdTesting CmdTesting nitc::CmdTesting->nitc::CmdEntityList nitc::CmdParam CmdParam nitc::CmdParam->nitc::CmdEntityList nitc::CmdReturn CmdReturn nitc::CmdReturn->nitc::CmdEntityList nitc::CmdNew CmdNew nitc::CmdNew->nitc::CmdEntityList nitc::CmdCall CmdCall nitc::CmdCall->nitc::CmdEntityList nitc::CmdAncestors CmdAncestors nitc::CmdAncestors->nitc::CmdInheritance nitc::CmdParents CmdParents nitc::CmdParents->nitc::CmdInheritance nitc::CmdChildren CmdChildren nitc::CmdChildren->nitc::CmdInheritance nitc::CmdDescendants CmdDescendants nitc::CmdDescendants->nitc::CmdInheritance nitc::CmdLinearization CmdLinearization nitc::CmdLinearization->nitc::CmdInheritance nitc::CmdIntros CmdIntros nitc::CmdIntros->nitc::CmdInheritance nitc::CmdRedefs CmdRedefs nitc::CmdRedefs->nitc::CmdInheritance nitc::CmdAllProps CmdAllProps nitc::CmdAllProps->nitc::CmdInheritance nitc::CmdAncestors... ... nitc::CmdAncestors...->nitc::CmdAncestors nitc::CmdParents... ... nitc::CmdParents...->nitc::CmdParents nitc::CmdChildren... ... nitc::CmdChildren...->nitc::CmdChildren nitc::CmdDescendants... ... nitc::CmdDescendants...->nitc::CmdDescendants nitc::CmdLinearization... ... nitc::CmdLinearization...->nitc::CmdLinearization nitc::CmdIntros... ... nitc::CmdIntros...->nitc::CmdIntros nitc::CmdRedefs... ... nitc::CmdRedefs...->nitc::CmdRedefs nitc::CmdAllProps... ... nitc::CmdAllProps...->nitc::CmdAllProps

Ancestors

abstract class CmdList

nitc :: CmdList

A command that returns a list of results
abstract class DocCommand

nitc :: DocCommand

Documentation command
interface Object

core :: Object

The root of the class hierarchy.

Parents

abstract class CmdEntities

nitc :: CmdEntities

A list of mentities
class CmdEntity

nitc :: CmdEntity

A command about a MEntity

Children

class CmdCall

nitc :: CmdCall

Retrieve all the mproperties that call mentity
class CmdFeatures

nitc :: CmdFeatures

MEntity feature list
abstract class CmdInheritance

nitc :: CmdInheritance

An abstract inheritance command
class CmdMains

nitc :: CmdMains

Cmd that finds the mains of an mentity
class CmdNew

nitc :: CmdNew

Retrieve all the mproperties that initialize mentity
class CmdParam

nitc :: CmdParam

Retrieve all the mproperties using mentity as a type for its parameters
class CmdReturn

nitc :: CmdReturn

Retrieve all the mproperties that return somethinf of the mentity type.
class CmdTesting

nitc :: CmdTesting

Cmd that finds the nitunit command related to an mentity

Descendants

class CmdAllProps

nitc :: CmdAllProps

TODO remove once the filters/sorters are merged
class CmdAncestors

nitc :: CmdAncestors

MEntity ancestors command
class CmdChildren

nitc :: CmdChildren

MEntity children command
class CmdDescendants

nitc :: CmdDescendants

MEntity descendants command
class CmdIntros

nitc :: CmdIntros

TODO remove once the filters/sorters are merged
class CmdLinearization

nitc :: CmdLinearization

Linearization command
class CmdParents

nitc :: CmdParents

MEntity parents command
class CmdRedefs

nitc :: CmdRedefs

TODO remove once the filters/sorters are merged

Class definitions

nitc $ CmdEntityList
# A command about a MEntity that returns a list of mentities
abstract class CmdEntityList
	super CmdEntity
	super CmdEntities

	autoinit(model, filter, mentity, mentity_name, limit, page, count, max)

	redef fun init_command do
		var res = init_mentity
		if not res isa CmdSuccess then return res
		res = init_results
		if not res isa CmdSuccess then return res
		sort
		paginate
		return res
	end
end
src/doc/commands/commands_base.nit:317,1--333,3

nitc :: commands_http $ CmdEntityList
redef class CmdEntityList
	# FIXME avoid linearization conflict
	redef fun http_init(req) do return super
end
src/doc/commands/commands_http.nit:147,1--150,3

nitc :: json_commands $ CmdEntityList
redef class CmdEntityList
	redef fun to_json do return super
end
src/doc/templates/json_commands.nit:60,1--62,3