/** * Given a ClassDescriptor find names of all related indirection tables. * @param cld class to find tables for * @return a set of all indirection table names */ public static Set<String> getIndirectionTableNames(ClassDescriptor cld) { Set<String> tables = new HashSet<String>(); for (CollectionDescriptor col : cld.getAllCollectionDescriptors()) { if (FieldDescriptor.M_N_RELATION == col.relationType()) { tables.add(getIndirectionTableName(col)); } } return tables; }
/** * Given a ClassDescriptor find names of all related indirection tables. * @param cld class to find tables for * @return a set of all indirection table names */ public static Set<String> getIndirectionTableNames(ClassDescriptor cld) { Set<String> tables = new HashSet<String>(); for (CollectionDescriptor col : cld.getAllCollectionDescriptors()) { if (FieldDescriptor.M_N_RELATION == col.relationType()) { tables.add(getIndirectionTableName(col)); } } return tables; }
addFields(sb, getAllReferenceDescriptors()); sb.append("},\"collections\":{"); addFields(sb, getAllCollectionDescriptors()); sb.append("}}"); return sb.toString();
addFields(sb, getAllReferenceDescriptors()); sb.append("},\"collections\":{"); addFields(sb, getAllCollectionDescriptors()); sb.append("}}"); return sb.toString();
for (CollectionDescriptor c: cld.getAllCollectionDescriptors()) { Map<String, Object> col = new HashMap<String, Object>(); colls.put(c.getName(), col);
for (CollectionDescriptor c: cld.getAllCollectionDescriptors()) { Map<String, Object> col = new HashMap<String, Object>(); colls.put(c.getName(), col);
refsAndCols.addAll(cld.getAllCollectionDescriptors()); for (ReferenceDescriptor ref : refsAndCols) { String fieldName = ref.getName();
refsAndCols.addAll(cld.getAllCollectionDescriptors()); for (ReferenceDescriptor ref : refsAndCols) { String fieldName = ref.getName();
for (CollectionDescriptor desc : getAllCollectionDescriptors()) { ClassDescriptor cld = desc.getClassDescriptor(); table.addRow(new String[] {desc.getName(), "collection of "
for (CollectionDescriptor desc : getAllCollectionDescriptors()) { ClassDescriptor cld = desc.getClassDescriptor(); table.addRow(new String[] {desc.getName(), "collection of "