Changeset 8028
- Timestamp:
- 20/12/11 21:16:28 (9 years ago)
- Location:
- mauRepo/xmi2sqlalchemy/trunk/src/main/java/ndg/services/newmoon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/xmi2sqlalchemy/trunk/src/main/java/ndg/services/newmoon/collect/ClassModel.java
r8009 r8028 48 48 public class ClassModel implements ExportModel { 49 49 public enum STEREOTYPE { 50 Enumeration, CodeList, Union, DataType, Boolean, None, Metaclass ;50 Enumeration, CodeList, Union, DataType, Boolean, None, Metaclass, Type; 51 51 } 52 52 private final UMLClass associatedClass; -
mauRepo/xmi2sqlalchemy/trunk/src/main/java/ndg/services/newmoon/collect/CollectClassesClosure.java
r8017 r8028 110 110 return STEREOTYPE.Metaclass; 111 111 112 if (stereotype.getName().equalsIgnoreCase(STEREOTYPE.Type.name())) 113 return STEREOTYPE.Type; 112 114 return STEREOTYPE.None; 113 115 } -
mauRepo/xmi2sqlalchemy/trunk/src/main/java/ndg/services/newmoon/velocity/python/support/ForeignKey.java
r7996 r8028 40 40 private final String parentAttributeName; 41 41 private boolean useAlter = false; 42 42 private Relationship associatedRelationship; 43 43 44 /** 44 45 * @param tableModel … … 49 50 this.parentAttributeName = parentAttributeName; 50 51 } 52 53 /** 54 * @return the associatedRelationship 55 */ 56 public Relationship getAssociatedRelationship() { 57 return associatedRelationship; 58 } 59 60 61 62 /** 63 * @param associatedRelationship the associatedRelationship to set 64 */ 65 public void setAssociatedRelationship(Relationship associatedRelationship) { 66 this.associatedRelationship = associatedRelationship; 67 } 68 69 51 70 52 71 /** -
mauRepo/xmi2sqlalchemy/trunk/src/main/java/ndg/services/newmoon/velocity/python/support/Relationship.java
r8013 r8028 45 45 private RELATION_TYPE relationType = null; 46 46 private String backrefName = null; 47 //If true indicates that even if the relationType is MANY-to-MANY 48 //the relation is a ONE-to-ONE relation. 49 private final boolean doNotUseList; 47 private boolean useList; 48 private ForeignKey associatedForeignKey; 50 49 51 50 /** … … 55 54 * @param nullable 56 55 */ 57 public Relationship(TableModel fromTable, TableModel toTable, String name, boolean nullable, boolean doNotUseList) {56 public Relationship(TableModel fromTable, TableModel toTable, String name, boolean nullable, boolean useList) { 58 57 super(); 59 58 this.fromTable = fromTable; 60 59 this.toTable = toTable; 61 60 this.name = name; 62 this.nullable = nullable; 63 this.doNotUseList = doNotUseList; 64 } 65 66 /** 67 * @return the doNotUseList 68 */ 69 public boolean isDoNotUseList() { 70 return doNotUseList; 71 } 72 73 61 this.nullable = nullable; 62 this.useList = useList; 63 } 64 65 /** 66 * @return the associatedForeignKey 67 */ 68 public ForeignKey getAssociatedForeignKey() { 69 return associatedForeignKey; 70 } 71 72 /** 73 * @param associatedForeignKey the associatedForeignKey to set 74 */ 75 public void setAssociatedForeignKey(ForeignKey associatedForeignKey) { 76 this.associatedForeignKey = associatedForeignKey; 77 } 78 79 /** 80 * @return the useList 81 */ 82 public boolean isUseList() { 83 return useList; 84 } 85 86 /** 87 * Sets the useList attribute. For topological reason some time is necessary 88 * to set up a MANY-to-MANY relation between a two tables even if the 89 * linking attribute has a multiplicity equal to 1. This parameter 90 * guarantees that even the relation is a MANY-to-MANY the ORM is aware 91 * that the relation expects just zero or one result. 92 * @param useList the useList to set 93 */ 94 public void setUseList(boolean useList) { 95 this.useList = useList; 96 } 74 97 75 98 public boolean isManyToMany() {
Note: See TracChangeset
for help on using the changeset viewer.