Class: Lutaml::Qea::Models::EaPackage

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/lutaml/qea/models/ea_package.rb

Overview

Represents a package from the t_package table in EA database This represents packages/namespaces in the model

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

from_db_row, #primary_key

Class Method Details

.primary_key_columnObject



33
34
35
# File 'lib/lutaml/qea/models/ea_package.rb', line 33

def self.primary_key_column
  :package_id
end

.table_nameObject



37
38
39
# File 'lib/lutaml/qea/models/ea_package.rb', line 37

def self.table_name
  "t_package"
end

Instance Method Details

#controlled?Boolean

Check if package is controlled

Returns:

  • (Boolean)


43
44
45
# File 'lib/lutaml/qea/models/ea_package.rb', line 43

def controlled?
  iscontrolled == 1
end

#log_xml?Boolean

Check if package logs XML

Returns:

  • (Boolean)


61
62
63
# File 'lib/lutaml/qea/models/ea_package.rb', line 61

def log_xml?
  logxml == 1
end

#protected?Boolean

Check if package is protected

Returns:

  • (Boolean)


49
50
51
# File 'lib/lutaml/qea/models/ea_package.rb', line 49

def protected?
  protected == 1
end

#root?Boolean

Check if package is root (has no parent)

Returns:

  • (Boolean)


67
68
69
# File 'lib/lutaml/qea/models/ea_package.rb', line 67

def root?
  parent_id.nil? || parent_id.zero?
end

#use_dtd?Boolean

Check if package uses DTD

Returns:

  • (Boolean)


55
56
57
# File 'lib/lutaml/qea/models/ea_package.rb', line 55

def use_dtd?
  usedtd == 1
end