Class: Lutaml::Qea::Models::EaObjectConstraint
- Inherits:
-
BaseModel
- Object
- Model::Serializable
- BaseModel
- Lutaml::Qea::Models::EaObjectConstraint
- Defined in:
- lib/lutaml/qea/models/ea_object_constraint.rb
Overview
EA Object Constraint model
Represents OCL constraints attached to UML objects in the t_objectconstraint table.
Class Method Summary collapse
-
.from_db_row(row) ⇒ EaObjectConstraint?
Create from database row.
-
.primary_key_column ⇒ Symbol
Primary key column name.
-
.table_name ⇒ String
Database table name.
Methods inherited from BaseModel
Class Method Details
.from_db_row(row) ⇒ EaObjectConstraint?
Create from database row
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/lutaml/qea/models/ea_object_constraint.rb', line 44 def self.from_db_row(row) return nil if row.nil? new( constraint_id: row["ConstraintID"], ea_object_id: row["Object_ID"], constraint: row["Constraint"], constraint_type: row["ConstraintType"], weight: row["Weight"]&.to_f, notes: row["Notes"], status: row["Status"], ) end |
.primary_key_column ⇒ Symbol
Returns Primary key column name.
31 32 33 |
# File 'lib/lutaml/qea/models/ea_object_constraint.rb', line 31 def self.primary_key_column :constraint_id end |
.table_name ⇒ String
Returns Database table name.
36 37 38 |
# File 'lib/lutaml/qea/models/ea_object_constraint.rb', line 36 def self.table_name "t_objectconstraint" end |