01: package org.andromda.cartridges.ejb.metafacades;
02:
03: import org.andromda.cartridges.ejb.EJBProfile;
04:
05: /**
06: * MetafacadeLogic implementation for org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade.
07: *
08: * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade
09: */
10: public class EJBAssociationFacadeLogicImpl extends
11: EJBAssociationFacadeLogic {
12: // ---------------- constructor -------------------------------
13:
14: public EJBAssociationFacadeLogicImpl(Object metaObject,
15: String context) {
16: super (metaObject, context);
17: }
18:
19: // --------------- attributes ---------------------
20: /**
21: * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade#getTransactionType()
22: */
23: protected java.lang.String handleGetTransactionType() {
24: return (String) this
25: .findTaggedValue(EJBProfile.TAGGEDVALUE_EJB_TRANSACTION_TYPE);
26: }
27:
28: /**
29: * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacadeLogic#handleGetTableName()
30: */
31: public String getTableName() {
32: String tableName = super .getTableName();
33: if (getName().toLowerCase().startsWith(tableName.toLowerCase())) {
34: tableName = getRelationName().replaceAll("-", "_")
35: .toUpperCase();
36: }
37: return tableName;
38: }
39: }
|