Changeset 2080
- Timestamp:
- Oct 17, 2013, 2:40:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r2079 r2080 983 983 */ 984 984 public AnnotationTypeCategory createAnnotationTypeCategory(SessionControl sc, 985 Subtype subtype , Annotationtype... annotationTypes)985 Subtype subtype) 986 986 { 987 987 AnnotationTypeCategory cat = null; … … 991 991 cat = AnnotationTypeCategory.getNew(dc); 992 992 cat.setName(subtype.getName()); 993 994 if (annotationTypes != null)995 {996 for (Annotationtype annotationType : annotationTypes)997 {998 AnnotationType at = annotationType.load(dc);999 if (at != null)1000 {1001 at.addCategory(cat);1002 }1003 }1004 }1005 1006 993 dc.saveItem(cat); 1007 994 dc.commit(); … … 1063 1050 if (createIfMissing) 1064 1051 { 1065 AnnotationTypeCategory cat = createAnnotationTypeCategory(dc.getSessionControl(), 1066 subtype, annotationTypes); 1052 AnnotationTypeCategory cat = createAnnotationTypeCategory(dc.getSessionControl(), subtype); 1053 // Add the category to annotation types in the original transaction 1054 if (annotationTypes != null) 1055 { 1056 for (Annotationtype annotationType : annotationTypes) 1057 { 1058 AnnotationType at = annotationType.load(dc); 1059 if (at != null) 1060 { 1061 at.addCategory(cat); 1062 } 1063 } 1064 } 1065 1067 1066 json.put("id", cat.getId()); 1068 1067 json.put("status", "ok");
Note: See TracChangeset
for help on using the changeset viewer.