001// license-header java merge-point 002// 003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify! 004// 005package org.andromda.cartridges.spring.metafacades; 006 007import java.util.Collection; 008import java.util.List; 009import org.andromda.core.common.Introspector; 010import org.andromda.core.metafacade.MetafacadeBase; 011import org.andromda.core.metafacade.MetafacadeFactory; 012import org.andromda.core.metafacade.ModelValidationMessage; 013import org.andromda.metafacades.uml.AssociationEndFacade; 014import org.andromda.metafacades.uml.AttributeFacade; 015import org.andromda.metafacades.uml.ClassifierFacade; 016import org.andromda.metafacades.uml.ConstraintFacade; 017import org.andromda.metafacades.uml.DependencyFacade; 018import org.andromda.metafacades.uml.Destination; 019import org.andromda.metafacades.uml.GeneralizableElementFacade; 020import org.andromda.metafacades.uml.GeneralizationFacade; 021import org.andromda.metafacades.uml.ModelElementFacade; 022import org.andromda.metafacades.uml.ModelFacade; 023import org.andromda.metafacades.uml.OperationFacade; 024import org.andromda.metafacades.uml.PackageFacade; 025import org.andromda.metafacades.uml.Role; 026import org.andromda.metafacades.uml.Service; 027import org.andromda.metafacades.uml.StateMachineFacade; 028import org.andromda.metafacades.uml.StereotypeFacade; 029import org.andromda.metafacades.uml.TaggedValueFacade; 030import org.andromda.metafacades.uml.TemplateParameterFacade; 031import org.andromda.metafacades.uml.TypeMappings; 032import org.andromda.translation.ocl.validation.OCLCollections; 033import org.andromda.translation.ocl.validation.OCLExpressions; 034import org.andromda.translation.ocl.validation.OCLIntrospector; 035import org.andromda.translation.ocl.validation.OCLResultEnsurer; 036import org.apache.commons.collections.Predicate; 037import org.apache.log4j.Logger; 038 039/** 040 * Represents a Spring service (which can include regular java objects, and/or session EJBs). 041 * MetafacadeLogic for SpringService 042 * 043 * @see SpringService 044 */ 045public abstract class SpringServiceLogic 046 extends MetafacadeBase 047 implements SpringService 048{ 049 /** 050 * The underlying UML object 051 * @see Object 052 */ 053 protected Object metaObject; 054 055 /** Create Metafacade implementation instance using the MetafacadeFactory from the context 056 * @param metaObjectIn 057 * @param context 058 */ 059 protected SpringServiceLogic(Object metaObjectIn, String context) 060 { 061 super(metaObjectIn, getContext(context)); 062 this.superService = 063 (Service) 064 MetafacadeFactory.getInstance().createFacadeImpl( 065 "org.andromda.metafacades.uml.Service", 066 metaObjectIn, 067 getContext(context)); 068 this.metaObject = metaObjectIn; 069 } 070 071 /** 072 * The logger instance. 073 */ 074 private static final Logger logger = Logger.getLogger(SpringServiceLogic.class); 075 076 /** 077 * Gets the context for this metafacade logic instance. 078 * @param context String. Set to SpringService if null 079 * @return context String 080 */ 081 private static String getContext(String context) 082 { 083 if (context == null) 084 { 085 context = "org.andromda.cartridges.spring.metafacades.SpringService"; 086 } 087 return context; 088 } 089 090 private Service superService; 091 private boolean superServiceInitialized = false; 092 093 /** 094 * Gets the Service parent instance. 095 * @return this.superService Service 096 */ 097 private Service getSuperService() 098 { 099 if (!this.superServiceInitialized) 100 { 101 ((MetafacadeBase)this.superService).setMetafacadeContext(this.getMetafacadeContext()); 102 this.superServiceInitialized = true; 103 } 104 return this.superService; 105 } 106 107 /** Reset context only for non-root metafacades 108 * @param context 109 * @see MetafacadeBase#resetMetafacadeContext(String context) 110 */ 111 @Override 112 public void resetMetafacadeContext(String context) 113 { 114 if (!this.contextRoot) // reset context only for non-root metafacades 115 { 116 context = getContext(context); // to have same value as in original constructor call 117 setMetafacadeContext (context); 118 if (this.superServiceInitialized) 119 { 120 ((MetafacadeBase)this.superService).resetMetafacadeContext(context); 121 } 122 } 123 } 124 125 /** 126 * @return boolean true always 127 * @see SpringService 128 */ 129 public boolean isSpringServiceMetaType() 130 { 131 return true; 132 } 133 134 // --------------- attributes --------------------- 135 136 /** 137 * @see org.andromda.cartridges.spring.metafacades.SpringService#getWebServiceDelegatorName() 138 * @return String 139 */ 140 protected abstract String handleGetWebServiceDelegatorName(); 141 142 private String __webServiceDelegatorName1a; 143 private boolean __webServiceDelegatorName1aSet = false; 144 145 /** 146 * The name of the web service delegator class. 147 * @return (String)handleGetWebServiceDelegatorName() 148 */ 149 public final String getWebServiceDelegatorName() 150 { 151 String webServiceDelegatorName1a = this.__webServiceDelegatorName1a; 152 if (!this.__webServiceDelegatorName1aSet) 153 { 154 // webServiceDelegatorName has no pre constraints 155 webServiceDelegatorName1a = handleGetWebServiceDelegatorName(); 156 // webServiceDelegatorName has no post constraints 157 this.__webServiceDelegatorName1a = webServiceDelegatorName1a; 158 if (isMetafacadePropertyCachingEnabled()) 159 { 160 this.__webServiceDelegatorName1aSet = true; 161 } 162 } 163 return webServiceDelegatorName1a; 164 } 165 166 /** 167 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedWebServiceDelegatorName() 168 * @return String 169 */ 170 protected abstract String handleGetFullyQualifiedWebServiceDelegatorName(); 171 172 private String __fullyQualifiedWebServiceDelegatorName2a; 173 private boolean __fullyQualifiedWebServiceDelegatorName2aSet = false; 174 175 /** 176 * The fully qualified web service delegator class name. 177 * @return (String)handleGetFullyQualifiedWebServiceDelegatorName() 178 */ 179 public final String getFullyQualifiedWebServiceDelegatorName() 180 { 181 String fullyQualifiedWebServiceDelegatorName2a = this.__fullyQualifiedWebServiceDelegatorName2a; 182 if (!this.__fullyQualifiedWebServiceDelegatorName2aSet) 183 { 184 // fullyQualifiedWebServiceDelegatorName has no pre constraints 185 fullyQualifiedWebServiceDelegatorName2a = handleGetFullyQualifiedWebServiceDelegatorName(); 186 // fullyQualifiedWebServiceDelegatorName has no post constraints 187 this.__fullyQualifiedWebServiceDelegatorName2a = fullyQualifiedWebServiceDelegatorName2a; 188 if (isMetafacadePropertyCachingEnabled()) 189 { 190 this.__fullyQualifiedWebServiceDelegatorName2aSet = true; 191 } 192 } 193 return fullyQualifiedWebServiceDelegatorName2a; 194 } 195 196 /** 197 * @see org.andromda.cartridges.spring.metafacades.SpringService#getImplementationName() 198 * @return String 199 */ 200 protected abstract String handleGetImplementationName(); 201 202 private String __implementationName3a; 203 private boolean __implementationName3aSet = false; 204 205 /** 206 * The implementation name of the service 207 * @return (String)handleGetImplementationName() 208 */ 209 public final String getImplementationName() 210 { 211 String implementationName3a = this.__implementationName3a; 212 if (!this.__implementationName3aSet) 213 { 214 // implementationName has no pre constraints 215 implementationName3a = handleGetImplementationName(); 216 // implementationName has no post constraints 217 this.__implementationName3a = implementationName3a; 218 if (isMetafacadePropertyCachingEnabled()) 219 { 220 this.__implementationName3aSet = true; 221 } 222 } 223 return implementationName3a; 224 } 225 226 /** 227 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedImplementationName() 228 * @return String 229 */ 230 protected abstract String handleGetFullyQualifiedImplementationName(); 231 232 private String __fullyQualifiedImplementationName4a; 233 private boolean __fullyQualifiedImplementationName4aSet = false; 234 235 /** 236 * The fully qualified name of the implementation class. 237 * @return (String)handleGetFullyQualifiedImplementationName() 238 */ 239 public final String getFullyQualifiedImplementationName() 240 { 241 String fullyQualifiedImplementationName4a = this.__fullyQualifiedImplementationName4a; 242 if (!this.__fullyQualifiedImplementationName4aSet) 243 { 244 // fullyQualifiedImplementationName has no pre constraints 245 fullyQualifiedImplementationName4a = handleGetFullyQualifiedImplementationName(); 246 // fullyQualifiedImplementationName has no post constraints 247 this.__fullyQualifiedImplementationName4a = fullyQualifiedImplementationName4a; 248 if (isMetafacadePropertyCachingEnabled()) 249 { 250 this.__fullyQualifiedImplementationName4aSet = true; 251 } 252 } 253 return fullyQualifiedImplementationName4a; 254 } 255 256 /** 257 * @see org.andromda.cartridges.spring.metafacades.SpringService#getBaseName() 258 * @return String 259 */ 260 protected abstract String handleGetBaseName(); 261 262 private String __baseName5a; 263 private boolean __baseName5aSet = false; 264 265 /** 266 * The service base class name. 267 * @return (String)handleGetBaseName() 268 */ 269 public final String getBaseName() 270 { 271 String baseName5a = this.__baseName5a; 272 if (!this.__baseName5aSet) 273 { 274 // baseName has no pre constraints 275 baseName5a = handleGetBaseName(); 276 // baseName has no post constraints 277 this.__baseName5a = baseName5a; 278 if (isMetafacadePropertyCachingEnabled()) 279 { 280 this.__baseName5aSet = true; 281 } 282 } 283 return baseName5a; 284 } 285 286 /** 287 * @see org.andromda.cartridges.spring.metafacades.SpringService#getBeanName() 288 * @return String 289 */ 290 protected abstract String handleGetBeanName(); 291 292 private String __beanName6a; 293 private boolean __beanName6aSet = false; 294 295 /** 296 * The bean name of this service. 297 * @return (String)handleGetBeanName() 298 */ 299 public final String getBeanName() 300 { 301 String beanName6a = this.__beanName6a; 302 if (!this.__beanName6aSet) 303 { 304 // beanName has no pre constraints 305 beanName6a = handleGetBeanName(); 306 // beanName has no post constraints 307 this.__beanName6a = beanName6a; 308 if (isMetafacadePropertyCachingEnabled()) 309 { 310 this.__beanName6aSet = true; 311 } 312 } 313 return beanName6a; 314 } 315 316 /** 317 * @see org.andromda.cartridges.spring.metafacades.SpringService#isWebService() 318 * @return boolean 319 */ 320 protected abstract boolean handleIsWebService(); 321 322 private boolean __webService7a; 323 private boolean __webService7aSet = false; 324 325 /** 326 * Returns true/false depending on whether or not this SpringService represents a web service. 327 * @return (boolean)handleIsWebService() 328 */ 329 public final boolean isWebService() 330 { 331 boolean webService7a = this.__webService7a; 332 if (!this.__webService7aSet) 333 { 334 // webService has no pre constraints 335 webService7a = handleIsWebService(); 336 // webService has no post constraints 337 this.__webService7a = webService7a; 338 if (isMetafacadePropertyCachingEnabled()) 339 { 340 this.__webService7aSet = true; 341 } 342 } 343 return webService7a; 344 } 345 346 /** 347 * @see org.andromda.cartridges.spring.metafacades.SpringService#getEjbJndiName() 348 * @return String 349 */ 350 protected abstract String handleGetEjbJndiName(); 351 352 private String __ejbJndiName8a; 353 private boolean __ejbJndiName8aSet = false; 354 355 /** 356 * The JNDI name to which a Spring remote Session EJB will be bound. 357 * @return (String)handleGetEjbJndiName() 358 */ 359 public final String getEjbJndiName() 360 { 361 String ejbJndiName8a = this.__ejbJndiName8a; 362 if (!this.__ejbJndiName8aSet) 363 { 364 // ejbJndiName has no pre constraints 365 ejbJndiName8a = handleGetEjbJndiName(); 366 // ejbJndiName has no post constraints 367 this.__ejbJndiName8a = ejbJndiName8a; 368 if (isMetafacadePropertyCachingEnabled()) 369 { 370 this.__ejbJndiName8aSet = true; 371 } 372 } 373 return ejbJndiName8a; 374 } 375 376 /** 377 * @see org.andromda.cartridges.spring.metafacades.SpringService#getEjbImplementationName() 378 * @return String 379 */ 380 protected abstract String handleGetEjbImplementationName(); 381 382 private String __ejbImplementationName9a; 383 private boolean __ejbImplementationName9aSet = false; 384 385 /** 386 * The EJB implementation class name. 387 * @return (String)handleGetEjbImplementationName() 388 */ 389 public final String getEjbImplementationName() 390 { 391 String ejbImplementationName9a = this.__ejbImplementationName9a; 392 if (!this.__ejbImplementationName9aSet) 393 { 394 // ejbImplementationName has no pre constraints 395 ejbImplementationName9a = handleGetEjbImplementationName(); 396 // ejbImplementationName has no post constraints 397 this.__ejbImplementationName9a = ejbImplementationName9a; 398 if (isMetafacadePropertyCachingEnabled()) 399 { 400 this.__ejbImplementationName9aSet = true; 401 } 402 } 403 return ejbImplementationName9a; 404 } 405 406 /** 407 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedBaseName() 408 * @return String 409 */ 410 protected abstract String handleGetFullyQualifiedBaseName(); 411 412 private String __fullyQualifiedBaseName10a; 413 private boolean __fullyQualifiedBaseName10aSet = false; 414 415 /** 416 * The fully qualified service base class name. 417 * @return (String)handleGetFullyQualifiedBaseName() 418 */ 419 public final String getFullyQualifiedBaseName() 420 { 421 String fullyQualifiedBaseName10a = this.__fullyQualifiedBaseName10a; 422 if (!this.__fullyQualifiedBaseName10aSet) 423 { 424 // fullyQualifiedBaseName has no pre constraints 425 fullyQualifiedBaseName10a = handleGetFullyQualifiedBaseName(); 426 // fullyQualifiedBaseName has no post constraints 427 this.__fullyQualifiedBaseName10a = fullyQualifiedBaseName10a; 428 if (isMetafacadePropertyCachingEnabled()) 429 { 430 this.__fullyQualifiedBaseName10aSet = true; 431 } 432 } 433 return fullyQualifiedBaseName10a; 434 } 435 436 /** 437 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedEjbName() 438 * @return String 439 */ 440 protected abstract String handleGetFullyQualifiedEjbName(); 441 442 private String __fullyQualifiedEjbName11a; 443 private boolean __fullyQualifiedEjbName11aSet = false; 444 445 /** 446 * TODO: Model Documentation for 447 * org.andromda.cartridges.spring.metafacades.SpringService.fullyQualifiedEjbName 448 * @return (String)handleGetFullyQualifiedEjbName() 449 */ 450 public final String getFullyQualifiedEjbName() 451 { 452 String fullyQualifiedEjbName11a = this.__fullyQualifiedEjbName11a; 453 if (!this.__fullyQualifiedEjbName11aSet) 454 { 455 // fullyQualifiedEjbName has no pre constraints 456 fullyQualifiedEjbName11a = handleGetFullyQualifiedEjbName(); 457 // fullyQualifiedEjbName has no post constraints 458 this.__fullyQualifiedEjbName11a = fullyQualifiedEjbName11a; 459 if (isMetafacadePropertyCachingEnabled()) 460 { 461 this.__fullyQualifiedEjbName11aSet = true; 462 } 463 } 464 return fullyQualifiedEjbName11a; 465 } 466 467 /** 468 * @see org.andromda.cartridges.spring.metafacades.SpringService#getEjbPackageName() 469 * @return String 470 */ 471 protected abstract String handleGetEjbPackageName(); 472 473 private String __ejbPackageName12a; 474 private boolean __ejbPackageName12aSet = false; 475 476 /** 477 * This can be either the package name the model element exists within OR it can be the package 478 * with a prefix or suffix (i.e. the package could have '.ejb') appended to it. This option is 479 * available if the EJB is just used a wrapper around a POJO Spring Service. 480 * @return (String)handleGetEjbPackageName() 481 */ 482 public final String getEjbPackageName() 483 { 484 String ejbPackageName12a = this.__ejbPackageName12a; 485 if (!this.__ejbPackageName12aSet) 486 { 487 // ejbPackageName has no pre constraints 488 ejbPackageName12a = handleGetEjbPackageName(); 489 // ejbPackageName has no post constraints 490 this.__ejbPackageName12a = ejbPackageName12a; 491 if (isMetafacadePropertyCachingEnabled()) 492 { 493 this.__ejbPackageName12aSet = true; 494 } 495 } 496 return ejbPackageName12a; 497 } 498 499 /** 500 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedEjbImplementationName() 501 * @return String 502 */ 503 protected abstract String handleGetFullyQualifiedEjbImplementationName(); 504 505 private String __fullyQualifiedEjbImplementationName13a; 506 private boolean __fullyQualifiedEjbImplementationName13aSet = false; 507 508 /** 509 * The fully qualified name of the implementation class name. 510 * @return (String)handleGetFullyQualifiedEjbImplementationName() 511 */ 512 public final String getFullyQualifiedEjbImplementationName() 513 { 514 String fullyQualifiedEjbImplementationName13a = this.__fullyQualifiedEjbImplementationName13a; 515 if (!this.__fullyQualifiedEjbImplementationName13aSet) 516 { 517 // fullyQualifiedEjbImplementationName has no pre constraints 518 fullyQualifiedEjbImplementationName13a = handleGetFullyQualifiedEjbImplementationName(); 519 // fullyQualifiedEjbImplementationName has no post constraints 520 this.__fullyQualifiedEjbImplementationName13a = fullyQualifiedEjbImplementationName13a; 521 if (isMetafacadePropertyCachingEnabled()) 522 { 523 this.__fullyQualifiedEjbImplementationName13aSet = true; 524 } 525 } 526 return fullyQualifiedEjbImplementationName13a; 527 } 528 529 /** 530 * @see org.andromda.cartridges.spring.metafacades.SpringService#getEjbPackageNamePath() 531 * @return String 532 */ 533 protected abstract String handleGetEjbPackageNamePath(); 534 535 private String __ejbPackageNamePath14a; 536 private boolean __ejbPackageNamePath14aSet = false; 537 538 /** 539 * The EJB package name as a path (i.e. '.' are replaced with '/'). 540 * @return (String)handleGetEjbPackageNamePath() 541 */ 542 public final String getEjbPackageNamePath() 543 { 544 String ejbPackageNamePath14a = this.__ejbPackageNamePath14a; 545 if (!this.__ejbPackageNamePath14aSet) 546 { 547 // ejbPackageNamePath has no pre constraints 548 ejbPackageNamePath14a = handleGetEjbPackageNamePath(); 549 // ejbPackageNamePath has no post constraints 550 this.__ejbPackageNamePath14a = ejbPackageNamePath14a; 551 if (isMetafacadePropertyCachingEnabled()) 552 { 553 this.__ejbPackageNamePath14aSet = true; 554 } 555 } 556 return ejbPackageNamePath14a; 557 } 558 559 /** 560 * @see org.andromda.cartridges.spring.metafacades.SpringService#getDefaultExceptionName() 561 * @return String 562 */ 563 protected abstract String handleGetDefaultExceptionName(); 564 565 private String __defaultExceptionName15a; 566 private boolean __defaultExceptionName15aSet = false; 567 568 /** 569 * The name of the default exception to be generated for this service. 570 * @return (String)handleGetDefaultExceptionName() 571 */ 572 public final String getDefaultExceptionName() 573 { 574 String defaultExceptionName15a = this.__defaultExceptionName15a; 575 if (!this.__defaultExceptionName15aSet) 576 { 577 // defaultExceptionName has no pre constraints 578 defaultExceptionName15a = handleGetDefaultExceptionName(); 579 // defaultExceptionName has no post constraints 580 this.__defaultExceptionName15a = defaultExceptionName15a; 581 if (isMetafacadePropertyCachingEnabled()) 582 { 583 this.__defaultExceptionName15aSet = true; 584 } 585 } 586 return defaultExceptionName15a; 587 } 588 589 /** 590 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedDefaultExceptionName() 591 * @return String 592 */ 593 protected abstract String handleGetFullyQualifiedDefaultExceptionName(); 594 595 private String __fullyQualifiedDefaultExceptionName16a; 596 private boolean __fullyQualifiedDefaultExceptionName16aSet = false; 597 598 /** 599 * The fully qualified class name of the default exception. 600 * @return (String)handleGetFullyQualifiedDefaultExceptionName() 601 */ 602 public final String getFullyQualifiedDefaultExceptionName() 603 { 604 String fullyQualifiedDefaultExceptionName16a = this.__fullyQualifiedDefaultExceptionName16a; 605 if (!this.__fullyQualifiedDefaultExceptionName16aSet) 606 { 607 // fullyQualifiedDefaultExceptionName has no pre constraints 608 fullyQualifiedDefaultExceptionName16a = handleGetFullyQualifiedDefaultExceptionName(); 609 // fullyQualifiedDefaultExceptionName has no post constraints 610 this.__fullyQualifiedDefaultExceptionName16a = fullyQualifiedDefaultExceptionName16a; 611 if (isMetafacadePropertyCachingEnabled()) 612 { 613 this.__fullyQualifiedDefaultExceptionName16aSet = true; 614 } 615 } 616 return fullyQualifiedDefaultExceptionName16a; 617 } 618 619 /** 620 * @see org.andromda.cartridges.spring.metafacades.SpringService#isAllowDefaultServiceException() 621 * @return boolean 622 */ 623 protected abstract boolean handleIsAllowDefaultServiceException(); 624 625 private boolean __allowDefaultServiceException17a; 626 private boolean __allowDefaultServiceException17aSet = false; 627 628 /** 629 * Indicates whether or not a default service exception should be allowed. 630 * @return (boolean)handleIsAllowDefaultServiceException() 631 */ 632 public final boolean isAllowDefaultServiceException() 633 { 634 boolean allowDefaultServiceException17a = this.__allowDefaultServiceException17a; 635 if (!this.__allowDefaultServiceException17aSet) 636 { 637 // allowDefaultServiceException has no pre constraints 638 allowDefaultServiceException17a = handleIsAllowDefaultServiceException(); 639 // allowDefaultServiceException has no post constraints 640 this.__allowDefaultServiceException17a = allowDefaultServiceException17a; 641 if (isMetafacadePropertyCachingEnabled()) 642 { 643 this.__allowDefaultServiceException17aSet = true; 644 } 645 } 646 return allowDefaultServiceException17a; 647 } 648 649 /** 650 * @see org.andromda.cartridges.spring.metafacades.SpringService#getRemotePort() 651 * @return String 652 */ 653 protected abstract String handleGetRemotePort(); 654 655 private String __remotePort18a; 656 private boolean __remotePort18aSet = false; 657 658 /** 659 * Determines which port this service will be published on at the server side. 660 * @return (String)handleGetRemotePort() 661 */ 662 public final String getRemotePort() 663 { 664 String remotePort18a = this.__remotePort18a; 665 if (!this.__remotePort18aSet) 666 { 667 // remotePort has no pre constraints 668 remotePort18a = handleGetRemotePort(); 669 // remotePort has no post constraints 670 this.__remotePort18a = remotePort18a; 671 if (isMetafacadePropertyCachingEnabled()) 672 { 673 this.__remotePort18aSet = true; 674 } 675 } 676 return remotePort18a; 677 } 678 679 /** 680 * @see org.andromda.cartridges.spring.metafacades.SpringService#getRemoteUrl() 681 * @return String 682 */ 683 protected abstract String handleGetRemoteUrl(); 684 685 private String __remoteUrl19a; 686 private boolean __remoteUrl19aSet = false; 687 688 /** 689 * The URL this servie will be run on at the server side. 690 * @return (String)handleGetRemoteUrl() 691 */ 692 public final String getRemoteUrl() 693 { 694 String remoteUrl19a = this.__remoteUrl19a; 695 if (!this.__remoteUrl19aSet) 696 { 697 // remoteUrl has no pre constraints 698 remoteUrl19a = handleGetRemoteUrl(); 699 // remoteUrl has no post constraints 700 this.__remoteUrl19a = remoteUrl19a; 701 if (isMetafacadePropertyCachingEnabled()) 702 { 703 this.__remoteUrl19aSet = true; 704 } 705 } 706 return remoteUrl19a; 707 } 708 709 /** 710 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotable() 711 * @return boolean 712 */ 713 protected abstract boolean handleIsRemotable(); 714 715 private boolean __remotable20a; 716 private boolean __remotable20aSet = false; 717 718 /** 719 * Returns true if this service is remotable. Derived from remotingType. 720 * @return (boolean)handleIsRemotable() 721 */ 722 public final boolean isRemotable() 723 { 724 boolean remotable20a = this.__remotable20a; 725 if (!this.__remotable20aSet) 726 { 727 // remotable has no pre constraints 728 remotable20a = handleIsRemotable(); 729 // remotable has no post constraints 730 this.__remotable20a = remotable20a; 731 if (isMetafacadePropertyCachingEnabled()) 732 { 733 this.__remotable20aSet = true; 734 } 735 } 736 return remotable20a; 737 } 738 739 /** 740 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotingTypeRmi() 741 * @return boolean 742 */ 743 protected abstract boolean handleIsRemotingTypeRmi(); 744 745 private boolean __remotingTypeRmi21a; 746 private boolean __remotingTypeRmi21aSet = false; 747 748 /** 749 * Indicates if the remoting type is RMI. 750 * @return (boolean)handleIsRemotingTypeRmi() 751 */ 752 public final boolean isRemotingTypeRmi() 753 { 754 boolean remotingTypeRmi21a = this.__remotingTypeRmi21a; 755 if (!this.__remotingTypeRmi21aSet) 756 { 757 // remotingTypeRmi has no pre constraints 758 remotingTypeRmi21a = handleIsRemotingTypeRmi(); 759 // remotingTypeRmi has no post constraints 760 this.__remotingTypeRmi21a = remotingTypeRmi21a; 761 if (isMetafacadePropertyCachingEnabled()) 762 { 763 this.__remotingTypeRmi21aSet = true; 764 } 765 } 766 return remotingTypeRmi21a; 767 } 768 769 /** 770 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotingTypeBurlap() 771 * @return boolean 772 */ 773 protected abstract boolean handleIsRemotingTypeBurlap(); 774 775 private boolean __remotingTypeBurlap22a; 776 private boolean __remotingTypeBurlap22aSet = false; 777 778 /** 779 * Indicates if the remoting type is "burlap". 780 * @return (boolean)handleIsRemotingTypeBurlap() 781 */ 782 public final boolean isRemotingTypeBurlap() 783 { 784 boolean remotingTypeBurlap22a = this.__remotingTypeBurlap22a; 785 if (!this.__remotingTypeBurlap22aSet) 786 { 787 // remotingTypeBurlap has no pre constraints 788 remotingTypeBurlap22a = handleIsRemotingTypeBurlap(); 789 // remotingTypeBurlap has no post constraints 790 this.__remotingTypeBurlap22a = remotingTypeBurlap22a; 791 if (isMetafacadePropertyCachingEnabled()) 792 { 793 this.__remotingTypeBurlap22aSet = true; 794 } 795 } 796 return remotingTypeBurlap22a; 797 } 798 799 /** 800 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotingTypeHessian() 801 * @return boolean 802 */ 803 protected abstract boolean handleIsRemotingTypeHessian(); 804 805 private boolean __remotingTypeHessian23a; 806 private boolean __remotingTypeHessian23aSet = false; 807 808 /** 809 * Indicates if the remoting type is "hessian". 810 * @return (boolean)handleIsRemotingTypeHessian() 811 */ 812 public final boolean isRemotingTypeHessian() 813 { 814 boolean remotingTypeHessian23a = this.__remotingTypeHessian23a; 815 if (!this.__remotingTypeHessian23aSet) 816 { 817 // remotingTypeHessian has no pre constraints 818 remotingTypeHessian23a = handleIsRemotingTypeHessian(); 819 // remotingTypeHessian has no post constraints 820 this.__remotingTypeHessian23a = remotingTypeHessian23a; 821 if (isMetafacadePropertyCachingEnabled()) 822 { 823 this.__remotingTypeHessian23aSet = true; 824 } 825 } 826 return remotingTypeHessian23a; 827 } 828 829 /** 830 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotingTypeHttpInvoker() 831 * @return boolean 832 */ 833 protected abstract boolean handleIsRemotingTypeHttpInvoker(); 834 835 private boolean __remotingTypeHttpInvoker24a; 836 private boolean __remotingTypeHttpInvoker24aSet = false; 837 838 /** 839 * Indicates if the remoting type is "httpinvoker". 840 * @return (boolean)handleIsRemotingTypeHttpInvoker() 841 */ 842 public final boolean isRemotingTypeHttpInvoker() 843 { 844 boolean remotingTypeHttpInvoker24a = this.__remotingTypeHttpInvoker24a; 845 if (!this.__remotingTypeHttpInvoker24aSet) 846 { 847 // remotingTypeHttpInvoker has no pre constraints 848 remotingTypeHttpInvoker24a = handleIsRemotingTypeHttpInvoker(); 849 // remotingTypeHttpInvoker has no post constraints 850 this.__remotingTypeHttpInvoker24a = remotingTypeHttpInvoker24a; 851 if (isMetafacadePropertyCachingEnabled()) 852 { 853 this.__remotingTypeHttpInvoker24aSet = true; 854 } 855 } 856 return remotingTypeHttpInvoker24a; 857 } 858 859 /** 860 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotingTypeNone() 861 * @return boolean 862 */ 863 protected abstract boolean handleIsRemotingTypeNone(); 864 865 private boolean __remotingTypeNone25a; 866 private boolean __remotingTypeNone25aSet = false; 867 868 /** 869 * Indicates if the remoting type for this service is "none". 870 * @return (boolean)handleIsRemotingTypeNone() 871 */ 872 public final boolean isRemotingTypeNone() 873 { 874 boolean remotingTypeNone25a = this.__remotingTypeNone25a; 875 if (!this.__remotingTypeNone25aSet) 876 { 877 // remotingTypeNone has no pre constraints 878 remotingTypeNone25a = handleIsRemotingTypeNone(); 879 // remotingTypeNone has no post constraints 880 this.__remotingTypeNone25a = remotingTypeNone25a; 881 if (isMetafacadePropertyCachingEnabled()) 882 { 883 this.__remotingTypeNone25aSet = true; 884 } 885 } 886 return remotingTypeNone25a; 887 } 888 889 /** 890 * @see org.andromda.cartridges.spring.metafacades.SpringService#isHibernateInterceptorEnabled() 891 * @return boolean 892 */ 893 protected abstract boolean handleIsHibernateInterceptorEnabled(); 894 895 private boolean __hibernateInterceptorEnabled26a; 896 private boolean __hibernateInterceptorEnabled26aSet = false; 897 898 /** 899 * Indicates whether or not the hibernate intercetor is enabled for this service. 900 * @return (boolean)handleIsHibernateInterceptorEnabled() 901 */ 902 public final boolean isHibernateInterceptorEnabled() 903 { 904 boolean hibernateInterceptorEnabled26a = this.__hibernateInterceptorEnabled26a; 905 if (!this.__hibernateInterceptorEnabled26aSet) 906 { 907 // hibernateInterceptorEnabled has no pre constraints 908 hibernateInterceptorEnabled26a = handleIsHibernateInterceptorEnabled(); 909 // hibernateInterceptorEnabled has no post constraints 910 this.__hibernateInterceptorEnabled26a = hibernateInterceptorEnabled26a; 911 if (isMetafacadePropertyCachingEnabled()) 912 { 913 this.__hibernateInterceptorEnabled26aSet = true; 914 } 915 } 916 return hibernateInterceptorEnabled26a; 917 } 918 919 /** 920 * @see org.andromda.cartridges.spring.metafacades.SpringService#isEjbRemoteView() 921 * @return boolean 922 */ 923 protected abstract boolean handleIsEjbRemoteView(); 924 925 private boolean __ejbRemoteView27a; 926 private boolean __ejbRemoteView27aSet = false; 927 928 /** 929 * Indicates if the view type of this service is remote. 930 * @return (boolean)handleIsEjbRemoteView() 931 */ 932 public final boolean isEjbRemoteView() 933 { 934 boolean ejbRemoteView27a = this.__ejbRemoteView27a; 935 if (!this.__ejbRemoteView27aSet) 936 { 937 // ejbRemoteView has no pre constraints 938 ejbRemoteView27a = handleIsEjbRemoteView(); 939 // ejbRemoteView has no post constraints 940 this.__ejbRemoteView27a = ejbRemoteView27a; 941 if (isMetafacadePropertyCachingEnabled()) 942 { 943 this.__ejbRemoteView27aSet = true; 944 } 945 } 946 return ejbRemoteView27a; 947 } 948 949 /** 950 * @see org.andromda.cartridges.spring.metafacades.SpringService#getRemoteServer() 951 * @return String 952 */ 953 protected abstract String handleGetRemoteServer(); 954 955 private String __remoteServer28a; 956 private boolean __remoteServer28aSet = false; 957 958 /** 959 * Returns the name of the remote server for this service. 960 * @return (String)handleGetRemoteServer() 961 */ 962 public final String getRemoteServer() 963 { 964 String remoteServer28a = this.__remoteServer28a; 965 if (!this.__remoteServer28aSet) 966 { 967 // remoteServer has no pre constraints 968 remoteServer28a = handleGetRemoteServer(); 969 // remoteServer has no post constraints 970 this.__remoteServer28a = remoteServer28a; 971 if (isMetafacadePropertyCachingEnabled()) 972 { 973 this.__remoteServer28aSet = true; 974 } 975 } 976 return remoteServer28a; 977 } 978 979 /** 980 * @see org.andromda.cartridges.spring.metafacades.SpringService#getRemoteContext() 981 * @return String 982 */ 983 protected abstract String handleGetRemoteContext(); 984 985 private String __remoteContext29a; 986 private boolean __remoteContext29aSet = false; 987 988 /** 989 * Returns the remote context for this service. 990 * @return (String)handleGetRemoteContext() 991 */ 992 public final String getRemoteContext() 993 { 994 String remoteContext29a = this.__remoteContext29a; 995 if (!this.__remoteContext29aSet) 996 { 997 // remoteContext has no pre constraints 998 remoteContext29a = handleGetRemoteContext(); 999 // remoteContext has no post constraints 1000 this.__remoteContext29a = remoteContext29a; 1001 if (isMetafacadePropertyCachingEnabled()) 1002 { 1003 this.__remoteContext29aSet = true; 1004 } 1005 } 1006 return remoteContext29a; 1007 } 1008 1009 /** 1010 * @see org.andromda.cartridges.spring.metafacades.SpringService#getEjbTransactionType() 1011 * @return String 1012 */ 1013 protected abstract String handleGetEjbTransactionType(); 1014 1015 private String __ejbTransactionType30a; 1016 private boolean __ejbTransactionType30aSet = false; 1017 1018 /** 1019 * The EJB transaction type (Bean or Container). 1020 * @return (String)handleGetEjbTransactionType() 1021 */ 1022 public final String getEjbTransactionType() 1023 { 1024 String ejbTransactionType30a = this.__ejbTransactionType30a; 1025 if (!this.__ejbTransactionType30aSet) 1026 { 1027 // ejbTransactionType has no pre constraints 1028 ejbTransactionType30a = handleGetEjbTransactionType(); 1029 // ejbTransactionType has no post constraints 1030 this.__ejbTransactionType30a = ejbTransactionType30a; 1031 if (isMetafacadePropertyCachingEnabled()) 1032 { 1033 this.__ejbTransactionType30aSet = true; 1034 } 1035 } 1036 return ejbTransactionType30a; 1037 } 1038 1039 /** 1040 * @see org.andromda.cartridges.spring.metafacades.SpringService#getInterceptors() 1041 * @return Collection<String> 1042 */ 1043 protected abstract Collection<String> handleGetInterceptors(); 1044 1045 private Collection<String> __interceptors31a; 1046 private boolean __interceptors31aSet = false; 1047 1048 /** 1049 * TODO: Model Documentation for 1050 * org.andromda.cartridges.spring.metafacades.SpringService.interceptors 1051 * @return (Collection<String>)handleGetInterceptors() 1052 */ 1053 public final Collection<String> getInterceptors() 1054 { 1055 Collection<String> interceptors31a = this.__interceptors31a; 1056 if (!this.__interceptors31aSet) 1057 { 1058 // interceptors has no pre constraints 1059 interceptors31a = handleGetInterceptors(); 1060 // interceptors has no post constraints 1061 this.__interceptors31a = interceptors31a; 1062 if (isMetafacadePropertyCachingEnabled()) 1063 { 1064 this.__interceptors31aSet = true; 1065 } 1066 } 1067 return interceptors31a; 1068 } 1069 1070 /** 1071 * @see org.andromda.cartridges.spring.metafacades.SpringService#isConfigonly() 1072 * @return boolean 1073 */ 1074 protected abstract boolean handleIsConfigonly(); 1075 1076 private boolean __configonly32a; 1077 private boolean __configonly32aSet = false; 1078 1079 /** 1080 * Defines whether this service will only be listed in the config, but note be generated as a 1081 * Spring bean. 1082 * @return (boolean)handleIsConfigonly() 1083 */ 1084 public final boolean isConfigonly() 1085 { 1086 boolean configonly32a = this.__configonly32a; 1087 if (!this.__configonly32aSet) 1088 { 1089 // configonly has no pre constraints 1090 configonly32a = handleIsConfigonly(); 1091 // configonly has no post constraints 1092 this.__configonly32a = configonly32a; 1093 if (isMetafacadePropertyCachingEnabled()) 1094 { 1095 this.__configonly32aSet = true; 1096 } 1097 } 1098 return configonly32a; 1099 } 1100 1101 /** 1102 * @see org.andromda.cartridges.spring.metafacades.SpringService#getWebServiceOutgoingAttachmentHandlerCall() 1103 * @return String 1104 */ 1105 protected abstract String handleGetWebServiceOutgoingAttachmentHandlerCall(); 1106 1107 private String __webServiceOutgoingAttachmentHandlerCall33a; 1108 private boolean __webServiceOutgoingAttachmentHandlerCall33aSet = false; 1109 1110 /** 1111 * The call to the outgoing web service attachment call. 1112 * @return (String)handleGetWebServiceOutgoingAttachmentHandlerCall() 1113 */ 1114 public final String getWebServiceOutgoingAttachmentHandlerCall() 1115 { 1116 String webServiceOutgoingAttachmentHandlerCall33a = this.__webServiceOutgoingAttachmentHandlerCall33a; 1117 if (!this.__webServiceOutgoingAttachmentHandlerCall33aSet) 1118 { 1119 // webServiceOutgoingAttachmentHandlerCall has no pre constraints 1120 webServiceOutgoingAttachmentHandlerCall33a = handleGetWebServiceOutgoingAttachmentHandlerCall(); 1121 // webServiceOutgoingAttachmentHandlerCall has no post constraints 1122 this.__webServiceOutgoingAttachmentHandlerCall33a = webServiceOutgoingAttachmentHandlerCall33a; 1123 if (isMetafacadePropertyCachingEnabled()) 1124 { 1125 this.__webServiceOutgoingAttachmentHandlerCall33aSet = true; 1126 } 1127 } 1128 return webServiceOutgoingAttachmentHandlerCall33a; 1129 } 1130 1131 /** 1132 * @see org.andromda.cartridges.spring.metafacades.SpringService#getWebServiceIncomingAttachmentHandlerCall() 1133 * @return String 1134 */ 1135 protected abstract String handleGetWebServiceIncomingAttachmentHandlerCall(); 1136 1137 private String __webServiceIncomingAttachmentHandlerCall34a; 1138 private boolean __webServiceIncomingAttachmentHandlerCall34aSet = false; 1139 1140 /** 1141 * The call to the incoming web service attachment call. 1142 * @return (String)handleGetWebServiceIncomingAttachmentHandlerCall() 1143 */ 1144 public final String getWebServiceIncomingAttachmentHandlerCall() 1145 { 1146 String webServiceIncomingAttachmentHandlerCall34a = this.__webServiceIncomingAttachmentHandlerCall34a; 1147 if (!this.__webServiceIncomingAttachmentHandlerCall34aSet) 1148 { 1149 // webServiceIncomingAttachmentHandlerCall has no pre constraints 1150 webServiceIncomingAttachmentHandlerCall34a = handleGetWebServiceIncomingAttachmentHandlerCall(); 1151 // webServiceIncomingAttachmentHandlerCall has no post constraints 1152 this.__webServiceIncomingAttachmentHandlerCall34a = webServiceIncomingAttachmentHandlerCall34a; 1153 if (isMetafacadePropertyCachingEnabled()) 1154 { 1155 this.__webServiceIncomingAttachmentHandlerCall34aSet = true; 1156 } 1157 } 1158 return webServiceIncomingAttachmentHandlerCall34a; 1159 } 1160 1161 /** 1162 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRichClient() 1163 * @return boolean 1164 */ 1165 protected abstract boolean handleIsRichClient(); 1166 1167 private boolean __richClient35a; 1168 private boolean __richClient35aSet = false; 1169 1170 /** 1171 * Returns true if this service is meant to take part in a richt client application. 1172 * @return (boolean)handleIsRichClient() 1173 */ 1174 public final boolean isRichClient() 1175 { 1176 boolean richClient35a = this.__richClient35a; 1177 if (!this.__richClient35aSet) 1178 { 1179 // richClient has no pre constraints 1180 richClient35a = handleIsRichClient(); 1181 // richClient has no post constraints 1182 this.__richClient35a = richClient35a; 1183 if (isMetafacadePropertyCachingEnabled()) 1184 { 1185 this.__richClient35aSet = true; 1186 } 1187 } 1188 return richClient35a; 1189 } 1190 1191 /** 1192 * @see org.andromda.cartridges.spring.metafacades.SpringService#isEjbLocalView() 1193 * @return boolean 1194 */ 1195 protected abstract boolean handleIsEjbLocalView(); 1196 1197 private boolean __ejbLocalView36a; 1198 private boolean __ejbLocalView36aSet = false; 1199 1200 /** 1201 * TODO: Model Documentation for 1202 * org.andromda.cartridges.spring.metafacades.SpringService.ejbLocalView 1203 * @return (boolean)handleIsEjbLocalView() 1204 */ 1205 public final boolean isEjbLocalView() 1206 { 1207 boolean ejbLocalView36a = this.__ejbLocalView36a; 1208 if (!this.__ejbLocalView36aSet) 1209 { 1210 // ejbLocalView has no pre constraints 1211 ejbLocalView36a = handleIsEjbLocalView(); 1212 // ejbLocalView has no post constraints 1213 this.__ejbLocalView36a = ejbLocalView36a; 1214 if (isMetafacadePropertyCachingEnabled()) 1215 { 1216 this.__ejbLocalView36aSet = true; 1217 } 1218 } 1219 return ejbLocalView36a; 1220 } 1221 1222 /** 1223 * @see org.andromda.cartridges.spring.metafacades.SpringService#getFullyQualifiedLocalEjbName() 1224 * @return String 1225 */ 1226 protected abstract String handleGetFullyQualifiedLocalEjbName(); 1227 1228 private String __fullyQualifiedLocalEjbName37a; 1229 private boolean __fullyQualifiedLocalEjbName37aSet = false; 1230 1231 /** 1232 * TODO: Model Documentation for 1233 * org.andromda.cartridges.spring.metafacades.SpringService.fullyQualifiedLocalEjbName 1234 * @return (String)handleGetFullyQualifiedLocalEjbName() 1235 */ 1236 public final String getFullyQualifiedLocalEjbName() 1237 { 1238 String fullyQualifiedLocalEjbName37a = this.__fullyQualifiedLocalEjbName37a; 1239 if (!this.__fullyQualifiedLocalEjbName37aSet) 1240 { 1241 // fullyQualifiedLocalEjbName has no pre constraints 1242 fullyQualifiedLocalEjbName37a = handleGetFullyQualifiedLocalEjbName(); 1243 // fullyQualifiedLocalEjbName has no post constraints 1244 this.__fullyQualifiedLocalEjbName37a = fullyQualifiedLocalEjbName37a; 1245 if (isMetafacadePropertyCachingEnabled()) 1246 { 1247 this.__fullyQualifiedLocalEjbName37aSet = true; 1248 } 1249 } 1250 return fullyQualifiedLocalEjbName37a; 1251 } 1252 1253 /** 1254 * @see org.andromda.cartridges.spring.metafacades.SpringService#getEjbLocalJndiName() 1255 * @return String 1256 */ 1257 protected abstract String handleGetEjbLocalJndiName(); 1258 1259 private String __ejbLocalJndiName38a; 1260 private boolean __ejbLocalJndiName38aSet = false; 1261 1262 /** 1263 * The JNDI name to which a Spring local Session EJB will be bound. 1264 * @return (String)handleGetEjbLocalJndiName() 1265 */ 1266 public final String getEjbLocalJndiName() 1267 { 1268 String ejbLocalJndiName38a = this.__ejbLocalJndiName38a; 1269 if (!this.__ejbLocalJndiName38aSet) 1270 { 1271 // ejbLocalJndiName has no pre constraints 1272 ejbLocalJndiName38a = handleGetEjbLocalJndiName(); 1273 // ejbLocalJndiName has no post constraints 1274 this.__ejbLocalJndiName38a = ejbLocalJndiName38a; 1275 if (isMetafacadePropertyCachingEnabled()) 1276 { 1277 this.__ejbLocalJndiName38aSet = true; 1278 } 1279 } 1280 return ejbLocalJndiName38a; 1281 } 1282 1283 /** 1284 * @see org.andromda.cartridges.spring.metafacades.SpringService#isRemotingTypeLingo() 1285 * @return boolean 1286 */ 1287 protected abstract boolean handleIsRemotingTypeLingo(); 1288 1289 private boolean __remotingTypeLingo39a; 1290 private boolean __remotingTypeLingo39aSet = false; 1291 1292 /** 1293 * Indicates whether this service can be talked to using Lingo remoting. 1294 * @return (boolean)handleIsRemotingTypeLingo() 1295 */ 1296 public final boolean isRemotingTypeLingo() 1297 { 1298 boolean remotingTypeLingo39a = this.__remotingTypeLingo39a; 1299 if (!this.__remotingTypeLingo39aSet) 1300 { 1301 // remotingTypeLingo has no pre constraints 1302 remotingTypeLingo39a = handleIsRemotingTypeLingo(); 1303 // remotingTypeLingo has no post constraints 1304 this.__remotingTypeLingo39a = remotingTypeLingo39a; 1305 if (isMetafacadePropertyCachingEnabled()) 1306 { 1307 this.__remotingTypeLingo39aSet = true; 1308 } 1309 } 1310 return remotingTypeLingo39a; 1311 } 1312 1313 /** 1314 * @see org.andromda.cartridges.spring.metafacades.SpringService#isPrivate() 1315 * @return boolean 1316 */ 1317 protected abstract boolean handleIsPrivate(); 1318 1319 private boolean __private40a; 1320 private boolean __private40aSet = false; 1321 1322 /** 1323 * Returns true if the service is considered as private. Private services are not available 1324 * through the ServiceLocator, are not exposed via remoting and their methods are not 1325 * intercepted by transaction manager. 1326 * @return (boolean)handleIsPrivate() 1327 */ 1328 public final boolean isPrivate() 1329 { 1330 boolean private40a = this.__private40a; 1331 if (!this.__private40aSet) 1332 { 1333 // private has no pre constraints 1334 private40a = handleIsPrivate(); 1335 // private has no post constraints 1336 this.__private40a = private40a; 1337 if (isMetafacadePropertyCachingEnabled()) 1338 { 1339 this.__private40aSet = true; 1340 } 1341 } 1342 return private40a; 1343 } 1344 1345 /** 1346 * @see org.andromda.cartridges.spring.metafacades.SpringService#getImplementationPackageName() 1347 * @return String 1348 */ 1349 protected abstract String handleGetImplementationPackageName(); 1350 1351 private String __implementationPackageName41a; 1352 private boolean __implementationPackageName41aSet = false; 1353 1354 /** 1355 * This can be either the package name the model element exists within OR it can be the package 1356 * with a prefix or suffix (i.e. the package could have '.impl') appended to it. 1357 * @return (String)handleGetImplementationPackageName() 1358 */ 1359 public final String getImplementationPackageName() 1360 { 1361 String implementationPackageName41a = this.__implementationPackageName41a; 1362 if (!this.__implementationPackageName41aSet) 1363 { 1364 // implementationPackageName has no pre constraints 1365 implementationPackageName41a = handleGetImplementationPackageName(); 1366 // implementationPackageName has no post constraints 1367 this.__implementationPackageName41a = implementationPackageName41a; 1368 if (isMetafacadePropertyCachingEnabled()) 1369 { 1370 this.__implementationPackageName41aSet = true; 1371 } 1372 } 1373 return implementationPackageName41a; 1374 } 1375 1376 /** 1377 * @see org.andromda.cartridges.spring.metafacades.SpringService#getImplementationPackagePath() 1378 * @return String 1379 */ 1380 protected abstract String handleGetImplementationPackagePath(); 1381 1382 private String __implementationPackagePath42a; 1383 private boolean __implementationPackagePath42aSet = false; 1384 1385 /** 1386 * The service implementation package name as a path (i.e. '.' are replaced with '/'). 1387 * @return (String)handleGetImplementationPackagePath() 1388 */ 1389 public final String getImplementationPackagePath() 1390 { 1391 String implementationPackagePath42a = this.__implementationPackagePath42a; 1392 if (!this.__implementationPackagePath42aSet) 1393 { 1394 // implementationPackagePath has no pre constraints 1395 implementationPackagePath42a = handleGetImplementationPackagePath(); 1396 // implementationPackagePath has no post constraints 1397 this.__implementationPackagePath42a = implementationPackagePath42a; 1398 if (isMetafacadePropertyCachingEnabled()) 1399 { 1400 this.__implementationPackagePath42aSet = true; 1401 } 1402 } 1403 return implementationPackagePath42a; 1404 } 1405 1406 /** 1407 * @see org.andromda.cartridges.spring.metafacades.SpringService#getInitMethodName() 1408 * @return String 1409 */ 1410 protected abstract String handleGetInitMethodName(); 1411 1412 private String __initMethodName43a; 1413 private boolean __initMethodName43aSet = false; 1414 1415 /** 1416 * This is a name of the init-method of this service, or is empty if doesn't exists. 1417 * @return (String)handleGetInitMethodName() 1418 */ 1419 public final String getInitMethodName() 1420 { 1421 String initMethodName43a = this.__initMethodName43a; 1422 if (!this.__initMethodName43aSet) 1423 { 1424 // initMethodName has no pre constraints 1425 initMethodName43a = handleGetInitMethodName(); 1426 // initMethodName has no post constraints 1427 this.__initMethodName43a = initMethodName43a; 1428 if (isMetafacadePropertyCachingEnabled()) 1429 { 1430 this.__initMethodName43aSet = true; 1431 } 1432 } 1433 return initMethodName43a; 1434 } 1435 1436 /** 1437 * @see org.andromda.cartridges.spring.metafacades.SpringService#getDestroyMethodName() 1438 * @return String 1439 */ 1440 protected abstract String handleGetDestroyMethodName(); 1441 1442 private String __destroyMethodName44a; 1443 private boolean __destroyMethodName44aSet = false; 1444 1445 /** 1446 * This is a name of the destroy-method of this service, or is empty if doesn't exists. 1447 * @return (String)handleGetDestroyMethodName() 1448 */ 1449 public final String getDestroyMethodName() 1450 { 1451 String destroyMethodName44a = this.__destroyMethodName44a; 1452 if (!this.__destroyMethodName44aSet) 1453 { 1454 // destroyMethodName has no pre constraints 1455 destroyMethodName44a = handleGetDestroyMethodName(); 1456 // destroyMethodName has no post constraints 1457 this.__destroyMethodName44a = destroyMethodName44a; 1458 if (isMetafacadePropertyCachingEnabled()) 1459 { 1460 this.__destroyMethodName44aSet = true; 1461 } 1462 } 1463 return destroyMethodName44a; 1464 } 1465 1466 // ---------------- business methods ---------------------- 1467 1468 /** 1469 * Method to be implemented in descendants 1470 * Gets the Spring bean name, and optionally adds a target suffix, if 'targetSuffix' is set to 1471 * true. 1472 * @param targetSuffix 1473 * @return String 1474 */ 1475 protected abstract String handleGetBeanName(boolean targetSuffix); 1476 1477 /** 1478 * Gets the Spring bean name, and optionally adds a target suffix, if 'targetSuffix' is set to 1479 * true. 1480 * @param targetSuffix boolean 1481 * Whether or not the target suffix should be added. 1482 * @return handleGetBeanName(targetSuffix) 1483 */ 1484 public String getBeanName(boolean targetSuffix) 1485 { 1486 // getBeanName has no pre constraints 1487 String returnValue = handleGetBeanName(targetSuffix); 1488 // getBeanName has no post constraints 1489 return returnValue; 1490 } 1491 1492 // ------------- associations ------------------ 1493 1494 private Collection<SpringServiceOperation> __getWebServiceOperations1r; 1495 private boolean __getWebServiceOperations1rSet = false; 1496 1497 /** 1498 * Represents a Spring service (which can include regular java objects, and/or session EJBs). 1499 * @return (Collection<SpringServiceOperation>)handleGetWebServiceOperations() 1500 */ 1501 public final Collection<SpringServiceOperation> getWebServiceOperations() 1502 { 1503 Collection<SpringServiceOperation> getWebServiceOperations1r = this.__getWebServiceOperations1r; 1504 if (!this.__getWebServiceOperations1rSet) 1505 { 1506 // springService has no pre constraints 1507 Collection result = handleGetWebServiceOperations(); 1508 List shieldedResult = this.shieldedElements(result); 1509 try 1510 { 1511 getWebServiceOperations1r = (Collection<SpringServiceOperation>)shieldedResult; 1512 } 1513 catch (ClassCastException ex) 1514 { 1515 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn 1516 SpringServiceLogic.logger.warn("incorrect metafacade cast for SpringServiceLogic.getWebServiceOperations Collection<SpringServiceOperation> " + result + ": " + shieldedResult); 1517 } 1518 // springService has no post constraints 1519 this.__getWebServiceOperations1r = getWebServiceOperations1r; 1520 if (isMetafacadePropertyCachingEnabled()) 1521 { 1522 this.__getWebServiceOperations1rSet = true; 1523 } 1524 } 1525 return getWebServiceOperations1r; 1526 } 1527 1528 /** 1529 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type 1530 * @return Collection 1531 */ 1532 protected abstract Collection handleGetWebServiceOperations(); 1533 1534 /** 1535 * @return true 1536 * @see Service 1537 */ 1538 public boolean isServiceMetaType() 1539 { 1540 return true; 1541 } 1542 1543 /** 1544 * @return true 1545 * @see ClassifierFacade 1546 */ 1547 public boolean isClassifierFacadeMetaType() 1548 { 1549 return true; 1550 } 1551 1552 /** 1553 * @return true 1554 * @see GeneralizableElementFacade 1555 */ 1556 public boolean isGeneralizableElementFacadeMetaType() 1557 { 1558 return true; 1559 } 1560 1561 /** 1562 * @return true 1563 * @see ModelElementFacade 1564 */ 1565 public boolean isModelElementFacadeMetaType() 1566 { 1567 return true; 1568 } 1569 1570 // ----------- delegates to Service ------------ 1571 /** 1572 * Return the attribute which name matches the parameter 1573 * @see ClassifierFacade#findAttribute(String name) 1574 */ 1575 public AttributeFacade findAttribute(String name) 1576 { 1577 return this.getSuperService().findAttribute(name); 1578 } 1579 1580 /** 1581 * Those abstraction dependencies for which this classifier is the client. 1582 * @see ClassifierFacade#getAbstractions() 1583 */ 1584 public Collection<ClassifierFacade> getAbstractions() 1585 { 1586 return this.getSuperService().getAbstractions(); 1587 } 1588 1589 /** 1590 * Lists all classes associated to this one and any ancestor classes (through generalization). 1591 * There will be no duplicates. The order of the elements is predictable. 1592 * @see ClassifierFacade#getAllAssociatedClasses() 1593 */ 1594 public Collection<ClassifierFacade> getAllAssociatedClasses() 1595 { 1596 return this.getSuperService().getAllAssociatedClasses(); 1597 } 1598 1599 /** 1600 * A collection containing all 'properties' of the classifier and its ancestors. Properties are 1601 * any attributes and navigable connecting association ends. 1602 * @see ClassifierFacade#getAllProperties() 1603 */ 1604 public Collection<ModelElementFacade> getAllProperties() 1605 { 1606 return this.getSuperService().getAllProperties(); 1607 } 1608 1609 /** 1610 * A collection containing all required and/or read-only 'properties' of the classifier and its 1611 * ancestors. Properties are any attributes and navigable connecting association ends. 1612 * @see ClassifierFacade#getAllRequiredConstructorParameters() 1613 */ 1614 public Collection<ModelElementFacade> getAllRequiredConstructorParameters() 1615 { 1616 return this.getSuperService().getAllRequiredConstructorParameters(); 1617 } 1618 1619 /** 1620 * Gets the array type for this classifier. If this classifier already represents an array, it 1621 * just returns itself. 1622 * @see ClassifierFacade#getArray() 1623 */ 1624 public ClassifierFacade getArray() 1625 { 1626 return this.getSuperService().getArray(); 1627 } 1628 1629 /** 1630 * The name of the classifier as an array. 1631 * @see ClassifierFacade#getArrayName() 1632 */ 1633 public String getArrayName() 1634 { 1635 return this.getSuperService().getArrayName(); 1636 } 1637 1638 /** 1639 * Lists the classes associated to this one, there is no repitition of classes. The order of the 1640 * elements is predictable. 1641 * @see ClassifierFacade#getAssociatedClasses() 1642 */ 1643 public Collection<ClassifierFacade> getAssociatedClasses() 1644 { 1645 return this.getSuperService().getAssociatedClasses(); 1646 } 1647 1648 /** 1649 * Gets the association ends belonging to a classifier. 1650 * @see ClassifierFacade#getAssociationEnds() 1651 */ 1652 public List<AssociationEndFacade> getAssociationEnds() 1653 { 1654 return this.getSuperService().getAssociationEnds(); 1655 } 1656 1657 /** 1658 * Gets the attributes that belong to the classifier. 1659 * @see ClassifierFacade#getAttributes() 1660 */ 1661 public List<AttributeFacade> getAttributes() 1662 { 1663 return this.getSuperService().getAttributes(); 1664 } 1665 1666 /** 1667 * Gets all attributes for the classifier and if 'follow' is true goes up the inheritance 1668 * hierarchy and gets the attributes from the super classes as well. 1669 * @see ClassifierFacade#getAttributes(boolean follow) 1670 */ 1671 public List<AttributeFacade> getAttributes(boolean follow) 1672 { 1673 return this.getSuperService().getAttributes(follow); 1674 } 1675 1676 /** 1677 * The fully qualified name of the classifier as an array. 1678 * @see ClassifierFacade#getFullyQualifiedArrayName() 1679 */ 1680 public String getFullyQualifiedArrayName() 1681 { 1682 return this.getSuperService().getFullyQualifiedArrayName(); 1683 } 1684 1685 /** 1686 * Returns all those operations that could be implemented at this classifier's level. This means 1687 * the operations owned by this classifier as well as any realized interface's operations 1688 * (recursively) in case this classifier itself is not already an interface, or generalized when 1689 * this classifier is an interface. 1690 * @see ClassifierFacade#getImplementationOperations() 1691 */ 1692 public Collection<OperationFacade> getImplementationOperations() 1693 { 1694 return this.getSuperService().getImplementationOperations(); 1695 } 1696 1697 /** 1698 * A comma separated list of the fully qualified names of all implemented interfaces. 1699 * @see ClassifierFacade#getImplementedInterfaceList() 1700 */ 1701 public String getImplementedInterfaceList() 1702 { 1703 return this.getSuperService().getImplementedInterfaceList(); 1704 } 1705 1706 /** 1707 * Those attributes that are scoped to an instance of this class. 1708 * @see ClassifierFacade#getInstanceAttributes() 1709 */ 1710 public Collection<AttributeFacade> getInstanceAttributes() 1711 { 1712 return this.getSuperService().getInstanceAttributes(); 1713 } 1714 1715 /** 1716 * Those operations that are scoped to an instance of this class. 1717 * @see ClassifierFacade#getInstanceOperations() 1718 */ 1719 public List<OperationFacade> getInstanceOperations() 1720 { 1721 return this.getSuperService().getInstanceOperations(); 1722 } 1723 1724 /** 1725 * Those interfaces that are abstractions of this classifier, this basically means this 1726 * classifier realizes them. 1727 * @see ClassifierFacade#getInterfaceAbstractions() 1728 */ 1729 public Collection<ClassifierFacade> getInterfaceAbstractions() 1730 { 1731 return this.getSuperService().getInterfaceAbstractions(); 1732 } 1733 1734 /** 1735 * A String representing a new Constructor declaration for this classifier type to be used in a 1736 * Java environment. 1737 * @see ClassifierFacade#getJavaNewString() 1738 */ 1739 public String getJavaNewString() 1740 { 1741 return this.getSuperService().getJavaNewString(); 1742 } 1743 1744 /** 1745 * A String representing the null-value for this classifier type to be used in a Java 1746 * environment. 1747 * @see ClassifierFacade#getJavaNullString() 1748 */ 1749 public String getJavaNullString() 1750 { 1751 return this.getSuperService().getJavaNullString(); 1752 } 1753 1754 /** 1755 * The other ends of this classifier's association ends which are navigable. 1756 * @see ClassifierFacade#getNavigableConnectingEnds() 1757 */ 1758 public Collection<AssociationEndFacade> getNavigableConnectingEnds() 1759 { 1760 return this.getSuperService().getNavigableConnectingEnds(); 1761 } 1762 1763 /** 1764 * Get the other ends of this classifier's association ends which are navigable and if 'follow' 1765 * is true goes up the inheritance hierarchy and gets the super association ends as well. 1766 * @see ClassifierFacade#getNavigableConnectingEnds(boolean follow) 1767 */ 1768 public List<AssociationEndFacade> getNavigableConnectingEnds(boolean follow) 1769 { 1770 return this.getSuperService().getNavigableConnectingEnds(follow); 1771 } 1772 1773 /** 1774 * Assuming that the classifier is an array, this will return the non array type of the 1775 * classifier from 1776 * the model. If the classifier is NOT an array, it will just return itself. 1777 * @see ClassifierFacade#getNonArray() 1778 */ 1779 public ClassifierFacade getNonArray() 1780 { 1781 return this.getSuperService().getNonArray(); 1782 } 1783 1784 /** 1785 * The attributes from this classifier in the form of an operation call (this example would be 1786 * in Java): '(String attributeOne, String attributeTwo). If there were no attributes on the 1787 * classifier, the result would be an empty '()'. 1788 * @see ClassifierFacade#getOperationCallFromAttributes() 1789 */ 1790 public String getOperationCallFromAttributes() 1791 { 1792 return this.getSuperService().getOperationCallFromAttributes(); 1793 } 1794 1795 /** 1796 * The operations owned by this classifier. 1797 * @see ClassifierFacade#getOperations() 1798 */ 1799 public List<OperationFacade> getOperations() 1800 { 1801 return this.getSuperService().getOperations(); 1802 } 1803 1804 /** 1805 * A collection containing all 'properties' of the classifier. Properties are any attributes 1806 * and navigable connecting association ends. 1807 * @see ClassifierFacade#getProperties() 1808 */ 1809 public List<ModelElementFacade> getProperties() 1810 { 1811 return this.getSuperService().getProperties(); 1812 } 1813 1814 /** 1815 * Gets all properties (attributes and navigable association ends) for the classifier and if 1816 * 'follow' is true goes up the inheritance hierarchy and gets the properties from the super 1817 * classes as well. 1818 * @see ClassifierFacade#getProperties(boolean follow) 1819 */ 1820 public List getProperties(boolean follow) 1821 { 1822 return this.getSuperService().getProperties(follow); 1823 } 1824 1825 /** 1826 * A collection containing all required and/or read-only 'properties' of the classifier. 1827 * Properties are any attributes and navigable connecting association ends. 1828 * @see ClassifierFacade#getRequiredConstructorParameters() 1829 */ 1830 public Collection<ModelElementFacade> getRequiredConstructorParameters() 1831 { 1832 return this.getSuperService().getRequiredConstructorParameters(); 1833 } 1834 1835 /** 1836 * Returns the serial version UID of the underlying model element. 1837 * @see ClassifierFacade#getSerialVersionUID() 1838 */ 1839 public long getSerialVersionUID() 1840 { 1841 return this.getSuperService().getSerialVersionUID(); 1842 } 1843 1844 /** 1845 * Those attributes that are scoped to the definition of this class. 1846 * @see ClassifierFacade#getStaticAttributes() 1847 */ 1848 public Collection<AttributeFacade> getStaticAttributes() 1849 { 1850 return this.getSuperService().getStaticAttributes(); 1851 } 1852 1853 /** 1854 * Those operations that are scoped to the definition of this class. 1855 * @see ClassifierFacade#getStaticOperations() 1856 */ 1857 public List<OperationFacade> getStaticOperations() 1858 { 1859 return this.getSuperService().getStaticOperations(); 1860 } 1861 1862 /** 1863 * This class' superclass, returns the generalization if it is a ClassifierFacade, null 1864 * otherwise. 1865 * @see ClassifierFacade#getSuperClass() 1866 */ 1867 public ClassifierFacade getSuperClass() 1868 { 1869 return this.getSuperService().getSuperClass(); 1870 } 1871 1872 /** 1873 * The wrapper name for this classifier if a mapped type has a defined wrapper class (ie. 'long' 1874 * maps to 'Long'). If the classifier doesn't have a wrapper defined for it, this method will 1875 * return a null. Note that wrapper mappings must be defined for the namespace by defining the 1876 * 'wrapperMappingsUri', this property must point to the location of the mappings file which 1877 * maps the primitives to wrapper types. 1878 * @see ClassifierFacade#getWrapperName() 1879 */ 1880 public String getWrapperName() 1881 { 1882 return this.getSuperService().getWrapperName(); 1883 } 1884 1885 /** 1886 * Indicates if this classifier is 'abstract'. 1887 * @see ClassifierFacade#isAbstract() 1888 */ 1889 public boolean isAbstract() 1890 { 1891 return this.getSuperService().isAbstract(); 1892 } 1893 1894 /** 1895 * True if this classifier represents an array type. False otherwise. 1896 * @see ClassifierFacade#isArrayType() 1897 */ 1898 public boolean isArrayType() 1899 { 1900 return this.getSuperService().isArrayType(); 1901 } 1902 1903 /** 1904 * True if the ClassifierFacade is an AssociationClass. 1905 * @see ClassifierFacade#isAssociationClass() 1906 */ 1907 public boolean isAssociationClass() 1908 { 1909 return this.getSuperService().isAssociationClass(); 1910 } 1911 1912 /** 1913 * Returns true if this type represents a Blob type. 1914 * @see ClassifierFacade#isBlobType() 1915 */ 1916 public boolean isBlobType() 1917 { 1918 return this.getSuperService().isBlobType(); 1919 } 1920 1921 /** 1922 * Indicates if this type represents a boolean type or not. 1923 * @see ClassifierFacade#isBooleanType() 1924 */ 1925 public boolean isBooleanType() 1926 { 1927 return this.getSuperService().isBooleanType(); 1928 } 1929 1930 /** 1931 * Indicates if this type represents a char, Character, or java.lang.Character type or not. 1932 * @see ClassifierFacade#isCharacterType() 1933 */ 1934 public boolean isCharacterType() 1935 { 1936 return this.getSuperService().isCharacterType(); 1937 } 1938 1939 /** 1940 * Returns true if this type represents a Clob type. 1941 * @see ClassifierFacade#isClobType() 1942 */ 1943 public boolean isClobType() 1944 { 1945 return this.getSuperService().isClobType(); 1946 } 1947 1948 /** 1949 * True if this classifier represents a collection type. False otherwise. 1950 * @see ClassifierFacade#isCollectionType() 1951 */ 1952 public boolean isCollectionType() 1953 { 1954 return this.getSuperService().isCollectionType(); 1955 } 1956 1957 /** 1958 * True/false depending on whether or not this classifier represents a datatype. A data type is 1959 * a type whose instances are identified only by their value. A data type may contain attributes 1960 * to support the modeling of structured data types. 1961 * @see ClassifierFacade#isDataType() 1962 */ 1963 public boolean isDataType() 1964 { 1965 return this.getSuperService().isDataType(); 1966 } 1967 1968 /** 1969 * True when this classifier is a date type. 1970 * @see ClassifierFacade#isDateType() 1971 */ 1972 public boolean isDateType() 1973 { 1974 return this.getSuperService().isDateType(); 1975 } 1976 1977 /** 1978 * Indicates if this type represents a Double type or not. 1979 * @see ClassifierFacade#isDoubleType() 1980 */ 1981 public boolean isDoubleType() 1982 { 1983 return this.getSuperService().isDoubleType(); 1984 } 1985 1986 /** 1987 * Indicates whether or not this classifier represents an "EmbeddedValue'. 1988 * @see ClassifierFacade#isEmbeddedValue() 1989 */ 1990 public boolean isEmbeddedValue() 1991 { 1992 return this.getSuperService().isEmbeddedValue(); 1993 } 1994 1995 /** 1996 * True if this classifier is in fact marked as an enumeration. 1997 * @see ClassifierFacade#isEnumeration() 1998 */ 1999 public boolean isEnumeration() 2000 { 2001 return this.getSuperService().isEnumeration(); 2002 } 2003 2004 /** 2005 * Returns true if this type represents a 'file' type. 2006 * @see ClassifierFacade#isFileType() 2007 */ 2008 public boolean isFileType() 2009 { 2010 return this.getSuperService().isFileType(); 2011 } 2012 2013 /** 2014 * Indicates if this type represents a Float type or not. 2015 * @see ClassifierFacade#isFloatType() 2016 */ 2017 public boolean isFloatType() 2018 { 2019 return this.getSuperService().isFloatType(); 2020 } 2021 2022 /** 2023 * Indicates if this type represents an int or Integer or java.lang.Integer type or not. 2024 * @see ClassifierFacade#isIntegerType() 2025 */ 2026 public boolean isIntegerType() 2027 { 2028 return this.getSuperService().isIntegerType(); 2029 } 2030 2031 /** 2032 * True/false depending on whether or not this Classifier represents an interface. 2033 * @see ClassifierFacade#isInterface() 2034 */ 2035 public boolean isInterface() 2036 { 2037 return this.getSuperService().isInterface(); 2038 } 2039 2040 /** 2041 * True if this classifier cannot be extended and represent a leaf in the inheritance tree. 2042 * @see ClassifierFacade#isLeaf() 2043 */ 2044 public boolean isLeaf() 2045 { 2046 return this.getSuperService().isLeaf(); 2047 } 2048 2049 /** 2050 * True if this classifier represents a list type. False otherwise. 2051 * @see ClassifierFacade#isListType() 2052 */ 2053 public boolean isListType() 2054 { 2055 return this.getSuperService().isListType(); 2056 } 2057 2058 /** 2059 * Indicates if this type represents a Long type or not. 2060 * @see ClassifierFacade#isLongType() 2061 */ 2062 public boolean isLongType() 2063 { 2064 return this.getSuperService().isLongType(); 2065 } 2066 2067 /** 2068 * Indicates whether or not this classifier represents a Map type. 2069 * @see ClassifierFacade#isMapType() 2070 */ 2071 public boolean isMapType() 2072 { 2073 return this.getSuperService().isMapType(); 2074 } 2075 2076 /** 2077 * Indicates whether or not this classifier represents a primitive type. 2078 * @see ClassifierFacade#isPrimitive() 2079 */ 2080 public boolean isPrimitive() 2081 { 2082 return this.getSuperService().isPrimitive(); 2083 } 2084 2085 /** 2086 * True if this classifier represents a set type. False otherwise. 2087 * @see ClassifierFacade#isSetType() 2088 */ 2089 public boolean isSetType() 2090 { 2091 return this.getSuperService().isSetType(); 2092 } 2093 2094 /** 2095 * Indicates whether or not this classifier represents a string type. 2096 * @see ClassifierFacade#isStringType() 2097 */ 2098 public boolean isStringType() 2099 { 2100 return this.getSuperService().isStringType(); 2101 } 2102 2103 /** 2104 * Indicates whether or not this classifier represents a time type. 2105 * @see ClassifierFacade#isTimeType() 2106 */ 2107 public boolean isTimeType() 2108 { 2109 return this.getSuperService().isTimeType(); 2110 } 2111 2112 /** 2113 * Returns true if this type is a wrapped primitive type. 2114 * @see ClassifierFacade#isWrappedPrimitive() 2115 */ 2116 public boolean isWrappedPrimitive() 2117 { 2118 return this.getSuperService().isWrappedPrimitive(); 2119 } 2120 2121 /** 2122 * Finds the tagged value optional searching the entire inheritance hierarchy if 'follow' is set 2123 * to true. 2124 * @see GeneralizableElementFacade#findTaggedValue(String tagName, boolean follow) 2125 */ 2126 public Object findTaggedValue(String tagName, boolean follow) 2127 { 2128 return this.getSuperService().findTaggedValue(tagName, follow); 2129 } 2130 2131 /** 2132 * All generalizations for this generalizable element, goes up the inheritance tree. 2133 * @see GeneralizableElementFacade#getAllGeneralizations() 2134 */ 2135 public Collection<GeneralizableElementFacade> getAllGeneralizations() 2136 { 2137 return this.getSuperService().getAllGeneralizations(); 2138 } 2139 2140 /** 2141 * All specializations (travels down the inheritance hierarchy). 2142 * @see GeneralizableElementFacade#getAllSpecializations() 2143 */ 2144 public Collection<GeneralizableElementFacade> getAllSpecializations() 2145 { 2146 return this.getSuperService().getAllSpecializations(); 2147 } 2148 2149 /** 2150 * Gets the direct generalization for this generalizable element. 2151 * @see GeneralizableElementFacade#getGeneralization() 2152 */ 2153 public GeneralizableElementFacade getGeneralization() 2154 { 2155 return this.getSuperService().getGeneralization(); 2156 } 2157 2158 /** 2159 * Gets the actual links that this generalization element is part of (it plays either the 2160 * specialization or generalization). 2161 * @see GeneralizableElementFacade#getGeneralizationLinks() 2162 */ 2163 public Collection<GeneralizationFacade> getGeneralizationLinks() 2164 { 2165 return this.getSuperService().getGeneralizationLinks(); 2166 } 2167 2168 /** 2169 * A comma separated list of the fully qualified names of all generalizations. 2170 * @see GeneralizableElementFacade#getGeneralizationList() 2171 */ 2172 public String getGeneralizationList() 2173 { 2174 return this.getSuperService().getGeneralizationList(); 2175 } 2176 2177 /** 2178 * The element found when you recursively follow the generalization path up to the root. If an 2179 * element has no generalization itself will be considered the root. 2180 * @see GeneralizableElementFacade#getGeneralizationRoot() 2181 */ 2182 public GeneralizableElementFacade getGeneralizationRoot() 2183 { 2184 return this.getSuperService().getGeneralizationRoot(); 2185 } 2186 2187 /** 2188 * Return all generalizations (ancestors) from this generalizable element. 2189 * @see GeneralizableElementFacade#getGeneralizations() 2190 */ 2191 public Collection<GeneralizableElementFacade> getGeneralizations() 2192 { 2193 return this.getSuperService().getGeneralizations(); 2194 } 2195 2196 /** 2197 * Gets the direct specializations (i.e. sub elements) for this generalizatble element. 2198 * @see GeneralizableElementFacade#getSpecializations() 2199 */ 2200 public Collection<GeneralizableElementFacade> getSpecializations() 2201 { 2202 return this.getSuperService().getSpecializations(); 2203 } 2204 2205 /** 2206 * Copies all tagged values from the given ModelElementFacade to this model element facade. 2207 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element) 2208 */ 2209 public void copyTaggedValues(ModelElementFacade element) 2210 { 2211 this.getSuperService().copyTaggedValues(element); 2212 } 2213 2214 /** 2215 * Finds the tagged value with the specified 'tagName'. In case there are more values the first 2216 * one found will be returned. 2217 * @see ModelElementFacade#findTaggedValue(String tagName) 2218 */ 2219 public Object findTaggedValue(String tagName) 2220 { 2221 return this.getSuperService().findTaggedValue(tagName); 2222 } 2223 2224 /** 2225 * Returns all the values for the tagged value with the specified name. The returned collection 2226 * will contains only String instances, or will be empty. Never null. 2227 * @see ModelElementFacade#findTaggedValues(String tagName) 2228 */ 2229 public Collection<Object> findTaggedValues(String tagName) 2230 { 2231 return this.getSuperService().findTaggedValues(tagName); 2232 } 2233 2234 /** 2235 * Returns the fully qualified name of the model element. The fully qualified name includes 2236 * complete package qualified name of the underlying model element. The templates parameter will 2237 * be replaced by the correct one given the binding relation of the parameter to this element. 2238 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement) 2239 */ 2240 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement) 2241 { 2242 return this.getSuperService().getBindedFullyQualifiedName(bindedElement); 2243 } 2244 2245 /** 2246 * Gets all constraints belonging to the model element. 2247 * @see ModelElementFacade#getConstraints() 2248 */ 2249 public Collection<ConstraintFacade> getConstraints() 2250 { 2251 return this.getSuperService().getConstraints(); 2252 } 2253 2254 /** 2255 * Returns the constraints of the argument kind that have been placed onto this model. Typical 2256 * kinds are "inv", "pre" and "post". Other kinds are possible. 2257 * @see ModelElementFacade#getConstraints(String kind) 2258 */ 2259 public Collection<ConstraintFacade> getConstraints(String kind) 2260 { 2261 return this.getSuperService().getConstraints(kind); 2262 } 2263 2264 /** 2265 * Gets the documentation for the model element, The indent argument is prefixed to each line. 2266 * By default this method wraps lines after 64 characters. 2267 * This method is equivalent to <code>getDocumentation(indent, 64)</code>. 2268 * @see ModelElementFacade#getDocumentation(String indent) 2269 */ 2270 public String getDocumentation(String indent) 2271 { 2272 return this.getSuperService().getDocumentation(indent); 2273 } 2274 2275 /** 2276 * This method returns the documentation for this model element, with the lines wrapped after 2277 * the specified number of characters, values of less than 1 will indicate no line wrapping is 2278 * required. By default paragraphs are returned as HTML. 2279 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>. 2280 * @see ModelElementFacade#getDocumentation(String indent, int lineLength) 2281 */ 2282 public String getDocumentation(String indent, int lineLength) 2283 { 2284 return this.getSuperService().getDocumentation(indent, lineLength); 2285 } 2286 2287 /** 2288 * This method returns the documentation for this model element, with the lines wrapped after 2289 * the specified number of characters, values of less than 1 will indicate no line wrapping is 2290 * required. HTML style determines if HTML Escaping is applied. 2291 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle) 2292 */ 2293 public String getDocumentation(String indent, int lineLength, boolean htmlStyle) 2294 { 2295 return this.getSuperService().getDocumentation(indent, lineLength, htmlStyle); 2296 } 2297 2298 /** 2299 * The fully qualified name of this model element. 2300 * @see ModelElementFacade#getFullyQualifiedName() 2301 */ 2302 public String getFullyQualifiedName() 2303 { 2304 return this.getSuperService().getFullyQualifiedName(); 2305 } 2306 2307 /** 2308 * Returns the fully qualified name of the model element. The fully qualified name includes 2309 * complete package qualified name of the underlying model element. If modelName is true, then 2310 * the original name of the model element (the name contained within the model) will be the name 2311 * returned, otherwise a name from a language mapping will be returned. 2312 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName) 2313 */ 2314 public String getFullyQualifiedName(boolean modelName) 2315 { 2316 return this.getSuperService().getFullyQualifiedName(modelName); 2317 } 2318 2319 /** 2320 * Returns the fully qualified name as a path, the returned value always starts with out a slash 2321 * '/'. 2322 * @see ModelElementFacade#getFullyQualifiedNamePath() 2323 */ 2324 public String getFullyQualifiedNamePath() 2325 { 2326 return this.getSuperService().getFullyQualifiedNamePath(); 2327 } 2328 2329 /** 2330 * Gets the unique identifier of the underlying model element. 2331 * @see ModelElementFacade#getId() 2332 */ 2333 public String getId() 2334 { 2335 return this.getSuperService().getId(); 2336 } 2337 2338 /** 2339 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which 2340 * are not represented by other properties, i.e. native, transient, volatile, synchronized, 2341 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings: 2342 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require 2343 * JDK5 compiler level. 2344 * @see ModelElementFacade#getKeywords() 2345 */ 2346 public Collection<String> getKeywords() 2347 { 2348 return this.getSuperService().getKeywords(); 2349 } 2350 2351 /** 2352 * UML2: Retrieves a localized label for this named element. 2353 * @see ModelElementFacade#getLabel() 2354 */ 2355 public String getLabel() 2356 { 2357 return this.getSuperService().getLabel(); 2358 } 2359 2360 /** 2361 * The language mappings that have been set for this model element. 2362 * @see ModelElementFacade#getLanguageMappings() 2363 */ 2364 public TypeMappings getLanguageMappings() 2365 { 2366 return this.getSuperService().getLanguageMappings(); 2367 } 2368 2369 /** 2370 * Return the model containing this model element (multiple models may be loaded and processed 2371 * at the same time). 2372 * @see ModelElementFacade#getModel() 2373 */ 2374 public ModelFacade getModel() 2375 { 2376 return this.getSuperService().getModel(); 2377 } 2378 2379 /** 2380 * The name of the model element. 2381 * @see ModelElementFacade#getName() 2382 */ 2383 public String getName() 2384 { 2385 return this.getSuperService().getName(); 2386 } 2387 2388 /** 2389 * Gets the package to which this model element belongs. 2390 * @see ModelElementFacade#getPackage() 2391 */ 2392 public ModelElementFacade getPackage() 2393 { 2394 return this.getSuperService().getPackage(); 2395 } 2396 2397 /** 2398 * The name of this model element's package. 2399 * @see ModelElementFacade#getPackageName() 2400 */ 2401 public String getPackageName() 2402 { 2403 return this.getSuperService().getPackageName(); 2404 } 2405 2406 /** 2407 * Gets the package name (optionally providing the ability to retrieve the model name and not 2408 * the mapped name). 2409 * @see ModelElementFacade#getPackageName(boolean modelName) 2410 */ 2411 public String getPackageName(boolean modelName) 2412 { 2413 return this.getSuperService().getPackageName(modelName); 2414 } 2415 2416 /** 2417 * Returns the package as a path, the returned value always starts with out a slash '/'. 2418 * @see ModelElementFacade#getPackagePath() 2419 */ 2420 public String getPackagePath() 2421 { 2422 return this.getSuperService().getPackagePath(); 2423 } 2424 2425 /** 2426 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the 2427 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from 2428 * the names of the containing namespaces starting at the root of the hierarchy and ending with 2429 * the name of the NamedElement itself. 2430 * @see ModelElementFacade#getQualifiedName() 2431 */ 2432 public String getQualifiedName() 2433 { 2434 return this.getSuperService().getQualifiedName(); 2435 } 2436 2437 /** 2438 * Gets the root package for the model element. 2439 * @see ModelElementFacade#getRootPackage() 2440 */ 2441 public PackageFacade getRootPackage() 2442 { 2443 return this.getSuperService().getRootPackage(); 2444 } 2445 2446 /** 2447 * Gets the dependencies for which this model element is the source. 2448 * @see ModelElementFacade#getSourceDependencies() 2449 */ 2450 public Collection<DependencyFacade> getSourceDependencies() 2451 { 2452 return this.getSuperService().getSourceDependencies(); 2453 } 2454 2455 /** 2456 * If this model element is the context of an activity graph, this represents that activity 2457 * graph. 2458 * @see ModelElementFacade#getStateMachineContext() 2459 */ 2460 public StateMachineFacade getStateMachineContext() 2461 { 2462 return this.getSuperService().getStateMachineContext(); 2463 } 2464 2465 /** 2466 * The collection of ALL stereotype names for this model element. 2467 * @see ModelElementFacade#getStereotypeNames() 2468 */ 2469 public Collection<String> getStereotypeNames() 2470 { 2471 return this.getSuperService().getStereotypeNames(); 2472 } 2473 2474 /** 2475 * Gets all stereotypes for this model element. 2476 * @see ModelElementFacade#getStereotypes() 2477 */ 2478 public Collection<StereotypeFacade> getStereotypes() 2479 { 2480 return this.getSuperService().getStereotypes(); 2481 } 2482 2483 /** 2484 * Return the TaggedValues associated with this model element, under all stereotypes. 2485 * @see ModelElementFacade#getTaggedValues() 2486 */ 2487 public Collection<TaggedValueFacade> getTaggedValues() 2488 { 2489 return this.getSuperService().getTaggedValues(); 2490 } 2491 2492 /** 2493 * Gets the dependencies for which this model element is the target. 2494 * @see ModelElementFacade#getTargetDependencies() 2495 */ 2496 public Collection<DependencyFacade> getTargetDependencies() 2497 { 2498 return this.getSuperService().getTargetDependencies(); 2499 } 2500 2501 /** 2502 * Get the template parameter for this model element having the parameterName 2503 * @see ModelElementFacade#getTemplateParameter(String parameterName) 2504 */ 2505 public Object getTemplateParameter(String parameterName) 2506 { 2507 return this.getSuperService().getTemplateParameter(parameterName); 2508 } 2509 2510 /** 2511 * Get the template parameters for this model element 2512 * @see ModelElementFacade#getTemplateParameters() 2513 */ 2514 public Collection<TemplateParameterFacade> getTemplateParameters() 2515 { 2516 return this.getSuperService().getTemplateParameters(); 2517 } 2518 2519 /** 2520 * The visibility (i.e. public, private, protected or package) of the model element, will 2521 * attempt a lookup for these values in the language mappings (if any). 2522 * @see ModelElementFacade#getVisibility() 2523 */ 2524 public String getVisibility() 2525 { 2526 return this.getSuperService().getVisibility(); 2527 } 2528 2529 /** 2530 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance 2531 * is taken into account when searching for the stereotype), false otherwise. 2532 * @see ModelElementFacade#hasExactStereotype(String stereotypeName) 2533 */ 2534 public boolean hasExactStereotype(String stereotypeName) 2535 { 2536 return this.getSuperService().hasExactStereotype(stereotypeName); 2537 } 2538 2539 /** 2540 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, 2541 * pipe, semicolon, or << >> 2542 * @see ModelElementFacade#hasKeyword(String keywordName) 2543 */ 2544 public boolean hasKeyword(String keywordName) 2545 { 2546 return this.getSuperService().hasKeyword(keywordName); 2547 } 2548 2549 /** 2550 * Returns true if the model element has the specified stereotype. If the stereotype itself 2551 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if 2552 * one of the stereotype's ancestors has a matching name this method will return true, false 2553 * otherwise. 2554 * For example, if we have a certain stereotype called <<exception>> and a model element has a 2555 * stereotype called <<applicationException>> which extends <<exception>>, when calling this 2556 * method with 'stereotypeName' defined as 'exception' the method would return true since 2557 * <<applicationException>> inherits from <<exception>>. If you want to check if the model 2558 * element has the exact stereotype, then use the method 'hasExactStereotype' instead. 2559 * @see ModelElementFacade#hasStereotype(String stereotypeName) 2560 */ 2561 public boolean hasStereotype(String stereotypeName) 2562 { 2563 return this.getSuperService().hasStereotype(stereotypeName); 2564 } 2565 2566 /** 2567 * True if there are target dependencies from this element that are instances of BindingFacade. 2568 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies. 2569 * @see ModelElementFacade#isBindingDependenciesPresent() 2570 */ 2571 public boolean isBindingDependenciesPresent() 2572 { 2573 return this.getSuperService().isBindingDependenciesPresent(); 2574 } 2575 2576 /** 2577 * Indicates if any constraints are present on this model element. 2578 * @see ModelElementFacade#isConstraintsPresent() 2579 */ 2580 public boolean isConstraintsPresent() 2581 { 2582 return this.getSuperService().isConstraintsPresent(); 2583 } 2584 2585 /** 2586 * Indicates if any documentation is present on this model element. 2587 * @see ModelElementFacade#isDocumentationPresent() 2588 */ 2589 public boolean isDocumentationPresent() 2590 { 2591 return this.getSuperService().isDocumentationPresent(); 2592 } 2593 2594 /** 2595 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript. 2596 * @see ModelElementFacade#isReservedWord() 2597 */ 2598 public boolean isReservedWord() 2599 { 2600 return this.getSuperService().isReservedWord(); 2601 } 2602 2603 /** 2604 * True is there are template parameters on this model element. For UML2, applies to Class, 2605 * Operation, Property, and Parameter. 2606 * @see ModelElementFacade#isTemplateParametersPresent() 2607 */ 2608 public boolean isTemplateParametersPresent() 2609 { 2610 return this.getSuperService().isTemplateParametersPresent(); 2611 } 2612 2613 /** 2614 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++, 2615 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on 2616 * Enumerations and Interfaces, optionally applies on other model elements. 2617 * @see ModelElementFacade#isValidIdentifierName() 2618 */ 2619 public boolean isValidIdentifierName() 2620 { 2621 return this.getSuperService().isValidIdentifierName(); 2622 } 2623 2624 /** 2625 * Searches for the constraint with the specified 'name' on this model element, and if found 2626 * translates it using the specified 'translation' from a translation library discovered by the 2627 * framework. 2628 * @see ModelElementFacade#translateConstraint(String name, String translation) 2629 */ 2630 public String translateConstraint(String name, String translation) 2631 { 2632 return this.getSuperService().translateConstraint(name, translation); 2633 } 2634 2635 /** 2636 * Translates all constraints belonging to this model element with the given 'translation'. 2637 * @see ModelElementFacade#translateConstraints(String translation) 2638 */ 2639 public String[] translateConstraints(String translation) 2640 { 2641 return this.getSuperService().translateConstraints(translation); 2642 } 2643 2644 /** 2645 * Translates the constraints of the specified 'kind' belonging to this model element. 2646 * @see ModelElementFacade#translateConstraints(String kind, String translation) 2647 */ 2648 public String[] translateConstraints(String kind, String translation) 2649 { 2650 return this.getSuperService().translateConstraints(kind, translation); 2651 } 2652 2653 /** 2654 * Returns a collection of all entities this service and its ancestors have a relation to. 2655 * @see Service#getAllEntityReferences() 2656 */ 2657 public Collection<DependencyFacade> getAllEntityReferences() 2658 { 2659 return this.getSuperService().getAllEntityReferences(); 2660 } 2661 2662 /** 2663 * All messaging destinations that belong to this service and all decendent services. 2664 * @see Service#getAllMessagingDestinations() 2665 */ 2666 public Collection<Destination> getAllMessagingDestinations() 2667 { 2668 return this.getSuperService().getAllMessagingDestinations(); 2669 } 2670 2671 /** 2672 * All roles associated with the service, this includes both roles that have access to the 2673 * entire service, and any roles that have access to a single operation. 2674 * @see Service#getAllRoles() 2675 */ 2676 public Collection<Role> getAllRoles() 2677 { 2678 return this.getSuperService().getAllRoles(); 2679 } 2680 2681 /** 2682 * Returns a collection of all services this service and its ancestors have a relation to. 2683 * @see Service#getAllServiceReferences() 2684 */ 2685 public Collection<DependencyFacade> getAllServiceReferences() 2686 { 2687 return this.getSuperService().getAllServiceReferences(); 2688 } 2689 2690 /** 2691 * References to all entities to which this service has a dependency. 2692 * @see Service#getEntityReferences() 2693 */ 2694 public Collection<DependencyFacade> getEntityReferences() 2695 { 2696 return this.getSuperService().getEntityReferences(); 2697 } 2698 2699 /** 2700 * All messaging destinations available to this service. 2701 * @see Service#getMessagingDestinations() 2702 */ 2703 public Collection<Destination> getMessagingDestinations() 2704 { 2705 return this.getSuperService().getMessagingDestinations(); 2706 } 2707 2708 /** 2709 * The roles of the service, these are the actor's that can access this service. 2710 * @see Service#getRoles() 2711 */ 2712 public Collection<Role> getRoles() 2713 { 2714 return this.getSuperService().getRoles(); 2715 } 2716 2717 /** 2718 * References to all services to which this service has a dependency. 2719 * @see Service#getServiceReferences() 2720 */ 2721 public Collection<DependencyFacade> getServiceReferences() 2722 { 2723 return this.getSuperService().getServiceReferences(); 2724 } 2725 2726 /** 2727 * @see MetafacadeBase#initialize() 2728 */ 2729 @Override 2730 public void initialize() 2731 { 2732 this.getSuperService().initialize(); 2733 } 2734 2735 /** 2736 * @return Object getSuperService().getValidationOwner() 2737 * @see MetafacadeBase#getValidationOwner() 2738 */ 2739 @Override 2740 public Object getValidationOwner() 2741 { 2742 Object owner = this.getSuperService().getValidationOwner(); 2743 return owner; 2744 } 2745 2746 /** 2747 * @return String getSuperService().getValidationName() 2748 * @see MetafacadeBase#getValidationName() 2749 */ 2750 @Override 2751 public String getValidationName() 2752 { 2753 String name = this.getSuperService().getValidationName(); 2754 return name; 2755 } 2756 2757 /** 2758 * <p><b>Constraint:</b> org::andromda::cartridges::spring::metafacades::SpringService::only one init-method pro service</p> 2759 * <p><b>Error:</b> Only one operation of the Springervice may be an init-method operation.</p> 2760 * <p><b>OCL:</b> context SpringService inv: operations->select(initMethod=true)->size()<=1</p> 2761 * <p><b>Constraint:</b> org::andromda::cartridges::spring::metafacades::SpringService::only one destroy-method pro service</p> 2762 * <p><b>Error:</b> Only one operation of a SpringService may be destroy-method operation.</p> 2763 * <p><b>OCL:</b> context SpringService inv: operations->select(destroyMethod=true)->size()<=1</p> 2764 * @param validationMessages Collection<ModelValidationMessage> 2765 * @see MetafacadeBase#validateInvariants(Collection validationMessages) 2766 */ 2767 @Override 2768 public void validateInvariants(Collection<ModelValidationMessage> validationMessages) 2769 { 2770 this.getSuperService().validateInvariants(validationMessages); 2771 try 2772 { 2773 final Object contextElement = this.THIS(); 2774 boolean constraintValid = OCLResultEnsurer.ensure(OCLExpressions.lessOrEqual(OCLCollections.size(OCLCollections.select(OCLIntrospector.invoke(contextElement,"operations"),new Predicate(){public boolean evaluate(Object object){return Boolean.valueOf(String.valueOf(OCLExpressions.equal(OCLIntrospector.invoke(object,"initMethod"),true))).booleanValue();}})),1)); 2775 if (!constraintValid) 2776 { 2777 validationMessages.add( 2778 new ModelValidationMessage( 2779 (MetafacadeBase)contextElement , 2780 "org::andromda::cartridges::spring::metafacades::SpringService::only one init-method pro service", 2781 "Only one operation of the Springervice may be an init-method operation.")); 2782 } 2783 } 2784 catch (Throwable th) 2785 { 2786 Throwable cause = th.getCause(); 2787 int depth = 0; // Some throwables have infinite recursion 2788 while (cause != null && depth < 7) 2789 { 2790 th = cause; 2791 depth++; 2792 } 2793 logger.error("Error validating constraint 'org::andromda::cartridges::spring::metafacades::SpringService::only one init-method pro service' ON " 2794 + this.THIS().toString() + ": " + th.getMessage(), th); 2795 } 2796 try 2797 { 2798 final Object contextElement = this.THIS(); 2799 boolean constraintValid = OCLResultEnsurer.ensure(OCLExpressions.lessOrEqual(OCLCollections.size(OCLCollections.select(OCLIntrospector.invoke(contextElement,"operations"),new Predicate(){public boolean evaluate(Object object){return Boolean.valueOf(String.valueOf(OCLExpressions.equal(OCLIntrospector.invoke(object,"destroyMethod"),true))).booleanValue();}})),1)); 2800 if (!constraintValid) 2801 { 2802 validationMessages.add( 2803 new ModelValidationMessage( 2804 (MetafacadeBase)contextElement , 2805 "org::andromda::cartridges::spring::metafacades::SpringService::only one destroy-method pro service", 2806 "Only one operation of a SpringService may be destroy-method operation.")); 2807 } 2808 } 2809 catch (Throwable th) 2810 { 2811 Throwable cause = th.getCause(); 2812 int depth = 0; // Some throwables have infinite recursion 2813 while (cause != null && depth < 7) 2814 { 2815 th = cause; 2816 depth++; 2817 } 2818 logger.error("Error validating constraint 'org::andromda::cartridges::spring::metafacades::SpringService::only one destroy-method pro service' ON " 2819 + this.THIS().toString() + ": " + th.getMessage(), th); 2820 } 2821 } 2822 2823 /** 2824 * The property that stores the name of the metafacade. 2825 */ 2826 private static final String NAME_PROPERTY = "name"; 2827 private static final String FQNAME_PROPERTY = "fullyQualifiedName"; 2828 2829 /** 2830 * @see Object#toString() 2831 */ 2832 @Override 2833 public String toString() 2834 { 2835 final StringBuilder toString = new StringBuilder(this.getClass().getName()); 2836 toString.append("["); 2837 try 2838 { 2839 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY)); 2840 } 2841 catch (final Throwable tryAgain) 2842 { 2843 try 2844 { 2845 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY)); 2846 } 2847 catch (final Throwable ignore) 2848 { 2849 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property 2850 } 2851 } 2852 toString.append("]"); 2853 return toString.toString(); 2854 } 2855}