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



35
36
37
# File 'lib/lutaml/qea/models/ea_package.rb', line 35

def self.primary_key_column
  :package_id
end

.table_nameObject



39
40
41
# File 'lib/lutaml/qea/models/ea_package.rb', line 39

def self.table_name
  "t_package"
end

Instance Method Details

#controlled?Boolean

Check if package is controlled

Returns:

  • (Boolean)


45
46
47
# File 'lib/lutaml/qea/models/ea_package.rb', line 45

def controlled?
  iscontrolled == 1
end

#log_xml?Boolean

Check if package logs XML

Returns:

  • (Boolean)


63
64
65
# File 'lib/lutaml/qea/models/ea_package.rb', line 63

def log_xml?
  logxml == 1
end

#protected?Boolean

Check if package is protected

Returns:

  • (Boolean)


51
52
53
# File 'lib/lutaml/qea/models/ea_package.rb', line 51

def protected?
  protected == 1
end

#root?Boolean

Check if package is root (has no parent)

Returns:

  • (Boolean)


69
70
71
# File 'lib/lutaml/qea/models/ea_package.rb', line 69

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

#use_dtd?Boolean

Check if package uses DTD

Returns:

  • (Boolean)


57
58
59
# File 'lib/lutaml/qea/models/ea_package.rb', line 57

def use_dtd?
  usedtd == 1
end