Class: Ea::Qea::Models::EaAttribute
- Inherits:
-
BaseModel
- Object
- Lutaml::Model::Serializable
- BaseModel
- Ea::Qea::Models::EaAttribute
- 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.
-
#private? ⇒ Boolean
Check if attribute is private.
-
#protected? ⇒ Boolean
Check if attribute is protected.
-
#public? ⇒ Boolean
Check if attribute is public.
-
#sort_position ⇒ Integer
Pos for attribute ordering within parent.
-
#static? ⇒ Boolean
Check if attribute is static.
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 |
#private? ⇒ Boolean
Check if attribute is private
92 93 94 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 92 def private? scope&.downcase == "private" end |
#protected? ⇒ Boolean
Check if attribute is protected
98 99 100 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 98 def protected? scope&.downcase == "protected" end |
#public? ⇒ Boolean
Check if attribute is public
86 87 88 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 86 def public? scope&.downcase == "public" end |
#sort_position ⇒ Integer
Returns pos for attribute ordering within parent.
103 104 105 |
# File 'lib/ea/qea/models/ea_attribute.rb', line 103 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 |