Module: Muml_Interface
- Defined in:
- lib/ontomde-uml2-jpa/redefined.rb,
lib/ontomde-uml2-jpa/jpa.rb
Overview
This file includes methods redefinitions
Instance Method Summary collapse
- #jpa_addPersistenceIdAnnnotation!(p) ⇒ Object
-
#jpa_daoClass ⇒ Object
returns implementing class dao name (if only one exists) def db_daoClassName jpa_daoClassName end.
- #jpa_hasPersistenceId? ⇒ Boolean
-
#jpa_isPersistent? ⇒ Boolean
JPA does not support persistent interface.
Instance Method Details
#jpa_addPersistenceIdAnnnotation!(p) ⇒ Object
479 480 481 |
# File 'lib/ontomde-uml2-jpa/jpa.rb', line 479 def jpa_addPersistenceIdAnnnotation!(p) #nop end |
#jpa_daoClass ⇒ Object
returns implementing class dao name (if only one exists) def db_daoClassName jpa_daoClassName end
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ontomde-uml2-jpa/redefined.rb', line 8 def jpa_daoClass #log.debug { "Muml_Interface::jpa_daoClassName #{self}" } found=nil ext_isReferencedBy.each { |i| next unless i.kind_of?(Muml_Implementation) s=i.uml_supplier_one next if s!=self c=i.uml_client_one raise Warning.new,"Too many jpa_daoClassName found for interface #{self}" unless found.nil? || found==c found=c } raise Warning.new,"No jpa_daoClassName found for interface #{self}" if found.nil? return found #.jpa_daoClassName end |
#jpa_hasPersistenceId? ⇒ Boolean
471 472 473 474 475 476 477 478 |
# File 'lib/ontomde-uml2-jpa/jpa.rb', line 471 def jpa_hasPersistenceId? uml_ownedAttribute.each { |a| next unless a.umlx_isComposite? next if a.uml_type_one.db_isTransient? return true ; } return false end |
#jpa_isPersistent? ⇒ Boolean
JPA does not support persistent interface
468 469 470 |
# File 'lib/ontomde-uml2-jpa/jpa.rb', line 468 def jpa_isPersistent? return false end |