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
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/lutaml/qea/models/ea_object_constraint.rb', line 46 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.
33 34 35 |
# File 'lib/lutaml/qea/models/ea_object_constraint.rb', line 33 def self.primary_key_column :constraint_id end |
.table_name ⇒ String
Returns Database table name.
38 39 40 |
# File 'lib/lutaml/qea/models/ea_object_constraint.rb', line 38 def self.table_name "t_objectconstraint" end |