Class: Ea::Qea::Models::EaAttribute
- Inherits:
-
BaseModel
- Object
- Lutaml::Model::Serializable
- BaseModel
- Ea::Qea::Models::EaAttribute
- Includes:
- ScopePredicate
- Defined in:
- lib/ea/qea/models/ea_attribute.rb
Overview
Represents an attribute from the t_attribute table in EA database This represents class attributes/properties
Constant Summary collapse
- COLUMN_MAP =
{ "Object_ID" => :ea_object_id, }.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#allow_duplicates? ⇒ Boolean
Check if attribute allows duplicates.
-
#collection? ⇒ Boolean
Check if attribute is a collection.
-
#constant? ⇒ Boolean
Check if attribute is constant.
-
#ordered? ⇒ Boolean
Check if attribute is ordered.
-
#sort_position ⇒ Integer
Pos for attribute ordering within parent.
-
#static? ⇒ Boolean
Check if attribute is static.
Methods included from ScopePredicate
#private?, #protected?, #public?
Methods inherited from BaseModel
Class Method Details
.column_map ⇒ Object
50 51 52 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 50 def self.column_map COLUMN_MAP end |
.primary_key_column ⇒ Object
37 38 39 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 37 def self.primary_key_column :id end |
.table_name ⇒ Object
41 42 43 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 41 def self.table_name "t_attribute" end |
Instance Method Details
#allow_duplicates? ⇒ Boolean
Check if attribute allows duplicates
74 75 76 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 74 def allow_duplicates? allowduplicates == 1 end |
#collection? ⇒ Boolean
Check if attribute is a collection
62 63 64 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 62 def collection? iscollection == 1 end |
#constant? ⇒ Boolean
Check if attribute is constant
80 81 82 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 80 def constant? const == 1 end |
#ordered? ⇒ Boolean
Check if attribute is ordered
68 69 70 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 68 def ordered? isordered == 1 end |
#sort_position ⇒ Integer
Returns pos for attribute ordering within parent.
87 88 89 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 87 def sort_position pos || 0 end |
#static? ⇒ Boolean
Check if attribute is static
56 57 58 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 56 def static? isstatic == 1 end |