INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Base class for fields and parameters"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: dale
deferred class DATA_CATALOG [G -> FIELD]
inherit

DB_CATALOG [G]
end
feature -- Commands:

put (v: ANY; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_value: v /= void implies valid_object_type (v)
valid_field_name: s /= void and then item (s) /= void

put_no (v: ANY; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
valid_value: v /= void implies valid_object_type (v)
index_in_bounds: 1 <= k and then k <= count

put_list (a: ARRAY [ANY])
-- stores an array of values one by one; if the array is
-- too short, the rest will be unchanged
require
valid_array: valid_object_array (a)
feature -- Query:

item_list: ARRAY [ANY]
-- returns an array of values; if some value is Null then an
-- appropriate item will be Void
ensure
well_done: Result /= void and then valid_object_array (Result)
feature -- Type-dependent commands:

put_boolean, putb (v: BOOLEAN; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_boolean_no, putb_no (v: BOOLEAN; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_character, putc (v: CHARACTER; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_character_no, putc_no (v: CHARACTER; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_integer, puti (v: INTEGER; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_integer_no, puti_no (v: INTEGER; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_real, putr (v: REAL; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_real_no, putr_no (v: REAL; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_double, putd (v: DOUBLE; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_double_no, putd_no (v: DOUBLE; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_string, puts (v: STRING; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_string_no, puts_no (v: STRING; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_date, putdate (v: DATE; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_date_no, putdate_no (v: DATE; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_time, puttime (v: TIME; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_time_no, puttime_no (v: TIME; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_datetime, putdt (v: TIMESTAMP; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_datetime_no, putdt_no (v: TIMESTAMP; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

put_blob, putbl (v: BLOB; s: STRING)
-- put the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

put_blob_no, putbl_no (v: BLOB; k: INTEGER)
-- put the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count
feature -- Type-dependent queries:

to_boolean, infix "@b" (s: STRING): BOOLEAN
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_boolean_no, infix "#b" (k: INTEGER): BOOLEAN
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_character, infix "@c" (s: STRING): CHARACTER
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_character_no, infix "#c" (k: INTEGER): CHARACTER
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_integer, infix "@i" (s: STRING): INTEGER
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_integer_no, infix "#i" (k: INTEGER): INTEGER
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_real, infix "@r" (s: STRING): REAL
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_real_no, infix "#r" (k: INTEGER): REAL
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_double, infix "@w" (s: STRING): DOUBLE
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_double_no, infix "#w" (k: INTEGER): DOUBLE
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_string, infix "@s" (s: STRING): STRING
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_string_no, infix "#s" (k: INTEGER): STRING
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_date, infix "@d" (s: STRING): DATE
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_date_no, infix "#d" (k: INTEGER): DATE
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_time, infix "@t" (s: STRING): TIME
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_time_no, infix "#t" (k: INTEGER): TIME
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_datetime, infix "@dt" (s: STRING): TIMESTAMP
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_datetime_no, infix "#dt" (k: INTEGER): TIMESTAMP
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count

to_blob, infix "@bl" (s: STRING): BLOB
-- get the value 'v' in the field with name 's'
require
valid_field_name: s /= void and then item (s) /= void

to_blob_no, infix "#bl" (k: INTEGER): BLOB
-- get the value 'v' in the field with index 'k'
require
index_in_bounds: 1 <= k and then k <= count
feature -- Validations:

valid_object_type (v: ANY): BOOLEAN
-- ...

valid_object_array (a: ARRAY [ANY]): BOOLEAN
-- ...
end -- class DATA_CATALOG

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES